/*
 * Manus Cookie Consent - CSS Styles
 *
 * Usa variáveis CSS (Custom Properties) definidas no PHP para cores dinâmicas.
 */

/* Garantir que o banner sempre fique sobre todos os elementos */
.cookieConsentContainer {
    position: fixed !important;
    bottom: 20px;
    left: 150px;
    right: 150px;
    width: auto;
    min-height: 50px;
    background: var(--mcc-bg-color, #333333); /* Cor de fundo dinâmica */
    color: var(--mcc-text-color, #ffffff); /* Cor do texto dinâmica */
    z-index: 9999999;
    padding: 15px 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: none; /* Escondido por padrão, mostrado pelo JS */
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Garantir que iframes e outros elementos não sobreponham o banner */
iframe, embed, object, video {
    position: relative !important;
    z-index: 1 !important;
}

/* Forçar banner sobre elementos com z-index alto */
.cookieConsentContainer {
    z-index: 9999999 !important;
}

.cookieConsentContainer a {
    color: var(--mcc-text-color, #ffffff);
    text-decoration: underline;
    font-weight: bold;
}

.cookieDesc {
    flex-grow: 1;
    margin-right: 20px;
}

.cookieDesc p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookieButtons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookieButtons button {
    background: var(--mcc-button-bg-color, #4CAF50); /* Cor de fundo do botão dinâmica */
    color: var(--mcc-button-text-color, #ffffff); /* Cor do texto do botão dinâmica */
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cookieButtons button:hover {
    filter: brightness(1.1);
}

/* Responsividade básica */
@media (max-width: 768px) {
    .cookieConsentContainer {
        left: 20px;
        right: 20px;
        flex-direction: column;
        text-align: center;
    }

    .cookieDesc {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .cookieButtons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .cookieConsentContainer {
        left: 10px;
        right: 10px;
        padding: 12px 15px;
    }

    .cookieButtons {
        flex-direction: column;
        gap: 8px;
    }

    .cookieButtons button {
        width: 100%;
    }
}

/* Estilos do Modal de Configurações */
.mcc-modal {
    display: none;
    position: fixed;
    z-index: 10000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.mcc-modal-content {
    background-color: var(--mcc-bg-color, #333333);
    color: var(--mcc-text-color, #ffffff);
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    /* Animação de entrada/saída */
    transform: scale(0.96);
    opacity: 0;
    transition: all 0.25s ease;
}

.mcc-close {
    color: var(--mcc-text-color, #ffffff);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mcc-close:hover {
    opacity: 1;
}

.mcc-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--mcc-text-color, #ffffff);
    font-size: 24px;
}

.mcc-category {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mcc-category label {
    display: flex;
    align-items: center;
    font-weight: bold;
    margin-bottom: 8px;
    cursor: pointer;
}

.mcc-category input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.mcc-category p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    margin-left: 30px;
}

.mcc-modal-buttons {
    margin-top: 30px;
    text-align: center;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mcc-save-btn, .mcc-cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 150px;
}

.mcc-save-btn {
    background-color: var(--mcc-button-bg-color, #4CAF50);
    color: var(--mcc-button-text-color, #ffffff);
}

.mcc-save-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.mcc-cancel-btn {
    background-color: transparent;
    color: var(--mcc-text-color, #ffffff);
    border: 2px solid var(--mcc-text-color, #ffffff);
}

.mcc-cancel-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mcc-customize-btn {
    background-color: transparent !important;
    color: var(--mcc-text-color, #ffffff) !important;
    border: 2px solid var(--mcc-text-color, #ffffff) !important;
}

.mcc-customize-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Toast de notificação */
.mcc-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--mcc-button-bg-color, #4CAF50);
    color: var(--mcc-button-text-color, #ffffff);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000001;
    
    /* Animação de entrada/saída */
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Link do rodapé */
.mcc-footer-link {
    text-align: center !important;
    padding: 20px !important;
    font-size: 12px !important;
    opacity: 0.7 !important;
}

.mcc-footer-link a {
    color: inherit !important;
    text-decoration: underline !important;
    transition: opacity 0.3s ease;
}

.mcc-footer-link a:hover {
    opacity: 1 !important;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .mcc-modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .mcc-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .mcc-save-btn, .mcc-cancel-btn {
        width: 100%;
    }
    
    .mcc-toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        text-align: center;
    }
}
