/* FlatFlash cookie consent — marketing site.
   Deliberately small and non-modal: the banner is a bottom bar, never an
   overlay, and the page stays scrollable/clickable while it is visible. */

:root {
    --ffc-bg: #111730;
    --ffc-border: rgba(255, 255, 255, 0.08);
    --ffc-text: #e8ecf4;
    --ffc-muted: #8892b0;
    --ffc-accent: #ff5e3a;
    --ffc-accent-dim: #e84d2a;
    --ffc-offset: 0px;
}

.ffc {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 90;
    background: var(--ffc-bg);
    border-top: 1px solid var(--ffc-border);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ffc[hidden] {
    display: none !important;
}

.ffc__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ffc__copy {
    min-width: 0;
}

.ffc__title {
    margin: 0 0 0.15rem;
    color: var(--ffc-text);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
}

.ffc__text {
    margin: 0;
    color: var(--ffc-muted);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.75rem;
    line-height: 1.45;
}

.ffc__text a {
    color: var(--ffc-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ffc__text a:hover {
    color: #fff;
}

.ffc-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ffc-link:hover {
    color: #fff;
}

.ffc-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.ffc__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ffc-btn {
    appearance: none;
    border: 1px solid var(--ffc-border);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--ffc-text);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ffc-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.ffc-btn--quiet {
    color: var(--ffc-text);
}

.ffc-btn--primary {
    background: var(--ffc-accent);
    border-color: var(--ffc-accent);
    color: #fff;
}

.ffc-btn--primary:hover {
    background: var(--ffc-accent-dim);
    border-color: var(--ffc-accent-dim);
}

.ffc-btn:focus-visible,
.ffc-link:focus-visible,
.ffc-switch:focus-visible,
.ffc-modal__close:focus-visible {
    outline: 2px solid var(--ffc-accent);
    outline-offset: 2px;
}

/* The bar is fixed, so reserve its height at the end of the document and
   lift the mobile CTA above it instead of covering either one. */
body.ffc-open {
    padding-bottom: var(--ffc-offset, 0px);
}

body.ffc-open #mobile-cta {
    bottom: var(--ffc-offset, 0px);
}

/* Settings dialog (only when the visitor explicitly opens it). */
.ffc-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ffc-modal[hidden] {
    display: none !important;
}

.ffc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 18, 0.72);
    backdrop-filter: blur(4px);
}

.ffc-modal__panel {
    position: relative;
    width: 100%;
    max-width: 34rem;
    max-height: 85vh;
    overflow: auto;
    background: #161c38;
    border: 1px solid var(--ffc-border);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    font-family: "Inter", system-ui, sans-serif;
}

.ffc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ffc-modal__head h2 {
    margin: 0;
    color: #fff;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 1.1rem;
    line-height: 1.3;
}

.ffc-modal__close {
    appearance: none;
    background: none;
    border: 0;
    color: var(--ffc-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.ffc-modal__intro {
    margin: 0.5rem 0 1rem;
    color: var(--ffc-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.ffc-cat {
    border-top: 1px solid var(--ffc-border);
    padding: 0.9rem 0;
}

.ffc-cat__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ffc-cat__name {
    margin: 0 0 0.2rem;
    color: var(--ffc-text);
    font-size: 0.82rem;
    font-weight: 600;
}

.ffc-cat__desc {
    margin: 0;
    color: var(--ffc-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.ffc-badge {
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ffc-muted);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.55rem;
    white-space: nowrap;
}

.ffc-switch {
    flex-shrink: 0;
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ffc-switch span {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #aab3cc;
    transform: translateY(-50%);
    transition: inset-inline-start 0.15s ease, background 0.15s ease;
}

.ffc-switch[aria-checked="true"] {
    background: var(--ffc-accent);
    border-color: var(--ffc-accent);
}

.ffc-switch[aria-checked="true"] span {
    inset-inline-start: calc(100% - 1.2rem);
    background: #fff;
}

.ffc-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid var(--ffc-border);
    padding-top: 1rem;
}

@media (max-width: 720px) {
    .ffc__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 0.65rem;
    }

    .ffc__actions {
        width: 100%;
    }

    .ffc__actions .ffc-btn {
        flex: 1;
        text-align: center;
        padding: 0.65rem 0.5rem;
    }

    .ffc-modal {
        align-items: flex-end;
        padding: 0;
    }

    .ffc-modal__panel {
        max-height: 92vh;
        border-radius: 1rem 1rem 0 0;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ffc-btn,
    .ffc-switch,
    .ffc-switch span {
        transition: none;
    }
}
