/* ============================================================
   COOKIE BANNER & MODAL — cookies.css
   ============================================================ */

/* ---------- Banner ---------- */
#cookieBanner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: #0f1e45;
    color: rgba(255,255,255,.9);
    padding: 20px 24px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.25);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
#cookieBanner.visible { transform: translateY(0); }

.cb-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cb-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.cb-text { flex: 1; min-width: 260px; }
.cb-text strong {
    display: block;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 4px;
}
.cb-text p {
    font-size: .85rem;
    color: rgba(255,255,255,.75);
    line-height: 1.5;
    margin: 0;
}
.cb-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.cb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.cb-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: .2s;
    white-space: nowrap;
}
.cb-btn--reject {
    background: transparent;
    color: rgba(255,255,255,.8);
    border-color: rgba(255,255,255,.3);
}
.cb-btn--reject:hover {
    border-color: rgba(255,255,255,.7);
    color: #fff;
}
.cb-btn--config {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.9);
    border-color: rgba(255,255,255,.2);
}
.cb-btn--config:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
}
.cb-btn--accept {
    background: #1a56db;
    color: #fff;
    border-color: #1a56db;
}
.cb-btn--accept:hover {
    background: #1e40af;
    border-color: #1e40af;
}

/* ---------- Modal overlay ---------- */
#cookieModal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
#cookieModal.visible {
    opacity: 1;
    pointer-events: all;
}

.cm-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.cm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cm-header h2 {
    font-size: 1.15rem;
    color: #111827;
    margin: 0;
}
.cm-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #6b7280;
    font-size: 1.1rem;
    transition: background .2s;
    flex-shrink: 0;
}
.cm-close:hover { background: #e5e7eb; color: #111; }

.cm-intro {
    font-size: .88rem;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}
.cm-intro a { color: #1a56db; }

/* Cookie toggle row */
.cm-row {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color .2s;
}
.cm-row:hover { border-color: #dbeafe; }

.cm-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.cm-row-title {
    font-size: .95rem;
    font-weight: 600;
    color: #111827;
}
.cm-row-desc {
    font-size: .83rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch */
.cm-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cm-toggle input {
    opacity: 0;
    width: 0; height: 0;
    position: absolute;
}
.cm-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 100px;
    cursor: pointer;
    transition: background .2s;
}
.cm-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cm-toggle input:checked + .cm-slider { background: #1a56db; }
.cm-toggle input:checked + .cm-slider::before { transform: translateX(20px); }
.cm-toggle input:disabled + .cm-slider { opacity: .6; cursor: not-allowed; }
.cm-toggle input:disabled + .cm-slider { background: #16a34a; }

.badge-always {
    background: #dcfce7;
    color: #15803d;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.cm-footer {
    margin-top: 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cm-btn {
    padding: 11px 22px;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: .2s;
}
.cm-btn--save {
    background: #1a56db;
    color: #fff;
    border-color: #1a56db;
}
.cm-btn--save:hover {
    background: #1e40af;
    border-color: #1e40af;
}
.cm-btn--accept-all {
    background: transparent;
    color: #1a56db;
    border-color: #1a56db;
}
.cm-btn--accept-all:hover {
    background: #eff6ff;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .cb-inner { gap: 16px; }
    .cb-actions { width: 100%; justify-content: stretch; }
    .cb-btn { flex: 1; text-align: center; }
    .cm-card { padding: 24px 18px; }
    .cm-footer { flex-direction: column; }
    .cm-btn { width: 100%; text-align: center; }
}
