.cookie-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
}

.cookie-modal-wrap {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal {
    background: #fff;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 32px 72px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    animation: cookie-modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes cookie-modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header ── */
.cookie-modal-header {
    background: #272355;
    padding: 1.25rem 2rem 1rem;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
}

.cookie-header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-modal-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ── Tab Nav ── */
.cookie-tab-nav {
    display: flex;
    padding: 0.75rem 1.5rem 0;
    gap: 0.25rem;
    border-bottom: 1.5px solid #f1f5f9;
    flex-shrink: 0;
}

.cookie-tab-btn {
    background: none;
    border: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.cookie-tab-btn:hover {
    color: #475569;
}

.cookie-tab-btn.active {
    color: #2D6AFD;
    border-bottom-color: #2D6AFD;
}

/* ── Tab Panels ── */
.cookie-tab-panels {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cookie-panel {
    display: none;
    padding: 1.25rem 1.75rem;
}

.cookie-panel.active {
    display: block;
}

/* Consent panel */
.cookie-consent-intro {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.1rem;
}

.cookie-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.cookie-summary-item.essential,  .cookie-item.essential  { background: #f4f6f8; }
.cookie-summary-item.functional, .cookie-item.functional { background: #f0fdf4; border: 1.5px solid #bbf7d0; }
.cookie-summary-item.usage,      .cookie-item.usage      { background: #faf5ff; border: 1.5px solid #e9d5ff; }
.cookie-summary-item.analytics,  .cookie-item.analytics  { background: #eff6ff; border: 1.5px solid #bfdbfe; }

.cookie-summary-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.cookie-summary-item.essential  .cookie-summary-icon, .cookie-item.essential  .cookie-item-icon { background: #dde3ea; color: #64748b; }
.cookie-summary-item.functional .cookie-summary-icon, .cookie-item.functional .cookie-item-icon { background: #dcfce7; color: #16a34a; }
.cookie-summary-item.usage      .cookie-summary-icon, .cookie-item.usage      .cookie-item-icon { background: #ede9fe; color: #7c3aed; }
.cookie-summary-item.analytics  .cookie-summary-icon, .cookie-item.analytics  .cookie-item-icon { background: #dbeafe; color: #1d64d8; }

.cookie-summary-text strong {
    font-size: 0.83rem;
    color: #1e293b;
    display: block;
    margin-bottom: 0.15rem;
}

.cookie-summary-text span {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.45;
}

/* Customize panel */
.cookie-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
}

.cookie-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cookie-item-info { flex: 1; min-width: 0; }

.cookie-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.cookie-item-top strong { font-size: 0.86rem; color: #1e293b; }

.cookie-always-active {
    font-size: 0.67rem;
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cookie-item p {
    font-size: 0.76rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.cookie-toggle {
    width: 2.5em;
    height: 1.35em;
    cursor: pointer;
    flex-shrink: 0;
}

/* About panel */
.cookie-about-section {
    margin-bottom: 1.1rem;
}

.cookie-about-section h6 {
    font-size: 0.83rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.cookie-about-section p {
    font-size: 0.77rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.cookie-about-section a {
    color: #1a6fd4;
    text-decoration: none;
}

.cookie-about-section a:hover {
    text-decoration: underline;
}

/* Trust line */
.cookie-trust {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 0.5rem;
    padding: 0 0.1rem;
}

.cookie-trust i { color: #22c55e; font-size: 0.78rem; }

/* ── Footer ── */
.cookie-modal-footer {
    padding: 0.9rem 1.75rem 1.5rem;
    border-top: 1.5px solid #f1f5f9;
    flex-shrink: 0;
}

.cookie-footer-panel { display: none; }
.cookie-footer-panel.active { display: flex; gap: 0.6rem; }

.btn-cookie-accept {
    flex: 1;
    background: #2D6AFD;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 0.65rem 1rem;
    font-size: 0.87rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    background: #1a58e8;
    transform: translateY(-1px);
}

.btn-cookie-secondary {
    flex: 1;
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 0.65rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-cookie-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
