/* ============================================================
   Challenge Circle — cookie-consent.css
   Site-wide cookie consent banner. See assets/js/cookie-consent.js
   for behavior and includes/head.php for the markup (loaded on
   every page, same reasoning as nav.js — see the comment there).
   ============================================================ */

.cc-cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: var(--dark-surface);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.45);
    padding: 20px 24px;
    transform: translateY(110%);
    transition: transform 0.35s ease;
}
.cc-cookie-banner.visible { transform: translateY(0); }

/* Reserve space at the bottom of the page while the banner is visible, so
   it never sits on top of (and blocks clicks on) bottom-anchored content
   like a wizard's "Continue" / "Submit" buttons. Height is set from JS
   (cookie-consent.js) since it varies with viewport width and whether the
   customize panel is open. */
/* !important: responsive.css's mobile `body:not(:has(.page-home))` rule
   loads after this file and ties it on specificity, so without this the
   banner's own space never actually applied on mobile — the exact
   overlap bug being fixed here. */
body.cc-banner-space { padding-bottom: var(--cc-banner-h, 180px) !important; transition: padding-bottom 0.35s ease; }

.cc-cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cc-cookie-text  { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 260px; }
.cc-cookie-icon  { font-size: 26px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cc-cookie-title { font-size: 14px; font-weight: 800; color: #fff; margin: 0 0 4px; }
.cc-cookie-desc  { font-size: 12.5px; color: #9ca3af; line-height: 1.6; margin: 0; }
.cc-cookie-desc a { color: var(--purple-light); text-decoration: none; font-weight: 700; white-space: nowrap; }
.cc-cookie-desc a:hover { text-decoration: underline; }

.cc-cookie-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

.cc-cookie-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 800;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cc-cookie-btn:hover { transform: translateY(-1px); }

.cc-cookie-btn-primary { background: var(--purple); color: #fff; }
.cc-cookie-btn-primary:hover { background: var(--purple-deep); }

.cc-cookie-btn-ghost {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid var(--dark-border);
}
.cc-cookie-btn-ghost:hover { border-color: var(--purple); color: var(--purple-light); }

.cc-cookie-btn-text { background: transparent; color: #9ca3af; padding: 11px 8px; }
.cc-cookie-btn-text:hover { color: var(--purple-light); transform: none; }

.cc-cookie-customize {
    max-width: 1100px;
    margin: 18px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--dark-border);
    display: none;
    flex-direction: column;
    gap: 14px;
}
.cc-cookie-customize.visible { display: flex; }

.cc-cookie-cat { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cookie-cat-info  { flex: 1; min-width: 0; }
.cc-cookie-cat-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.cc-cookie-cat-desc  { font-size: 12px; color: #9ca3af; line-height: 1.5; }

.cc-cookie-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.cc-cookie-switch input { opacity: 0; width: 0; height: 0; }
.cc-cookie-slider {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.cc-cookie-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.cc-cookie-switch input:checked + .cc-cookie-slider { background: var(--purple); }
.cc-cookie-switch input:checked + .cc-cookie-slider::before { transform: translateX(18px); }
.cc-cookie-switch-locked .cc-cookie-slider { cursor: not-allowed; opacity: 0.6; }

.cc-cookie-save-btn { align-self: flex-end; }

@media (max-width: 720px) {
    .cc-cookie-banner { padding: 16px; }
    .cc-cookie-inner { flex-direction: column; align-items: stretch; gap: 16px; }
    .cc-cookie-actions { justify-content: stretch; }
    .cc-cookie-actions .cc-cookie-btn { flex: 1; text-align: center; }
    .cc-cookie-btn-text { flex: 0 0 auto; }
}
