/* SecondRadio PWA App-Shell -- handgepflegt, kein SCSS/Grunt.
   Farbsystem 1:1 aus der Flutter-App (orangeAccent, Dark=Schwarz, Light=grey.200). */

:root {
    --sr-accent: #ffab40;              /* Colors.orangeAccent */
    --sr-disabled: #9e9e9e;            /* Colors.grey */
    --sr-tabbar-h: 62px;
    --sr-header-h: 56px;
    --sr-safe-top: env(safe-area-inset-top, 0px);
    --sr-safe-bottom: env(safe-area-inset-bottom, 0px);

    /* Dark (Default) */
    --sr-bg: #000000;
    --sr-text: #ffffff;                /* onBgPrimary */
    --sr-text-dim: rgba(255, 255, 255, 0.70);  /* onBgSecondary white70 */
    --sr-divider: rgba(255, 255, 255, 0.24);   /* white24 */
    --sr-surface: rgba(255, 255, 255, 0.06);
    --sr-surface-2: rgba(255, 255, 255, 0.10);
    --sr-vol-inactive: rgba(255, 255, 255, 0.24);
    color-scheme: dark;
}

[data-bs-theme="light"] {
    color-scheme: light;
    --sr-bg: #eeeeee;                  /* grey.shade200 */
    --sr-text: rgba(0, 0, 0, 0.87);    /* black87 */
    --sr-text-dim: rgba(0, 0, 0, 0.54);/* black54 */
    --sr-divider: rgba(0, 0, 0, 0.26); /* black26 */
    --sr-surface: rgba(0, 0, 0, 0.05);
    --sr-surface-2: rgba(0, 0, 0, 0.09);
    --sr-vol-inactive: rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body.sr-pwa {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--sr-text);
    background: var(--sr-bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.sr-pwa-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 640px;
    margin: 0 auto;
    background: var(--sr-bg);
    position: relative;
}

/* ---------- Kopf (AppBar-Titel je Tab) ---------- */
.sr-pwa-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--sr-header-h) + var(--sr-safe-top));
    padding: calc(var(--sr-safe-top) + 6px) 16px 6px;
    flex: 0 0 auto;
}
.sr-pwa-header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--sr-text);
}

/* ---------- Scroll-Bereich / Panels ---------- */
.sr-pwa-main {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.sr-pwa-panel { animation: srPwaFade 0.2s ease; }
.sr-pwa-panel[hidden] { display: none; }
@keyframes srPwaFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Player-Tab ---------- */
.sr-pwa-panel--player {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.sr-pwa-player {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 20px 4px;
    gap: 14px;
}
.sr-pwa-cover-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}
.sr-pwa-cover {
    height: 34vh;
    max-height: 320px;
    max-width: 100%;
    object-fit: contain;
}
.sr-pwa-track-title {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--sr-text);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sr-pwa-track-show {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--sr-text-dim);
}
.sr-pwa-track-show strong { color: var(--sr-accent); font-weight: 700; }
.sr-pwa-quality {
    margin: -8px 0 0;
    font-size: 12px;
    color: var(--sr-text-dim);
}

/* ---------- Steuerleiste (pinned unten im Player-Tab) ---------- */
.sr-pwa-controls {
    flex: 0 0 auto;
    border-top: 1px solid var(--sr-divider);
    padding: 12px 16px 14px;
}
.sr-pwa-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}
.sr-pwa-cbtn {
    border: none;
    background: transparent;
    color: var(--sr-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: transform 0.12s ease, color 0.15s ease;
}
.sr-pwa-cbtn:active { transform: scale(0.9); }
.sr-pwa-cbtn--play i,
.sr-pwa-cbtn--stop i { font-size: 52px; }
.sr-pwa-cbtn--info i { font-size: 33px; }
.sr-pwa-cbtn.is-disabled { color: var(--sr-disabled); cursor: default; }
.sr-pwa-cbtn.is-disabled:active { transform: none; }

.sr-pwa-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.sr-pwa-volume .sr-pwa-vol-btn {
    border: none;
    background: transparent;
    color: var(--sr-text);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    display: flex;
}
.sr-pwa-volume .sr-pwa-vol-up { color: var(--sr-text); font-size: 22px; }
.sr-pwa-volume input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 999px;
    background: var(--sr-vol-inactive);
    outline: none;
    --vol: 50%;
    background-image: linear-gradient(var(--sr-accent), var(--sr-accent));
    background-size: var(--vol) 100%;
    background-repeat: no-repeat;
}
.sr-pwa-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sr-accent);
    cursor: pointer;
}
.sr-pwa-volume input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: var(--sr-accent);
    cursor: pointer;
}
/* Safari/iOS: keine programmatische Volume-Kontrolle -> Slider ausblenden
   (sr-no-volume via Feature-Test, is-ios als UA-Fallback). */
