/* Radio Remote Control – remote.css – v2026-05-07 */

/* ── Design-Tokens ─────────────────────────────────────── */
:root {
  --bg:        #16181c;
  --card:      #1f2227;
  --card2:     #252930;
  --border:    rgba(255,255,255,.07);
  --muted:     #7a8494;
  --text:      #e8edf4;
  --accent:    #4fc3f7;
  --accent2:   #81d4fa;
  --green:     #4caf50;
  --red:       #f44336;
  --amber:     #ffca28;
  --radius:    13px;
  --radius-sm: 8px;
  --shadow:    0 4px 14px rgba(0,0,0,.3);
  --progress:  0%;
  --progress-color: #55ff88;

  /* Buttons */
  --btn-next:         #1565c0;
  --btn-auto-auto:    #2e7d32;
  --btn-auto-assist:  #1a6b3c;
  --btn-auto-break:   #5d4037;
  --btn-auto-stop:    #6d1f1f;
  --btn-enc-start:    #1a5276;
  --btn-enc-stop:     #6d4c1f;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;  /* clip statt hidden: verhindert Scrolling aber erlaubt visuellen Überlauf */
}

/* ── Login Page ─────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 60% 30%, #1a2a3a 0%, var(--bg) 70%);
}
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 40px 36px 32px;
}
.login-logo { text-align: center; margin-bottom: 10px; }
.login-logo img { max-height: 72px; width: auto; }
.login-station-name { font-size: 1.6rem; font-weight: 800; text-align: center; color: var(--accent); }
.login-subtitle { text-align: center; color: var(--muted); font-size: .95rem; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .87rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-group input {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--accent); }
/* Browser-Autofill überschreiben */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--card2) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
}

