/* ==========================================================================
   Festival-App (Footer/Sub.html, Abschnitt FestivalApp;
   JavaScript/FestivalApp/app.js): Einblendung, Fenster, Sterne im
   Spielplan, Offline-Hinweis. Fenster und Schalter in der Form des
   Barrierefreiheits-Menues (site-a11y.css): dunkle Flaeche, Markenkante.
   ========================================================================== */

/* Einblendung: klein, unten mittig, zwischen Barrierefreiheits-Knopf
   (links) und Nach-oben-Knopf (rechts). */
.dd-app-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 1029;
    display: flex;
    align-items: stretch;
    width: min(30rem, calc(100vw - 168px));
    transform: translateX(-50%);
    border: 2px solid var(--fest-primary, #175da9);
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--fest-dunkel, #14181f) 94%, transparent);
    color: #fff;
    box-shadow: var(--fest-schatten, 0 8px 24px -12px rgba(20, 24, 31, 0.4));
    backdrop-filter: blur(6px);
    font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
    font-size: 0.9rem;
    line-height: 1.3;
    animation: dd-app-in 300ms ease-out;
}

.dd-app-toast[hidden] {
    display: none;
}

@keyframes dd-app-in {
    from { opacity: 0; transform: translate(-50%, 1rem); }
}

.dd-app-toast__open {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.dd-app-toast__open > .bi {
    font-size: 1.3rem;
}

.dd-app-toast__text {
    flex: 1;
    min-width: 0;
}

.dd-app-toast__cta {
    flex: none;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--fest-primary, #175da9);
    color: var(--fest-on-primary, #fff);
    font-weight: 700;
}

.dd-app-toast__close {
    flex: none;
    width: 44px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 999px 999px 0;
    background: transparent;
    color: #fff;
}

@media (max-width: 575.98px) {
    .dd-app-toast {
        left: 76px;
        right: 12px;
        width: auto;
        transform: none;
        border-radius: 1rem;
    }

    @keyframes dd-app-in {
        from { opacity: 0; }
    }

    .dd-app-toast__close {
        border-radius: 0 1rem 1rem 0;
    }
}

@media (max-width: 767.98px) {
    body:has(.side-meta) .dd-app-toast {
        bottom: 84px;
    }
}

/* Offline: schmale Leiste oben. */
.dd-app-offline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    margin: 0;
    padding: 0.35rem 1rem;
    background: #ffd43b;
    color: #14181f;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.dd-app-offline[hidden] {
    display: none;
}

/* Fenster: rechts als Seitenleiste, auf dem Handy von unten. */
.dd-app {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(26rem, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 1.25rem;
    overflow-y: auto;
    border: 0;
    border-left: 3px solid var(--fest-primary, #175da9);
    background: var(--fest-dunkel, #14181f);
    color: #fff;
    font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .dd-app {
        inset: auto 0 0 0;
        width: 100vw;
        height: auto;
        max-height: 88dvh;
        border-left: 0;
        border-top: 3px solid var(--fest-primary, #175da9);
        border-radius: 1rem 1rem 0 0;
    }
}

.dd-app::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.dd-app__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dd-app .dd-app__title,
.dd-app .dd-app__subtitle {
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.dd-app .dd-app__title {
    font-size: 1.35rem;
}

.dd-app .dd-app__subtitle {
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.dd-app__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: transparent;
    color: #fff;
}

.dd-app__lead {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.dd-app__part {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dd-app__part[hidden],
.dd-app [hidden] {
    display: none !important;
}

.dd-app__hint {
    margin: 0.5rem 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.dd-app__hint a,
.dd-app__link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.dd-app__link {
    display: inline-flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.dd-app__options,
.dd-app__actions {
    display: grid;
    gap: 0.6rem;
}

.dd-app__actions {
    grid-template-columns: 1fr 1fr;
    margin-top: 0.75rem;
}

.dd-app__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.5rem 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--fest-radius-s, 8px);
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.dd-app__btn:hover {
    border-color: #fff;
    color: #fff;
}

.dd-app__btn--primary {
    width: 100%;
    border-color: var(--fest-primary, #175da9);
    background: var(--fest-primary, #175da9);
    color: var(--fest-on-primary, #fff);
}

.dd-app__plan {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dd-app__slot {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.25rem 0.75rem;
    padding: 0.5rem 0.6rem;
    border-left: 3px solid var(--fest-primary, #175da9);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.dd-app__slot--clash {
    border-left-color: #ffd43b;
}

.dd-app__when {
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.85rem;
    white-space: nowrap;
}

.dd-app__what {
    min-width: 0;
}

.dd-app .dd-app__what strong {
    color: #fff;
}

.dd-app__clash {
    display: block;
    color: #ffd43b;
    font-size: 0.85rem;
}

.dd-app__remove {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.dd-app__remove:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 400px) {
    .dd-app__slot {
        grid-template-columns: 1fr auto;
    }

    .dd-app__when {
        grid-column: 1 / -1;
    }
}

.dd-app button:focus-visible,
.dd-app a:focus-visible,
.dd-app-toast button:focus-visible,
.dd-app-star:focus-visible {
    outline: 3px solid #ffd43b;
    outline-offset: 2px;
}

/* Stern im Spielplan, hinter dem Namen. */
.dd-app-star {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 0.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.05rem;
    vertical-align: middle;
}

.dd-app-star:hover {
    background: rgba(0, 0, 0, 0.08);
}

.dd-app-star[aria-pressed="true"] {
    color: #e8a400;
}