.sr-pwa.is-ios .sr-pwa-volume,
.sr-pwa.sr-no-volume .sr-pwa-volume { display: none; }

/* ---------- Generische Panels (Programm/Playlist/Mehr) ---------- */
.sr-pwa-panel--scroll {
    padding: 4px 14px calc(var(--sr-tabbar-h) + var(--sr-safe-bottom) + 16px);
}
.sr-pwa-panel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 14px;
}

.sr-pwa-date-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--sr-surface-2);
    border-radius: 999px;
    padding: 4px;
    margin: 0 auto;
}
.sr-pwa-date-nav button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--sr-text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sr-pwa-date-nav button:active { background: var(--sr-surface); }
.sr-pwa-date-nav span { font-size: 14px; font-weight: 700; min-width: 110px; text-align: center; }

.sr-pwa-select {
    width: 100%;
    background: var(--sr-surface-2);
    color: var(--sr-text);
    border: 1px solid var(--sr-divider);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 600;
}
.sr-pwa-select option {
    background-color: var(--sr-bg);
    color: var(--sr-text);
}

/* Listen (Programm + Playlist) */
.sr-pwa-list { display: flex; flex-direction: column; gap: 10px; }
.sr-pwa-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--sr-surface);
    border: 1px solid var(--sr-divider);
    border-radius: 14px;
    padding: 10px;
}
.sr-pwa-item.is-live { border-color: var(--sr-accent); background: rgba(255, 171, 64, 0.10); }
.sr-pwa-item-art {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: var(--sr-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sr-text-dim);
    font-size: 22px;
    overflow: hidden;
}
.sr-pwa-item-art img { width: 100%; height: 100%; object-fit: cover; }
.sr-pwa-item-body { flex: 1 1 auto; min-width: 0; }
.sr-pwa-item-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.sr-pwa-item-sub { margin: 2px 0 0; font-size: 13px; color: var(--sr-text-dim); line-height: 1.35; }
.sr-pwa-item-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--sr-text-dim);
    margin-top: 4px;
}
.sr-pwa-onair { color: var(--sr-accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.sr-pwa-item-desc {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: var(--sr-text-dim);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sr-pwa-preview {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--sr-text);
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
    transition: transform 0.15s ease;
}
.sr-pwa-preview:active { transform: scale(0.94); }
.sr-pwa-preview-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}
.sr-pwa-preview-ring-bg { fill: none; stroke: var(--sr-divider); stroke-width: 2; }
.sr-pwa-preview-ring-prog {
    fill: none;
    stroke: var(--sr-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}
.sr-pwa-preview-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 17px;
    color: var(--sr-text);
    pointer-events: none;
}
.sr-pwa-preview.is-playing,
.sr-pwa-preview.is-playing .sr-pwa-preview-icon { color: var(--sr-accent); }

.sr-pwa-empty, .sr-pwa-loading {
    text-align: center;
    color: var(--sr-text-dim);
    font-size: 14px;
    padding: 30px 10px;
}

/* Mehr: Settings + Links */
.sr-pwa-settings { margin-bottom: 18px; }
.sr-pwa-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--sr-surface);
    border: 1px solid var(--sr-divider);
    border-radius: 14px;
    padding: 14px 16px;
}
.sr-pwa-setting-label { font-size: 15px; font-weight: 700; }
.sr-pwa-setting-note { font-size: 12px; color: var(--sr-text-dim); margin-top: 2px; }
.sr-pwa-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: var(--sr-surface-2);
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 0 0 auto;
}
.sr-pwa-toggle[aria-checked="true"] { background: var(--sr-accent); }
.sr-pwa-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.sr-pwa-toggle[aria-checked="true"] .sr-pwa-toggle-knob { transform: translateX(22px); }

