/* ==========================================================
   RADIO LEVICO – Master-Player
   Gemeinsam fuer index.php, indexDE.php und indexES.php.
   Desktop: so hoch wie der Inhalt, nie hoeher als eine Bildschirmhoehe
   abzueglich der Sticky-Zitate (--lr-sticky wird per JS gemessen).
   Handy: fuellt genau diese Hoehe.
   ========================================================== */
.lr {
    --lr-gold: #FFD700;
    --lr-pink: #FF00FF;
    --lr-text: #FFFFFF;
    --lr-muted: rgba(255,255,255,0.7);
    --lr-glass: rgba(10,12,18,0.58);
    --lr-line: rgba(255,255,255,0.14);
    --lr-sticky: 72px;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--lr-sticky));
    max-height: calc(100svh - var(--lr-sticky));
    padding: 22px 24px 28px;
    overflow: hidden;
    background: #000;
    border-top: 3px solid var(--lr-gold);
    border-bottom: 3px solid var(--lr-gold);
    color: var(--lr-text);
    font-family: Arial, Helvetica, sans-serif;
    scroll-margin-top: var(--lr-sticky);
}

.lr,
.lr *,
.lr *::before,
.lr *::after {
    box-sizing: border-box;
}

/* Hintergrund: zwei Ebenen fuer weiche Ueberblendung beim Songwechsel */
.lr-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.lr-bg.is-visible {
    opacity: 1;
}

/* Songs ohne Parallax-Bild: weichgezeichnetes Cover */
.lr-bg.is-blur {
    inset: -80px;
    filter: blur(48px) saturate(1.25);
}

.lr-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0.7) 100%);
}

.lr-inner {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.lr-heading {
    flex: 0 0 auto;
    margin: 0 0 18px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 6px;
    text-align: center;
    text-transform: uppercase;
    color: var(--lr-gold);
    text-shadow: 0 2px 18px rgba(0,0,0,0.7), 0 0 24px rgba(255,215,0,0.25);
}

/* Glas-Panel */
.lr-panel {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 28px 28px;
    background: var(--lr-glass);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--lr-line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

/* Player: Wellenform + Bedienung */
.lr-player {
    flex: 0 0 auto;
}

.lr-wave {
    display: block;
    width: 100%;
    height: 72px;
    cursor: pointer;
    touch-action: none;
    border-radius: 4px;
}

.lr-wave:focus-visible {
    outline: 2px solid var(--lr-gold);
    outline-offset: 3px;
}

.lr-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.lr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.lr-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--lr-text);
}

.lr-btn:hover {
    background: rgba(255,255,255,0.12);
}

.lr-btn:focus-visible,
.lr-nerd-btn:focus-visible,
.lr-dialog-close:focus-visible {
    outline: 2px solid var(--lr-gold);
    outline-offset: 2px;
}

.lr-play {
    width: 52px;
    height: 52px;
    background: var(--lr-pink);
    box-shadow: 0 6px 22px rgba(255,0,255,0.35);
}

.lr-play:hover {
    background: var(--lr-pink);
    transform: scale(1.07);
}