.alert { border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
.alert-error { background: rgba(244,67,54,.15); border: 1px solid rgba(244,67,54,.35); color: #ff8a80; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 18px;
  border: none; border-radius: var(--radius-sm);
  font-size: .93rem; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: transform .08s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #000; }
.btn-ghost    { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-full     { width: 100%; }
.btn-sm       { padding: 0 12px !important; font-size: .85rem; height: 36px; box-sizing: border-box; line-height: 1; }

/* ── Lang switch (login page) ───────────────────────────── */
.lang-switch {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px;
}
.lang-btn {
  padding: 6px 12px; border-radius: 6px; font-size: .85rem; font-weight: 700;
  text-decoration: none; color: var(--text);
  background: var(--card2); border: 1px solid var(--border);
  transition: background .12s, color .12s;
}
.lang-btn:hover { background: var(--card); border-color: var(--accent); color: var(--accent); }
.lang-btn.active { background: var(--accent); color: #000; border-color: transparent; }

/* ── Lang select (monitor header) ───────────────────────── */
.lang-select {
  height: 36px; box-sizing: border-box;
  padding: 0 10px; border-radius: 6px;
  font-size: .85rem; font-weight: 700;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  outline: none;
}
.lang-select:hover { border-color: var(--accent); }

/* ── Top Nav ─────────────────────────────────────────────── */
.top-nav {
  background: #1a1d21;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 960px; margin: 0 auto; padding: 10px 16px; gap: 12px;
}
.nav-left  { display: flex; align-items: center; gap: 10px; }
.nav-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-logo  { height: 36px; width: auto; }
.nav-station { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.nav-user  { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.nav-user strong { color: var(--text); }
.role-badge {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: .72rem; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
}
.role-technik   { background: rgba(244,67,54,.2);  color: #ff8a80; }
.role-moderator { background: rgba(79,195,247,.2); color: var(--accent2); }
.role-readonly  { background: rgba(122,132,148,.15); color: var(--muted); }

/* ── Dashboard Layout ────────────────────────────────────── */
.dashboard { max-width: 960px; margin: 0 auto; padding: 16px 12px 30px; }

/* ── Serverbar ───────────────────────────────────────────── */
.serverbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 14px;
}
.server-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.server-btn {
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 9px 16px; font-weight: 800; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.server-btn.active { background: rgba(79,195,247,.18); border-color: rgba(79,195,247,.5); }
.server-btn:hover:not(.active) { border-color: var(--muted); }

.stream-status { display: flex; gap: 10px; flex-wrap: wrap; }
.status-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px;
}
.status-key { color: var(--muted); font-weight: 700; font-size: .85rem; }
.status-val { font-weight: 900; font-size: .9rem; }
.status-val.ok  { color: var(--green); }
.status-val.bad { color: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ── Control Buttons ─────────────────────────────────────── */
.controls { margin-bottom: 0; }
.controls-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 10px;
  border: none; border-radius: var(--radius);
  font-size: .88rem; font-weight: 800; color: #fff;
  cursor: pointer; transition: transform .1s, filter .1s;
  min-height: 80px; text-align: center;
  box-shadow: var(--shadow);
}
.ctrl-btn:active, .ctrl-btn.btn-busy { transform: scale(.96); filter: brightness(.85); }
.ctrl-icon { font-size: 1.5rem; line-height: 1; }
.btn-next         { background: var(--btn-next); }
.btn-auto-start   { background: var(--btn-auto-auto); }
.btn-auto-assist  { background: var(--btn-auto-assist); }
.btn-auto-break   { background: var(--btn-auto-break); }
.btn-auto-stop    { background: var(--btn-auto-stop); }
.btn-enc-start    { background: var(--btn-enc-start); }
.btn-enc-stop     { background: var(--btn-enc-stop); }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: #2d3138; border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 22px;
  font-weight: 700; font-size: .92rem;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 200;
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-ok    { border-color: var(--green); color: #a5d6a7; }
.toast-error { border-color: var(--red);   color: #ef9a9a; }

/* ── Now Playing ─────────────────────────────────────────── */
.now-playing {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  margin-bottom: 12px; padding: 24px 22px 76px;
}
.now-playing::before {
  content: ''; position: absolute; inset: 0;
  width: var(--progress); height: 100%;
  background: var(--progress-color);
  opacity: .18; transition: width .35s linear, background .3s ease;
  z-index: 1; pointer-events: none;
}
.now-playing > * { position: relative; z-index: 2; }
.np-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.artist { font-size: 1.15rem; color: #d0d8e4; font-weight: 600; margin-bottom: 4px; }
.title  { font-size: 2.2rem; line-height: 1.2; font-weight: 800; }
.ramp-time { position: absolute; left: 16px; bottom: 14px; color: var(--amber); font-weight: 800; font-size: 1.05rem; }
.time-remaining { position: absolute; right: 18px; bottom: 14px; font-weight: 900; font-size: 1.6rem; color: #aaffaa; transition: color .25s; }

/* Swap animation */
.swap.outgoing #npCurrent { animation: slideOutLeft .45s ease forwards; }
.swap.incoming #npIncoming { animation: slideInUp .45s ease forwards; }
@keyframes slideOutLeft { to { transform: translateX(-10%); opacity: 0; } }
@keyframes slideInUp { from { transform: translateY(12%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Zeit-Strip ──────────────────────────────────────────── */
.time-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px; color: var(--amber); cursor: pointer;
  text-align: center;
}
.time-spoken  {
  font-weight: 400; font-size: 1.55rem; line-height: 1.2;
}
.time-digital {
  font-weight: 700; font-size: 1.0rem; letter-spacing: .5px;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
  white-space: nowrap; opacity: .75;
}
.time-spoken b { font-weight: 900; font-size: 1.1em; color: var(--amber); text-transform: capitalize; }

/* ── Upcoming List ───────────────────────────────────────── */
.next-list {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 16px 18px;
}
.next-list .label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.upcoming { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.upcoming li {
  display: grid; grid-template-columns: 90px 1fr 120px;
  gap: 6px; align-items: center;
  background: var(--card2); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 9px; color: #c8d0db;
}
.upcoming li .next-time { font-weight: 800; color: var(--accent2); }
.upcoming li .mid { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.upcoming li .mid .a { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming li .mid .t { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming li .right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.right .dur  { color: #aab3c0; font-weight: 700; }
.right .ramp { color: var(--amber); font-weight: 800; font-size: .85rem; }
.upcoming li.fix        { color: #ff9800; }
.upcoming li.jingle     { color: #4da6ff; }
.upcoming li.hourborder { color: #e57373; font-weight: 700; }
.upcoming li.inactive { opacity: .5; }
.upcoming li.inactive .next-time, .upcoming li.inactive .a, .upcoming li.inactive .t, .upcoming li.inactive .dur { color: #888 !important; }
.upcoming li.placeholder { grid-template-columns: 1fr; color: var(--muted); justify-items: center; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { text-align: center; color: var(--muted); padding: 16px; font-size: .83rem; border-top: 1px solid var(--border); margin-top: 10px; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .nav-inner { flex-wrap: wrap; }
  .nav-right  { gap: 8px; }
  .nav-user   { display: none; } /* Platz sparen */
  .lang-switch { gap: 4px; }
  .lang-btn { padding: 4px 7px; font-size: .75rem; }

  .controls-inner { grid-template-columns: 1fr 1fr; }

  .title { font-size: 1.7rem; }
  .time-remaining { font-size: 1.3rem; }
  .upcoming li { grid-template-columns: 80px 1fr 90px; gap: 4px; padding: 9px 10px; }

  .serverbar { flex-direction: column; align-items: stretch; }
  .stream-status { justify-content: flex-start; }
}
@media (max-width: 400px) {
  .controls-inner { grid-template-columns: 1fr; }
  .upcoming li { grid-template-columns: 72px 1fr 80px; }
  .upcoming li .right { display: flex; }
  .upcoming li .right .dur { display: none; }
  .upcoming li .right .ramp { display: none; }
}

/* ── Play Button ─────────────────────────────────────────── */
:root { --btn-play: #1b5e20; }
.btn-play { background: var(--btn-play); font-size: 1rem; }

/* ── Encoder Status ──────────────────────────────────────── */
.encoder-status { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Stream-Monitor Section ──────────────────────────────── */
.monitor-section {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 14px;
}
.monitor-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.monitor-chip {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card2);
  min-width: 110px; transition: background .2s;
}
.mon-name { font-size: .88rem; font-weight: 700; color: var(--text); margin-bottom: 6px; text-transform: none; font-variant: normal; }
.mon-badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: .78rem; font-weight: 700; margin-top: 3px;
  background: var(--card2); color: var(--muted);
}
.mon-badge-sm { font-size: .72rem; }
/* mAirList states */
.mon-disarmed .mon-badge-sm { background: rgba(122,132,148,.15); color: var(--muted); }
.mon-armed    .mon-badge-sm { background: rgba(255,202,40,.15);  color: var(--amber); }
.mon-onair    .mon-badge-sm { background: rgba(76,175,80,.2);    color: var(--green); }
/* Icecast states – set via JS on the badge directly */
.ice-badge-on      { background: rgba(76,175,80,.2);   color: var(--green)  !important; }
.ice-badge-off     { background: rgba(244,67,54,.15);  color: var(--red)    !important; }
.ice-badge-stopped { background: rgba(255,152,0,.2);   color: #ff9800       !important;
                     animation: ice-stopped-pulse 2s ease-in-out infinite; }
@keyframes ice-stopped-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

/* ── Icecast Section ─────────────────────────────────────── */
.section-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

@media (max-width: 680px) {
  .monitor-grid, .icecast-grid { gap: 8px; }
  .monitor-chip { min-width: 80px; padding: 8px 10px; }
  .icecast-chip { grid-template-columns: 1fr auto; min-width: 160px; }
  .ice-listeners { display: none; }
}

/* ── Playlist-Editor Buttons ─────────────────────────────── */
.edit-btns {
  display: flex; gap: 4px; margin-top: 4px; justify-content: flex-end;
}
.edit-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); border-radius: 5px;
  padding: 2px 7px; font-size: .8rem; cursor: pointer;
  transition: background .1s, color .1s;
  line-height: 1.4;
}
.edit-btn:hover         { background: var(--card2); color: var(--text); }
.edit-btn-del           { border-color: rgba(244,67,54,.3); }
.edit-btn-del:hover     { background: rgba(244,67,54,.2); color: #ff8a80; border-color: rgba(244,67,54,.6); }
.upcoming li .edit-btns { opacity: 1; } /* immer sichtbar */
@media (max-width: 680px) {
  .upcoming li .edit-btns { opacity: 1; } /* immer sichtbar auf Mobile */
}

/* ── Audio-Player Chip ───────────────────────────────────── */
/* ── Player-Wrap (Container wie monitor-section) ─────────── */
.player-wrap {
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.player-section {
  display: flex; align-items: center; gap: 12px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  transition: border-color .3s;
}
.player-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: #1b5e20; border: none; color: #fff;
  font-size: 13px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.player-btn:active { transform: scale(.92); }
.player-meta { flex: 1; overflow: hidden; min-width: 0; min-width: 120px; }
.player-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.player-title { font-size: .85rem; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-chip { transition: border-color .3s; }
.player-vol {
  width: 70px; flex-shrink: 0;
  accent-color: var(--accent);
}
.player-select {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px;
  padding: 6px 8px; font-size: .85rem;
  min-width: 160px; max-width: 260px;
  cursor: pointer; flex-shrink: 0;
}
@media (max-width: 680px) {
  .player-chip   { max-width: 100%; }
  .player-vol    { width: 50px; }
  .player-select { max-width: 80px; }
}

/* ── Wetter ──────────────────────────────────────────────── */
.weather-section {
  margin-bottom: 14px;
  /* Überlauf wird per JS als inline style gesetzt */
}
.weather-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.weather-chip {
  flex: 1 1 var(--wx-min, 140px);
  min-width: var(--wx-min, 140px);
  max-width: 220px;
  border-radius: 12px;
  padding: 18px 12px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--wx-font, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
  color: #fff;
}
.weather-icon  { width: 44px; height: 44px; margin: 0 0 4px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
                 display: var(--wx-icon-display, block); }
.weather-city  { font-size: var(--wx-city-size, 1.3rem); font-weight: 800; letter-spacing: .2px; margin-bottom: 2px;
                 text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.weather-temp  { font-size: var(--wx-temp-size, 2rem); font-weight: 900; line-height: 1;
                 text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.weather-desc  { font-size: var(--wx-desc-size, 1.0rem); opacity: .95; margin-top: 6px; line-height: 1.2;
                 text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.weather-updated { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 8px; }

@media (max-width: 680px) {
  .weather-grid { grid-template-columns: repeat(3, 1fr); }
  .weather-temp { font-size: 1.3rem; }
}
@media (max-width: 400px) {
  .weather-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Zonen-Trennung Admin / Redaktion ────────────────────── */
.zone-admin {
  background: #0d0f12;
  border-radius: var(--radius);
  /* 15px an jeder Seite über den Dashboard-Padding hinaus */
  margin: 0 -15px 12px;
  padding: 18px 15px 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),
              0 4px 18px rgba(0,0,0,.4);
}
.zone-editorial {
  /* kein eigener Hintergrund */
}
.zone-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  opacity: .45;
  margin-bottom: 12px;
  padding-left: 2px;
}
/* Divider entfernt – Abstand durch margin-bottom auf zone-admin */
.zone-divider { display: none; }

/* ── Playlist-Edit Animationen ───────────────────────────── */
@keyframes pl-flash-yellow {
  0%   { background: var(--card2); }
  25%  { background: rgba(255,202,40,.35); box-shadow: 0 0 12px rgba(255,202,40,.4); }
  100% { background: var(--card2); }
}
@keyframes pl-flash-green {
  0%   { background: var(--card2); }
  25%  { background: rgba(76,175,80,.35); box-shadow: 0 0 12px rgba(76,175,80,.4); }
  100% { background: var(--card2); }
}
@keyframes pl-delete {
  0%   { opacity: 1; transform: translateX(0);    max-height: 80px; }
  40%  { opacity: 0; transform: translateX(60px); background: rgba(244,67,54,.25); max-height: 80px; }
  100% { opacity: 0; transform: translateX(60px); max-height: 0; padding: 0; margin: 0; border: none; }
}
.pl-flash-yellow { animation: pl-flash-yellow 1.2s ease-out forwards; }
.pl-flash-green  { animation: pl-flash-green  1.2s ease-out forwards; }
.pl-deleting     { animation: pl-delete 500ms ease-in forwards; overflow: hidden; }