.sr-pwa-links { display: flex; flex-direction: column; gap: 8px; }
.sr-pwa-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: var(--sr-text);
    background: var(--sr-surface);
    border: 1px solid var(--sr-divider);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
}
.sr-pwa-link span { display: flex; align-items: center; gap: 10px; }
.sr-pwa-link span i { color: var(--sr-accent); font-size: 18px; }
.sr-pwa-link > i { color: var(--sr-text-dim); font-size: 14px; }
.sr-pwa-link:active { background: var(--sr-surface-2); }

/* ---------- Sub-Screen (Kontakt etc.) ---------- */
.sr-pwa-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--sr-tabbar-h) + var(--sr-safe-bottom));
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: var(--sr-bg);
    animation: srPwaScreenIn 0.25s ease;
}
.sr-pwa-screen[hidden] { display: none; }
@keyframes srPwaScreenIn {
    from { opacity: 0; transform: translateX(26px); }
    to { opacity: 1; transform: none; }
}
.sr-pwa-screen-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: calc(var(--sr-safe-top) + 8px) 12px 8px;
    border-bottom: 1px solid var(--sr-divider);
}
.sr-pwa-screen-back {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: var(--sr-text);
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sr-pwa-screen-title { margin: 0; font-size: 18px; font-weight: 700; }
.sr-pwa-screen-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 16px 24px;
}

/* Formular */
.sr-pwa-form-intro {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--sr-text-dim);
}
.sr-pwa-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-pwa-field { display: block; margin-bottom: 14px; }
.sr-pwa-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-text-dim);
    margin-bottom: 6px;
}
.sr-pwa-field input,
.sr-pwa-field textarea {
    width: 100%;
    background: var(--sr-surface);
    border: 1px solid var(--sr-divider);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    color: var(--sr-text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}
.sr-pwa-field input:focus,
.sr-pwa-field textarea:focus { border-color: var(--sr-accent); }
.sr-pwa-field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.sr-pwa-field input.is-invalid,
.sr-pwa-field textarea.is-invalid { border-color: #ff5a5a; }

.sr-pwa-form-msg {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 14px;
}
.sr-pwa-form-msg.is-ok {
    background: rgba(60, 180, 90, 0.15);
    color: #8be29a;
    border: 1px solid rgba(60, 180, 90, 0.4);
}
.sr-pwa-form-msg.is-err {
    background: rgba(255, 90, 90, 0.12);
    color: #ff9a9a;
    border: 1px solid rgba(255, 90, 90, 0.4);
}

.sr-pwa-form-submit {
    width: 100%;
    border: none;
    border-radius: 999px;
    background: var(--sr-accent);
    color: #000;
    font-size: 15px;
    font-weight: 700;
    padding: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sr-pwa-form-submit:active { transform: scale(0.99); }
.sr-pwa-form-submit:disabled { opacity: 0.6; cursor: default; }
.sr-pwa-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: srPwaSpin 0.8s linear infinite;
}
@keyframes srPwaSpin { to { transform: rotate(360deg); } }

/* Rechtstext (Impressum/Datenschutz) */
.sr-pwa-legal p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--sr-text);
    margin: 0 0 16px;
}
.sr-pwa-legal-h {
    font-size: 17px;
    font-weight: 700;
    margin: 22px 0 8px;
    color: var(--sr-text);
}
.sr-pwa-about-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--sr-text);
}
.sr-pwa-legal-ul {
    margin: 0 0 16px;
    padding-left: 20px;
}
.sr-pwa-legal-ul li {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--sr-text);
    margin-bottom: 2px;
}
.sr-pwa-legal-links {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}
.sr-pwa-legal-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sr-text);
    text-decoration: none;
    padding: 11px 0;
    font-size: 14.5px;
    border-bottom: 1px solid var(--sr-divider);
}
.sr-pwa-legal-link i {
    flex: 0 0 auto;
    width: 20px;
    text-align: center;
    color: var(--sr-accent);
    font-size: 16px;
}
.sr-pwa-legal-link:last-child { border-bottom: none; }
.sr-pwa-legal-cta { margin-top: 16px; }

