/*
 * Cookie banner and the film preview shown before YouTube is allowed. app.css is a precompiled
 * Tailwind build without the utilities these need, so they are styled here with its colour tokens.
 */

/* Cookie banner: a small, non-blocking card in the bottom right corner. */
.cookie-banner {
    position: fixed;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 60;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

@media (min-width: 640px) {
    .cookie-banner {
        right: 1.25rem;
        bottom: 1.25rem;
        left: auto;
    }
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner__panel {
    width: 100%;
    max-width: 21rem;
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
    padding: 1rem 1.125rem 0.875rem;
    background: #fff;
    border: 1px solid oklch(var(--background-200));
    border-radius: 0.625rem;
    box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.28);
    pointer-events: auto;
    animation: cookie-banner-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cookie-banner__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: oklch(var(--foreground-950));
}

.cookie-banner__text {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    line-height: 1.55;
    color: oklch(var(--foreground-700));
}

.cookie-banner__text a {
    color: oklch(var(--primary-600));
    text-decoration: underline;
}

.cookie-banner__options {
    margin-top: 0.625rem;
}

.cookie-banner__options[hidden] {
    display: none;
}

.cookie-banner__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-top: 1px solid oklch(var(--background-200));
    font-size: 0.75rem;
    color: oklch(var(--foreground-700));
    cursor: pointer;
}

.cookie-banner__option strong {
    font-weight: 600;
    color: oklch(var(--foreground-950));
}

.cookie-banner__option input {
    flex-shrink: 0;
    width: 0.9375rem;
    height: 0.9375rem;
    accent-color: oklch(var(--primary-500));
    cursor: pointer;
}

.cookie-banner__option input:disabled {
    cursor: not-allowed;
}

/* "Nur notwendige" and "Alle akzeptieren" look identical on purpose: neither choice is nudged. */
.cookie-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.cookie-banner__button {
    padding: 0.5rem 0.625rem;
    border: 0;
    border-radius: 0.375rem;
    background: oklch(var(--primary-500));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cookie-banner__button:hover {
    background: oklch(var(--primary-600));
}

.cookie-banner__button--wide {
    grid-column: 1 / -1;
}

.cookie-banner__link {
    display: block;
    margin: 0.5rem auto 0;
    padding: 0.125rem 0.25rem;
    border: 0;
    background: none;
    font-size: 0.6875rem;
    color: oklch(var(--foreground-700));
    text-decoration: underline;
    cursor: pointer;
}

.cookie-banner__link:hover {
    color: oklch(var(--primary-600));
}

.cookie-banner__button[hidden],
.cookie-banner__link[hidden] {
    display: none;
}

.cookie-banner__button:focus-visible,
.cookie-banner__link:focus-visible,
.film-poster__play:focus-visible {
    outline: 3px solid oklch(var(--primary-300));
    outline-offset: 2px;
}

@keyframes cookie-banner-in {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: none; }
}

/* Film preview: still image with a play button that loads the YouTube player. */
.film-poster__shade {
    background: linear-gradient(to top, rgb(0 0 0 / 0.65), rgb(0 0 0 / 0.2));
}

.film-poster__play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    padding-left: 0.25rem;
    border-radius: 9999px;
    background: oklch(var(--primary-500));
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.6);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

@media (min-width: 768px) {
    .film-poster__play {
        width: 5rem;
        height: 5rem;
        font-size: 2.5rem;
    }
}

.film-poster__play:hover {
    background: oklch(var(--primary-600));
    transform: scale(1.08);
}

.film-poster__note a {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner__panel {
        animation: none;
    }

    .film-poster__play:hover {
        transform: none;
    }
}
