/* ============================================
   PÁGINA: POLÍTICA DE COOKIES - DM
   Complementa termos.css
   ============================================ */

/* ---------- Badge do hero (tom âmbar/cookie) ---------- */
.hero-badge-cookies {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fcd34d;
}

.hero-badge-cookies i { color: #fbbf24; }

/* ---------- Alerta de cookies ---------- */
.terms-alert-cookies {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(180, 83, 9, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.terms-alert-cookies::before {
    background: linear-gradient(180deg, #fbbf24, #b45309);
}

.terms-alert-cookies > i { color: #fbbf24; }

/* ============================================
   GRID DE TIPOS DE COOKIES
   ============================================ */
.cookie-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.cookie-type {
    padding: 20px 20px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cookie-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.cookie-type:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.cookie-type-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-type-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.cookie-type-head strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
    margin-bottom: 2px;
}

.cookie-type-head small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-type p {
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.cookie-type p strong { color: #fff; font-weight: 700; }

/* Variantes por categoria */
.cookie-type-essential::before   { background: linear-gradient(90deg, #10b981, #059669); }
.cookie-type-essential .cookie-type-icon {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.cookie-type-performance::before { background: linear-gradient(90deg, #4da6ff, #1a4b8c); }
.cookie-type-performance .cookie-type-icon {
    background: rgba(77, 166, 255, 0.15);
    border: 1px solid rgba(77, 166, 255, 0.3);
    color: #4da6ff;
}

.cookie-type-functionality::before { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.cookie-type-functionality .cookie-type-icon {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}

.cookie-type-marketing::before   { background: linear-gradient(90deg, #fbbf24, #b45309); }
.cookie-type-marketing .cookie-type-icon {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ============================================
   TABELA DE COOKIES
   ============================================ */
.cookie-table-wrap {
    margin: 20px 0 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 620px;
}

.cookie-table thead {
    background: rgba(77, 166, 255, 0.08);
}

.cookie-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #a5d5ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.cookie-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    vertical-align: middle;
}

.cookie-table tbody tr {
    transition: background 0.25s;
}

.cookie-table tbody tr:hover {
    background: rgba(77, 166, 255, 0.06);
}

.cookie-table tbody tr:last-child td { border-bottom: none; }

.cookie-table code {
    font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(77, 166, 255, 0.12);
    color: #a5d5ff;
    border: 1px solid rgba(77, 166, 255, 0.2);
    white-space: nowrap;
}

.badge-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-essential {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-performance {
    background: rgba(77, 166, 255, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(77, 166, 255, 0.3);
}

.badge-functionality {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.badge-marketing {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.cookie-table-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin: 0;
}

.cookie-table-note i { color: #4da6ff; font-style: normal; }

/* ============================================
   PAINEL DE CONSENTIMENTO INTERATIVO
   ============================================ */
.consent-panel {
    margin: 22px 0;
    padding: 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(77, 166, 255, 0.08) 0%, transparent 45%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(77, 166, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.consent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.consent-row:last-of-type { border-bottom: none; }

.consent-info strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.consent-info small {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4da6ff, #1a4b8c);
    border-color: rgba(77, 166, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(77, 166, 255, 0.1);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.toggle-switch.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.toggle-switch.disabled .toggle-slider {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(16, 185, 129, 0.5);
}

/* Ações do painel */
.consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-consent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-consent-primary {
    background: linear-gradient(135deg, #1a4b8c 0%, #0a2a5e 100%);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(26, 75, 140, 0.6);
}

.btn-consent-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -8px rgba(26, 75, 140, 0.8);
}

.btn-consent-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-consent-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(77, 166, 255, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.consent-feedback {
    margin: 14px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #34d399;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s;
    min-height: 18px;
}

.consent-feedback.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   GRID DE NAVEGADORES
   ============================================ */
.browser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.browser-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.browser-card:hover {
    background: rgba(77, 166, 255, 0.1);
    border-color: rgba(77, 166, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -20px rgba(77, 166, 255, 0.5);
}

.browser-card > i:first-child {
    font-size: 24px;
    color: #4da6ff;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.browser-card > div { flex: 1; min-width: 0; }

.browser-card strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.browser-card small {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
}

.browser-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: all 0.3s;
}

.browser-card:hover .browser-arrow {
    color: #4da6ff;
    transform: translate(3px, -3px);
}

/* ---------- Ícone de aceite final ---------- */
.accept-icon-cookies {
    background: linear-gradient(135deg, #fbbf24, #b45309);
    box-shadow: 0 15px 30px -10px rgba(251, 191, 36, 0.5);
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 900px) {
    .cookie-types { grid-template-columns: 1fr; }
    .browser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .cookie-types { gap: 12px; }
    .cookie-type { padding: 16px 16px 14px; }

    .consent-panel { padding: 18px 16px; }

    .consent-row {
        padding: 12px 0;
        align-items: flex-start;
    }

    .consent-actions { gap: 8px; }
    .btn-consent {
        flex: 1 1 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    .cookie-table { font-size: 12px; min-width: 560px; }
    .cookie-table th,
    .cookie-table td { padding: 10px 12px; }

    .browser-card { padding: 12px 14px; }
    .browser-card > i:first-child { font-size: 20px; width: 26px; }
}

/* ---------- Impressão ---------- */
@media print {
    .consent-panel,
    .browser-grid,
    .cookie-table-wrap {
        break-inside: avoid;
    }

    .toggle-switch,
    .consent-actions { display: none !important; }

    .cookie-table th,
    .cookie-table td {
        border: 1px solid #ccc !important;
        color: #000 !important;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .cookie-type,
    .browser-card,
    .toggle-slider,
    .toggle-slider::before {
        transition: none !important;
    }
}