/* ---------- Info-Modal (Interpret) ---------- */
.sr-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.sr-pwa-modal.is-open { opacity: 1; pointer-events: auto; }
.sr-pwa-modal-dialog {
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--sr-bg);
    border: 1px solid var(--sr-divider);
    border-radius: 18px 18px 0 0;
    padding: 18px 18px calc(20px + var(--sr-safe-bottom));
    transform: translateY(100%);
    transition: transform 0.25s ease;
}
.sr-pwa-modal.is-open .sr-pwa-modal-dialog { transform: none; }
.sr-pwa-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.sr-pwa-modal-title { margin: 0; font-size: 18px; font-weight: 800; }
.sr-pwa-modal-close {
    border: none;
    background: var(--sr-surface-2);
    color: var(--sr-text);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    flex: 0 0 auto;
}
.sr-pwa-modal-body { font-size: 14.5px; line-height: 1.6; color: var(--sr-text-dim); }
.sr-pwa-modal-body img { max-width: 100%; height: auto; border-radius: 10px; }

/* ---------- Installations-Hinweis ---------- */
.sr-pwa-install {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(var(--sr-tabbar-h) + var(--sr-safe-bottom) + 10px);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
    background: #1c1c1c;
    border: 1px solid var(--sr-divider);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
    animation: srPwaSlideUp 0.3s ease;
}
[data-bs-theme="light"] .sr-pwa-install { background: #ffffff; }
.sr-pwa-install[hidden] { display: none; }
@keyframes srPwaSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
.sr-pwa-install-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--sr-accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}
.sr-pwa-install-body { flex: 1 1 auto; min-width: 0; }
.sr-pwa-install-title { font-size: 14px; font-weight: 700; color: var(--sr-text); }
.sr-pwa-install-text {
    font-size: 12px;
    color: var(--sr-text-dim);
    margin-top: 2px;
    line-height: 1.4;
}
.sr-pwa-install-text i { font-size: 13px; vertical-align: -1px; color: var(--sr-accent); }
.sr-pwa-install-btn {
    flex: 0 0 auto;
    border: none;
    background: var(--sr-accent);
    color: #000;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    padding: 9px 16px;
    cursor: pointer;
}
.sr-pwa-install-btn:active { transform: scale(0.95); }
.sr-pwa-install-close {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: var(--sr-text-dim);
    font-size: 15px;
    cursor: pointer;
    padding: 4px 2px;
    align-self: flex-start;
}

/* ---------- Bottom-Sheet ("Mehr") ---------- */
.sr-pwa-sheet {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: flex-end;
}
.sr-pwa-sheet[hidden] { display: none; }
.sr-pwa-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: srPwaFadeIn 0.2s ease;
}
@keyframes srPwaFadeIn { from { opacity: 0; } to { opacity: 1; } }
.sr-pwa-sheet-panel {
    position: relative;
    width: 100%;
    max-height: 85%;
    overflow-y: auto;
    background: #1c1c1c;
    border-radius: 20px 20px 0 0;
    padding: 6px 0 calc(var(--sr-safe-bottom) + 12px);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
    animation: srPwaSheetUp 0.28s ease;
}
[data-bs-theme="light"] .sr-pwa-sheet-panel { background: #ffffff; }
@keyframes srPwaSheetUp {
    from { transform: translateY(100%); }
    to { transform: none; }
}
.sr-pwa-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--sr-divider);
    margin: 8px auto 10px;
}
.sr-pwa-sheet-list { display: flex; flex-direction: column; }
.sr-pwa-sheet-item {
    display: flex;
    align-items: center;
    gap: 18px;
    border: none;
    background: transparent;
    color: var(--sr-text);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    padding: 15px 22px;
    cursor: pointer;
}
.sr-pwa-sheet-item i {
    flex: 0 0 auto;
    width: 26px;
    text-align: center;
    color: var(--sr-accent);
    font-size: 22px;
}
.sr-pwa-sheet-item:active { background: var(--sr-surface); }