.lr-time {
    margin-left: 6px;
    font-size: 13px;
    color: var(--lr-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lr-volume {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.lr-volume .lr-btn svg {
    width: 20px;
    height: 20px;
}

.lr-volume input {
    width: 110px;
    accent-color: var(--lr-pink);
    cursor: pointer;
}

/* Songinfos: links Titel + Cover, rechts die Beschreibung buendig mit der Cover-Oberkante */
.lr-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 384px minmax(0, 1fr);
    grid-template-rows: auto minmax(180px, 384px) auto;
    grid-template-areas:
        "meta  ."
        "cover about"
        "cart  about";
    column-gap: 36px;
}

.lr-side {
    display: contents;
}

.lr-meta {
    grid-area: meta;
    margin-bottom: 16px;
}

.lr-title {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    line-height: 1.15;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lr-artist {
    margin: 5px 0 0;
    font-size: 15px;
    color: var(--lr-muted);
}

.lr-tags {
    margin: 8px 0 0;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--lr-gold);
}

.lr-tags:empty {
    display: none;
}

/* Cover: max. 384px, wird bei wenig Hoehe kleiner (bleibt quadratisch) */
.lr-cover-box {
    grid-area: cover;
    min-height: 0;
    container-type: size;
}

.lr-cover-frame {
    width: min(100cqw, 100cqh);
    height: min(100cqw, 100cqh);
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.lr-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Platz fuer "Add to Cart" (folgt) */
.lr-cart {
    grid-area: cart;
    margin-top: 16px;
}

.lr-cart:empty {
    display: none;
}

.lr-about {
    grid-area: about;
    position: relative;
    min-width: 0;
}

.lr-about[hidden] {
    display: none;
}

.lr-about-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.lr-desc {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-top: -6px;
    padding-right: 8px;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.lr-desc i {
    color: #fff;
}

.lr-fade {
    animation: lr-fade-in 0.5s ease;
}

@keyframes lr-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.lr-nerd-btn {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 18px;
    padding: 9px 18px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 22px;
    color: var(--lr-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lr-nerd-btn:hover {
    border-color: var(--lr-pink);
    color: var(--lr-pink);
}

.lr-nerd-btn[hidden] {
    display: none;
}

/* "Infos fuer Nerds" */
.lr-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: min(80vh, 640px);
    padding: 0;
    background: rgba(16,18,26,0.96);
    border: 1px solid var(--lr-line);
    border-radius: 16px;
    color: var(--lr-text);
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lr-dialog::backdrop {
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.lr-dialog-head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    background: rgba(16,18,26,0.98);
    border-bottom: 1px solid var(--lr-line);
}

.lr-dialog-title {
    margin: 0;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--lr-gold);
}

.lr-dialog-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: var(--lr-text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.lr-dialog-close:hover {
    background: rgba(255,255,255,0.18);
}

.lr-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 9px 18px;
    margin: 0;
    padding: 16px 20px 22px;
    font-size: 14px;
}

.lr-details dt {
    color: var(--lr-muted);
}

.lr-details dd {
    margin: 0;
    font-weight: bold;
}

/* "LISTEN TO DEMO"-Knoepfe in den Song-Abschnitten */
.radio-demo-btn {
    display: inline-block;
    margin: 4px 0 16px;
    padding: 8px 20px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 24px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.radio-demo-btn:hover {
    background: #FF00FF;
    border-color: #FF00FF;
}

/* Flache Desktop-Bildschirme (z. B. Laptop 1366x768): kompakter, damit das Cover gross bleibt */
@media (min-width: 900px) and (max-height: 860px) {
    .lr {
        padding-top: 14px;
        padding-bottom: 16px;
    }
    .lr-heading {
        margin-bottom: 12px;
        font-size: 26px;
    }
    .lr-panel {
        gap: 16px;
        padding: 18px 24px 22px;
    }
    .lr-wave {
        height: 56px;
    }
    .lr-controls {
        margin-top: 8px;
    }
    .lr-play {
        width: 46px;
        height: 46px;
    }
    .lr-meta {
        margin-bottom: 12px;
    }
    .lr-title {
        font-size: 22px;
    }
}

/* Handy und schmale Tablets: alles untereinander, Titel liegt auf dem Cover */
@media (max-width: 899px) {
    .lr {
        height: calc(100vh - var(--lr-sticky));
        height: calc(100svh - var(--lr-sticky));
        min-height: 420px;
        padding: 8px 10px 10px;
    }
    .lr-inner {
        justify-content: flex-start;
    }
    .lr-heading {
        margin-bottom: 8px;
        font-size: 22px;
        letter-spacing: 4px;
    }
    .lr-panel {
        flex: 1 1 auto;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }
    .lr-wave {
        height: 44px;
    }
    .lr-controls {
        gap: 4px;
        margin-top: 4px;
    }
    .lr-btn {
        width: 36px;
        height: 36px;
    }
    .lr-play {
        width: 44px;
        height: 44px;
    }
    .lr-time {
        margin-left: 4px;
        font-size: 12px;
    }
    .lr-volume input {
        width: 76px;
    }
    .lr-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .lr-side {
        flex: 0 1 min(340px, calc(100vw - 46px));
        min-height: 150px;
        display: grid;
        grid-template: "stack" 100% / 100%;
        container-type: size;
    }
    .lr-cover-box {
        grid-area: stack;
        display: flex;
        justify-content: center;
        min-height: 0;
        container-type: normal;
    }
    .lr-meta {
        grid-area: stack;
        z-index: 1;
        align-self: end;
        justify-self: center;
        width: min(100cqw, 100cqh);
        margin: 0;
        padding: 36px 14px 12px;
        background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
        border-radius: 0 0 12px 12px;
    }
    .lr-title {
        font-size: 18px;
    }
    .lr-artist {
        margin-top: 3px;
        font-size: 13px;
    }
    .lr-tags {
        margin-top: 4px;
        font-size: 11px;
    }
    .lr-cart {
        display: none;
    }
    .lr-about {
        flex: 1 1 0;
        min-height: 104px;
        margin-top: 10px;
    }
    .lr-desc {
        margin-top: 0;
        font-size: 14px;
        line-height: 1.55;
        -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
        padding-bottom: 10px;
    }
    .lr-nerd-btn {
        margin-top: 6px;
        padding: 6px 14px;
        font-size: 11px;
    }
}
