/* ══════════════════════════════════════════
   cookie-consent.css
   GDPR Banner & Preferences Modal
   Matches Thermophi brand: teal #00b0f0, dark #0d1720

   Sections:
   1.  Banner
   2.  Banner buttons
   3.  Settings modal backdrop
   4.  Settings modal layout
   5.  Toggle switches
   6.  Responsive
══════════════════════════════════════════ */


/* ══════════════════════════════════════════
   1. BANNER
   Slides up from the bottom of the viewport
══════════════════════════════════════════ */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: #0d1720;
    border-top: 2px solid #00b0f0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);

    /* Start hidden below viewport */
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#cookie-banner.cb-visible { transform: translateY(0); }
#cookie-banner.cb-hidden  { transform: translateY(110%); transition-duration: 0.3s; }

.cb-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* ── Text block ── */
.cb-text { flex: 1; min-width: 260px; }

.cb-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-title i { color: #00b0f0; font-size: 1rem; }

.cb-body {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin: 0;
}

.cb-link {
    color: #00b0f0;
    text-decoration: none;
    font-weight: 500;
}
.cb-link:hover { text-decoration: underline; }

/* ── Button row ── */
.cb-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}


/* ══════════════════════════════════════════
   2. BANNER BUTTONS
   Shared .cb-btn + modifier classes
   Also used inside the settings modal footer
══════════════════════════════════════════ */
.cb-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

/* Manage preferences (ghost style) */
.cb-btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}
.cb-btn-settings:hover {
    border-color: #00b0f0;
    color: #00b0f0;
}

/* Reject all */
.cb-btn-reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
}
.cb-btn-reject:hover {
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Accept all (filled teal) */
.cb-btn-accept {
    background: #00b0f0;
    color: #ffffff;
    border-color: #00b0f0;
}
.cb-btn-accept:hover {
    background: #00c8ff;
    border-color: #00c8ff;
    transform: translateY(-1px);
}


/* ══════════════════════════════════════════
   3. SETTINGS MODAL — BACKDROP
══════════════════════════════════════════ */
#cookie-settings {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#cookie-settings.cs-visible { display: flex; }

.cs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 14, 18, 0.78);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}


/* ══════════════════════════════════════════
   4. SETTINGS MODAL — LAYOUT & CONTENT
══════════════════════════════════════════ */
.cs-modal {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    margin: 16px;

    /* Entrance animation */
    animation: csModalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes csModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Header ── */
.cs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 30px 18px;
    border-bottom: 1px solid rgba(18, 44, 52, 0.08);
}

.cs-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0d1720;
    margin: 0;
}

.cs-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #7a8fa0;
    padding: 6px 8px;
    border-radius: 8px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}
.cs-close:hover {
    color: #0d1720;
    background: rgba(18, 44, 52, 0.07);
}

/* ── Body ── */
.cs-body { padding: 22px 30px; }

.cs-intro {
    font-size: 0.86rem;
    color: #4a6070;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ── Cookie category rows ── */
.cs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(18, 44, 52, 0.07);
}
.cs-row:last-child { border-bottom: none; }

.cs-row-info { flex: 1; }

.cs-row-info strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0d1720;
    margin-bottom: 4px;
}

.cs-row-info p {
    font-size: 0.79rem;
    color: #7a8fa0;
    line-height: 1.55;
    margin: 0;
}

.cs-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.cs-always {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00b0f0;
}

/* ── Footer ── */
.cs-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 30px;
    border-top: 1px solid rgba(18, 44, 52, 0.08);
    background: #f4f6f8;
    border-radius: 0 0 18px 18px;
}

/* Override reject button colours for light modal context */
.cs-footer .cb-btn-reject {
    color: #4a6070;
    border-color: rgba(18, 44, 52, 0.2);
}
.cs-footer .cb-btn-reject:hover {
    border-color: #0d1720;
    color: #0d1720;
}


/* ══════════════════════════════════════════
   5. TOGGLE SWITCHES
══════════════════════════════════════════ */
.cs-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.cs-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cs-slider {
    position: absolute;
    inset: 0;
    background: rgba(18, 44, 52, 0.15);
    border-radius: 26px;
    transition: background 0.25s ease;
}

.cs-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.cs-toggle input:checked + .cs-slider {
    background: #00b0f0;
}

.cs-toggle input:checked + .cs-slider::before {
    transform: translateX(20px);
}

/* Focus ring for keyboard accessibility */
.cs-toggle input:focus-visible + .cs-slider {
    outline: 2px solid #00b0f0;
    outline-offset: 2px;
}

/* Disabled (essential cookies) */
.cs-toggle-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}


/* ══════════════════════════════════════════
   6. RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 767px) {

    .cb-inner {
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cb-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cs-modal { margin: 8px; }

    .cs-header,
    .cs-body,
    .cs-footer { padding-left: 20px; padding-right: 20px; }

    .cs-footer { flex-direction: row; }

}