/* Cookie notice: shown until the visitor chooses; the choice is kept for a year. */

.tt-cookie {
    --tt-cookie-ink: #121922;
    --tt-cookie-muted: #5b6676;
    --tt-cookie-surface: rgba(255, 255, 255, .97);
    --tt-cookie-border: rgba(18, 25, 34, .1);
    --tt-cookie-accent: #ff671d;
    position: fixed;
    z-index: 120;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 4px 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--tt-cookie-border);
    border-radius: 22px;
    color: var(--tt-cookie-ink);
    background: var(--tt-cookie-surface);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .22), 0 2px 8px rgba(15, 23, 42, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .28s ease, transform .34s cubic-bezier(.22, 1, .36, 1);
}

.tt-cookie[hidden] {
    display: none;
}

.tt-cookie.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* The mobile tab bar occupies the bottom edge: sit just above it. */
body.has-tt-tabbar .tt-cookie {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
}

.tt-cookie__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    color: #c2410c;
    background: rgba(255, 103, 29, .12);
}

.tt-cookie__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tt-cookie__body strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.tt-cookie__body p {
    margin: 3px 0 0;
    color: var(--tt-cookie-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.tt-cookie__body a {
    color: #c2410c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tt-cookie__actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.tt-cookie__button {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--tt-cookie-border);
    border-radius: 999px;
    color: var(--tt-cookie-ink);
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 750;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s ease, transform .2s ease;
}

.tt-cookie__button:hover {
    background: rgba(18, 25, 34, .05);
}

.tt-cookie__button:active {
    transform: scale(.98);
}

.tt-cookie__button--primary {
    border-color: transparent;
    color: #fff;
    background: var(--tt-cookie-accent);
    box-shadow: 0 8px 20px rgba(255, 90, 20, .3);
}

.tt-cookie__button--primary:hover {
    background: #f25a10;
}

.tt-cookie__button:focus-visible,
.tt-cookie__body a:focus-visible {
    outline: 2px solid var(--tt-cookie-accent);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .tt-cookie {
        right: auto;
        bottom: 20px;
        left: 20px;
        width: 460px;
    }

    body.has-tt-tabbar .tt-cookie {
        bottom: 20px;
    }
}

html[data-theme="dark"] .tt-cookie {
    --tt-cookie-ink: #edf3fb;
    --tt-cookie-muted: #a9b6c8;
    --tt-cookie-surface: rgba(16, 27, 42, .97);
    --tt-cookie-border: rgba(255, 255, 255, .12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}

html[data-theme="dark"] .tt-cookie__icon {
    color: #ff9460;
    background: rgba(255, 122, 56, .18);
}

html[data-theme="dark"] .tt-cookie__body a {
    color: #ff9460;
}

html[data-theme="dark"] .tt-cookie__button:hover {
    background: rgba(255, 255, 255, .08);
}

@media (prefers-reduced-motion: reduce) {
    .tt-cookie,
    .tt-cookie__button {
        transition: none;
    }
}

/* Phones: a compact strip above the tab bar instead of half the screen. */
@media (max-width: 640px) {
    .tt-cookie {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .tt-cookie__icon {
        display: none;
    }

    .tt-cookie__body strong {
        font-size: 14px;
    }

    .tt-cookie__body p {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .tt-cookie__actions {
        margin-top: 8px;
    }

    .tt-cookie__button {
        min-height: 40px;
        font-size: 13px;
    }
}

.tt-cookie__body a {
    display: inline-block;
    padding: 6px 0;
    margin: -6px 0;
}
