/* ==========================================================================
   Cookie consent banner + preferences modal
   ========================================================================== */
.cc-banner[hidden], .cc-modal[hidden] { display: none !important; }

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: #fff;
    color: #2B1020;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .12);
    animation: cc-up .35s ease-out;
}

@keyframes cc-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.cc-text { flex: 1 1 auto; font-size: 13px; line-height: 1.55; color: #374151; }
.cc-text p { margin: 0; }
.cc-text .cc-title { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 4px; }
.cc-text a, .cc-modal-body a { color: #111; text-decoration: underline; }

.cc-actions {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-width: 300px;
}

.cc-actions .cc-btn-link { grid-column: 1 / -1; }

.cc-btn {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

/* Accept and Reject deliberately share one style (equal prominence, ICO/CNIL guidance). */
.cc-btn-primary { background: var(--aabruu-teal, #B3124F); color: #fff; border-color: var(--aabruu-teal, #B3124F); }
.cc-btn-primary:hover { background: var(--aabruu-teal-dark, #8C0D3D); border-color: var(--aabruu-teal-dark, #8C0D3D); }

.cc-btn-outline { background: #fff; color: var(--aabruu-teal, #B3124F); border-color: var(--aabruu-teal, #B3124F); }
.cc-btn-outline:hover { background: #f0f7f6; }

.cc-btn-link { background: transparent; color: #111; text-decoration: underline; padding: 6px; }

.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + span {
    outline: 3px solid var(--aabruu-pink, #D4A62A);
    outline-offset: 2px;
}

/* ---- Modal ---- */
.cc-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .55); }

.cc-modal-box {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    outline: none;
}

.cc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #e5e7eb; }
.cc-modal-head h2 { font-size: 18px; font-weight: 700; margin: 0; color: #111; }
.cc-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 4px; }

.cc-modal-body { padding: 16px 20px; overflow-y: auto; font-size: 13px; line-height: 1.55; color: #374151; }
.cc-modal-body > p { margin: 0 0 12px; }

.cc-cat { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.cc-cat p { margin: 4px 0 0; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-name { font-weight: 700; color: #111; font-size: 14px; margin: 0; cursor: pointer; }
.cc-always { font-size: 12px; font-weight: 600; color: var(--aabruu-teal, #B3124F); }
.cc-gpc { font-size: 12px; color: #6b7280; margin: 6px 0 0; }

.cc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; margin: 0; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cc-switch span { position: absolute; inset: 0; background: #d1d5db; border-radius: 24px; transition: background .2s; }
.cc-switch span::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,.25); }
.cc-switch input:checked + span { background: var(--aabruu-teal, #B3124F); }
.cc-switch input:checked + span::before { transform: translateX(18px); }

.cc-modal-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid #e5e7eb; }
.cc-modal-foot .cc-btn { flex: 1 1 0; }

body.cc-modal-open { overflow: hidden; }

/* Keep the floating scroll button above the banner while it is shown */
body.cc-banner-open #scrollToggleBtn { bottom: 150px; }

@media (max-width: 860px) {
    .cc-banner-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
    .cc-actions { min-width: 0; }
    body.cc-banner-open #scrollToggleBtn { bottom: 260px; }
}

@media (max-width: 480px) {
    .cc-modal-foot { flex-direction: column; }
    .cc-text { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner { animation: none; }
}