/* ---------- Audio-Aufnahme (Wunschbox) ---------- */
.sr-pwa-rec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 22px 0 4px;
}
.sr-pwa-rec-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #ff5a5a;
}
.sr-pwa-rec-status[hidden] { display: none; }
.sr-pwa-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5a5a;
    animation: srPwaPulse 1.2s ease-in-out infinite;
}
.sr-pwa-rec-time { color: var(--sr-accent); font-weight: 700; }
.sr-pwa-rec-status.is-warn .sr-pwa-rec-time { color: #ff5a5a; }
.sr-pwa-rec-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: var(--sr-accent);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(255, 171, 64, 0.4);
    transition: background 0.2s ease, transform 0.1s ease;
}
.sr-pwa-rec-btn:active { transform: scale(0.94); }
.sr-pwa-rec-btn.is-recording {
    background: #ff4d4d;
    box-shadow: 0 6px 18px rgba(255, 77, 77, 0.45);
    animation: srPwaRecPulse 0.85s ease-in-out infinite;
}
@keyframes srPwaRecPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.sr-pwa-rec-label { font-size: 14px; font-weight: 600; color: var(--sr-text-dim); }

.sr-pwa-rec-player {
    margin-top: 16px;
    background: var(--sr-surface);
    border: 1px solid var(--sr-divider);
    border-radius: 14px;
    padding: 14px;
}
.sr-pwa-rec-player[hidden] { display: none; }
.sr-pwa-rec-player-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--sr-text); }
.sr-pwa-rec-player-row { display: flex; align-items: center; gap: 12px; }
.sr-pwa-rec-play,
.sr-pwa-rec-del {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sr-pwa-rec-play { color: var(--sr-accent); font-size: 38px; }
.sr-pwa-rec-play.is-playing { color: #ff5a5a; }
.sr-pwa-rec-del { color: var(--sr-text-dim); font-size: 22px; }
.sr-pwa-rec-player-bar { flex: 1 1 auto; min-width: 0; }
.sr-pwa-rec-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--sr-surface-2);
    overflow: hidden;
}
.sr-pwa-rec-progress-fill {
    height: 100%;
    width: 0;
    background: var(--sr-accent);
    border-radius: 999px;
}
.sr-pwa-rec-times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--sr-text-dim);
    margin-top: 4px;
}

/* ---------- Video-Aufnahme (Videogrußbox) ---------- */
.sr-pwa-cam { margin: 22px 0 30px; }
.sr-pwa-cam-start {
    width: 100%;
    border: 1px dashed var(--sr-divider);
    background: var(--sr-surface);
    color: var(--sr-text);
    border-radius: 14px;
    padding: 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.sr-pwa-cam-start i { color: var(--sr-accent); font-size: 20px; }
.sr-pwa-cam-start { margin-bottom: 15px; }
.sr-pwa-cam-start[hidden] { display: none; }
.sr-pwa-cam-live,
.sr-pwa-cam-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.sr-pwa-cam-live[hidden],
.sr-pwa-cam-result[hidden] { display: none; }
.sr-pwa-cam-frame {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    position: relative;
}
.sr-pwa-cam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-pwa-cam-mirror { transform: scaleX(-1); }
.sr-pwa-cam-rectime {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.sr-pwa-cam-rectime[hidden] { display: none; }
.sr-pwa-cam-rec {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid var(--sr-text-dim);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.sr-pwa-cam-rec:active { transform: scale(0.94); }
.sr-pwa-cam-rec-dot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2ecc71;
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease, background 0.2s ease;
}
.sr-pwa-cam-rec.is-recording .sr-pwa-cam-rec-dot {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #ff4d4d;
    animation: srPwaRecPulse 0.85s ease-in-out infinite;
}
.sr-pwa-cam-label { font-size: 14px; font-weight: 600; color: var(--sr-text-dim); }
.sr-pwa-cam-del {
    border: none;
    background: transparent;
    color: var(--sr-text-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sr-pwa-cam-del i { font-size: 16px; }

/* ---------- Bottom-Tab-Bar ---------- */
.sr-pwa-tabs {
    flex: 0 0 auto;
    display: flex;
    height: calc(var(--sr-tabbar-h) + var(--sr-safe-bottom));
    padding-bottom: var(--sr-safe-bottom);
    background: var(--sr-bg);
    border-top: 1px solid var(--sr-divider);
}
.sr-pwa-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--sr-text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: color 0.15s ease;
    padding: 0;
}
.sr-pwa-tab i { font-size: 22px; }
.sr-pwa-tab.is-active { color: var(--sr-accent); }
.sr-pwa-tab:active i { transform: scale(0.9); }
