/* Radio Rheinland – Live-Chat mit dem Studio (Hörerseite) */
/* Knopf unten, Fenster darüber (column-reverse: im HTML steht der Knopf zuerst – gut für die Tastatur-Reihenfolge) */
.rr-chat{position:fixed;right:20px;bottom:96px;z-index:1100;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:12px;pointer-events:none}
.rr-chat[hidden]{display:none}
.rr-chat > *{pointer-events:auto}

/* Startknopf */
.rr-chat__launch{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 20px 0 16px;border:0;border-radius:999px;background:#8dbf24;color:#101820;font:inherit;font-size:15px;font-weight:800;box-shadow:0 12px 30px rgba(0,0,0,.45);cursor:pointer;transition:transform .15s,background .15s}
.rr-chat__launch:hover{background:#a1d330;transform:translateY(-1px)}
.rr-chat__launch:focus-visible{outline:3px solid #fff;outline-offset:3px}
.rr-chat__launch i{font-size:19px}
.rr-chat__launch::before{content:"";position:absolute;inset:-4px;border-radius:999px;border:2px solid rgba(141,191,36,.55);animation:rr-chat-ring 2.2s ease-out infinite}
@keyframes rr-chat-ring{0%{opacity:.9;transform:scale(.96)}100%{opacity:0;transform:scale(1.12)}}
.rr-chat.is-open .rr-chat__launch::before{display:none}
.rr-chat__badge{position:absolute;top:-6px;right:-4px;min-width:22px;padding:2px 7px;border-radius:999px;background:#e5484d;color:#fff;font-size:12px;line-height:1.3;text-align:center;box-shadow:0 0 0 2px #0d141c}

/* Fenster */
.rr-chat__panel{width:min(380px,calc(100vw - 32px));height:min(560px,calc(100dvh - 200px));display:flex;flex-direction:column;border-radius:18px;overflow:hidden;background:#111c25;border:1px solid #2b3b49;box-shadow:0 24px 60px rgba(0,0,0,.55)}
.rr-chat__panel[hidden]{display:none}
.rr-chat__head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 18px;background:linear-gradient(135deg,#1b2c39,#15212c);border-bottom:1px solid #2b3b49}
.rr-chat__live{width:10px;height:10px;border-radius:50%;background:#e5484d;box-shadow:0 0 0 0 rgba(229,72,77,.6);animation:rr-chat-live 1.8s infinite;flex:none}
@keyframes rr-chat-live{0%{box-shadow:0 0 0 0 rgba(229,72,77,.55)}70%{box-shadow:0 0 0 8px rgba(229,72,77,0)}100%{box-shadow:0 0 0 0 rgba(229,72,77,0)}}
.rr-chat__heading{display:flex;flex-direction:column;flex:1;min-width:0}
.rr-chat__heading strong{font-size:16px;color:#fff}
.rr-chat__heading small{font-size:12px;color:#9fb3c2}
.rr-chat__close{display:inline-grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:#dce7ee;font-size:18px;cursor:pointer}
.rr-chat__close:hover{background:#223849}

/* Start */
.rr-chat__start{display:flex;flex-direction:column;gap:12px;padding:18px;overflow-y:auto}
.rr-chat__start[hidden]{display:none}
.rr-chat__intro{margin:0;font-size:15px;line-height:1.5;color:#dce7ee}
.rr-chat__start label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:#c9d6df}
.rr-chat__start label small{font-weight:400;color:#8aa0b1}
.rr-chat__start input{min-height:44px;padding:0 12px;border-radius:10px;border:1px solid #354b5d;background:#0d141c;color:#eef3f7;font:inherit;font-size:16px}
.rr-chat__start input:focus{outline:none;border-color:#8dbf24;box-shadow:0 0 0 3px rgba(141,191,36,.25)}
.rr-chat__start .btn{justify-content:center}
.rr-chat__fine{margin:0;font-size:12px;line-height:1.5;color:#8aa0b1}
.rr-chat__fine a{color:#80c4f2}

/* Verlauf */
.rr-chat__messages{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#0f1922}
.rr-chat__messages[hidden]{display:none}
.rr-chat__hint{margin:auto 0;padding:14px;border-radius:12px;border:1px dashed #354b5d;font-size:14px;line-height:1.5;color:#9fb3c2;text-align:center}
.rr-chat__msg{display:flex;flex-direction:column;gap:3px;max-width:82%}
.rr-chat__msg--me{align-self:flex-end;align-items:flex-end}
.rr-chat__msg--studio{align-self:flex-start}
.rr-chat__who{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#8dbf24}
.rr-chat__bubble{padding:10px 13px;border-radius:16px;font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.rr-chat__msg--me .rr-chat__bubble{background:#8dbf24;color:#101820;border-bottom-right-radius:5px}
.rr-chat__msg--studio .rr-chat__bubble{background:#1f3140;color:#eef3f7;border-bottom-left-radius:5px}
.rr-chat__time{font-size:11px;color:#7f939f}
.rr-chat__notice{margin:0;padding:10px 16px;font-size:13px;color:#ffd6cf;background:#2a1a1c;border-top:1px solid #4a2a2d}
.rr-chat__notice[hidden]{display:none}

/* Eingabe */
.rr-chat__send{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid #2b3b49;background:#111c25}
.rr-chat__send[hidden]{display:none}
.rr-chat__send textarea{flex:1;min-height:44px;max-height:120px;padding:11px 14px;border-radius:22px;border:1px solid #354b5d;background:#0d141c;color:#eef3f7;font:inherit;font-size:16px;line-height:1.35;resize:none}
.rr-chat__send textarea:focus{outline:none;border-color:#8dbf24;box-shadow:0 0 0 3px rgba(141,191,36,.25)}
.rr-chat__send button{display:inline-grid;place-items:center;width:44px;height:44px;flex:none;border:0;border-radius:50%;background:#8dbf24;color:#101820;font-size:17px;cursor:pointer}
.rr-chat__send button:hover{background:#a1d330}
.rr-chat__send button:disabled,.rr-chat__send textarea:disabled{opacity:.6}

@media (max-width:640px){
  .rr-chat{right:12px;bottom:84px}
  .rr-chat__launch span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .rr-chat__launch{width:56px;height:56px;padding:0;justify-content:center}
  /* Offen: Vollbild über der Seite */
  /* über der Player-Leiste (z-index 9000) – das Radio läuft im Hintergrund weiter */
  .rr-chat.is-open{inset:0;right:0;bottom:0;z-index:9500;align-items:stretch;gap:0;background:rgba(0,0,0,.4)}
  .rr-chat.is-open .rr-chat__launch{display:none}
  .rr-chat.is-open .rr-chat__panel{width:100%;height:100%;border-radius:0;border:0}
}
@media (prefers-reduced-motion:reduce){.rr-chat__launch::before,.rr-chat__live{animation:none}}
