/* ConsultADHD — cookie consent banner */

#cookieRoot {
    position: fixed;
    z-index: 9200;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    pointer-events: none;
    font-family: 'DM Sans', sans-serif;
}

#cookieRoot.open {
    pointer-events: auto;
}

.cookie-banner {
    max-width: 920px;
    margin: 0 auto;
    background: #F2EFE9;
    border: 1.5px solid rgba(11, 47, 35, 0.12);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(11, 47, 35, 0.22);
    padding: 18px 20px;
    animation: cookieIn 0.28s ease both;
}

@keyframes cookieIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-main {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.cookie-copy {
    flex: 1 1 280px;
    min-width: 0;
}

.cookie-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0B2F23;
    letter-spacing: -0.02em;
}

.cookie-text {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: #4a6358;
    line-height: 1.5;
}

.cookie-text a {
    color: #039172;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-actions,
.cookie-prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.cookie-btn {
    border-radius: 50px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cookie-btn:focus-visible {
    outline: 3px solid #039172;
    outline-offset: 2px;
}

.cookie-btn-primary {
    background: #039172;
    color: #fff;
    border-color: #039172;
}
.cookie-btn-primary:hover {
    background: #027a5f;
    border-color: #027a5f;
}

.cookie-btn-ghost {
    background: #fff;
    color: #0B2F23;
    border-color: rgba(11, 47, 35, 0.14);
}
.cookie-btn-ghost:hover {
    background: rgba(3, 145, 114, 0.08);
    border-color: rgba(3, 145, 114, 0.35);
}

.cookie-prefs {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(11, 47, 35, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
    border: 1.5px solid rgba(11, 47, 35, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
}

.cookie-toggle strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0B2F23;
    margin-bottom: 2px;
}

.cookie-toggle small {
    display: block;
    font-size: 0.75rem;
    color: #4a6358;
    font-weight: 500;
    line-height: 1.35;
}

.cookie-toggle input {
    width: 42px;
    height: 24px;
    accent-color: #039172;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-toggle input:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-prefs-actions {
    margin-top: 4px;
}

/* Leave room for the accessibility FAB on the left */
@media (min-width: 721px) {
    #cookieRoot {
        padding-left: 200px;
    }
    html[data-a11y-hide-fab] #cookieRoot {
        padding-left: 16px;
    }
}

@media (max-width: 720px) {
    #cookieRoot {
        padding: 12px 12px calc(12px + 72px);
    }
    .cookie-main {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-actions,
    .cookie-prefs-actions {
        justify-content: stretch;
    }
    .cookie-actions .cookie-btn,
    .cookie-prefs-actions .cookie-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

html[data-a11y-colour="dark"] .cookie-banner {
    background: #162821;
    border-color: rgba(255, 255, 255, 0.1);
    color: #eef6f2;
}
html[data-a11y-colour="dark"] .cookie-title,
html[data-a11y-colour="dark"] .cookie-toggle strong {
    color: #eef6f2;
}
html[data-a11y-colour="dark"] .cookie-text,
html[data-a11y-colour="dark"] .cookie-toggle small {
    color: #a8c0b4;
}
html[data-a11y-colour="dark"] .cookie-toggle,
html[data-a11y-colour="dark"] .cookie-btn-ghost {
    background: #0f1c18;
    color: #eef6f2;
    border-color: rgba(255, 255, 255, 0.14);
}

html[data-a11y-colour="softyellow"] .cookie-banner {
    background: #FFF8DC;
}

@media print {
    #cookieRoot { display: none !important; }
}
