/* ===== Cookie Consent Modal ===== */

/* Overlay */
.cookie-overlay {
    /* position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease; */
}

.cookie-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal principal */
.cookie-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 9999;
    padding: 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.25);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal.active {
    transform: translateY(0);
}

.cookie-modal-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
}

/* Ícone e título */
.cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.cookie-header i {
    font-size: 2rem;
    color: #0075ff;
}

.cookie-header h2 {
    font-size: 1.35rem;
    color: #0a1f33;
    margin: 0;
    font-weight: 700;
}

.cookie-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.cookie-description a {
    color: #0075ff;
    text-decoration: underline;
}

/* Botões */
.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-btn:active {
    transform: translateY(0);
}

.cookie-btn-accept-all {
    background: #38d430;
    color: #fff;
    box-shadow: 0 2px 8px rgba(56, 212, 48, 0.35);
}

.cookie-btn-accept-all:hover {
    background: #2dba26;
}

.cookie-btn-essentials {
    background: transparent;
    color: #0a1f33;
    border: 2px solid #d0d5dd;
}

.cookie-btn-essentials:hover {
    border-color: #0075ff;
    color: #0075ff;
    background: rgba(0, 117, 255, 0.04);
}

.cookie-btn-customize {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.cookie-btn-customize:hover {
    border-color: #999;
    color: #333;
}

/* ===== Modal de Personalização ===== */
.cookie-settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.cookie-settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    height: 100%;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cookie-settings-overlay.active .cookie-settings-modal {
    transform: scale(1) translateY(0);
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.cookie-settings-header h3 {
    font-size: 1.2rem;
    color: #0a1f33;
    margin: 0;
    font-weight: 700;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.cookie-settings-close:hover {
    background: #f0f0f0;
    color: #333;
}

.cookie-settings-body {
    padding: 1rem 1.75rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Grupo de toggle */
.cookie-toggle-group {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-toggle-group:last-child {
    border-bottom: none;
}

.cookie-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-toggle-info {
    flex: 1;
}

.cookie-toggle-label {
    font-size: 1rem;
    font-weight: 600;
    color: #0a1f33;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-toggle-label .cookie-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-toggle-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #38d430;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #a5d6a7;
    cursor: not-allowed;
    opacity: 0.8;
}

.cookie-toggle input:disabled:checked + .cookie-toggle-slider::before {
    transform: translateX(22px);
}

/* Botões do modal de preferências */
.cookie-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 1rem 1.75rem 1.5rem;
    border-top: 1px solid #eee;
}

.cookie-btn-save {
    background: #0075ff;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.cookie-btn-save:hover {
    background: #005ecb;
    box-shadow: 0 4px 12px rgba(0, 117, 255, 0.3);
}

.cookie-btn-cancel {
    background: transparent;
    color: #666;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
}

.cookie-btn-cancel:hover {
    border-color: #999;
    color: #333;
}

/* ===== Responsivo ===== */
@media (max-width: 640px) {
    .cookie-modal-inner {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .cookie-header h2 {
        font-size: 1.15rem;
    }

    .cookie-description {
        font-size: 0.88rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }

    .cookie-settings-modal {
        max-height: 92vh;
        border-radius: 12px;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .cookie-toggle-row {
        gap: 0.75rem;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

    .cookie-btn-save,
    .cookie-btn-cancel {
        width: 100%;
        text-align: center;
    }
}
