/* ============================================================
   Raumplan von Miteinander am Deister (beide Verwaltungen, web/shared/roomplan.js)
   Kopf, Kalender, Termine, Aufziehen, Buchungsfenster. Farben aus den Variablen der jeweiligen Seite
   (--pine ist bei Miteinander Altrosa, bei Deisterbaby Grün). Aus web/miteinander/css/style.css hierher verschoben (2026-10-17).
   ============================================================ */
.plan-mode select.input { width: auto; padding: 6px 12px; font-size: .9rem; border-radius: 999px; }
#planWrap.is-loading { opacity: .6; transition: opacity .15s ease .1s; pointer-events: none; }
/* ---------- Raumplan: Kopf (2026-10-10) ----------
   Links „Zeit“: schnelle Wahl + Kalender, darunter ‹ Zeitraum ›. Rechts „Raum“ (Woche) bzw. „Tag“ (Tagesansicht), darunter die Ansicht.
   Darunter eine schmale Leiste (Hinweis links, „+ Raum buchen“ rechts), dann der Kalender. */
.plan-head-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 12px; }
.pt-time { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pt-quick { display: flex; align-items: center; gap: 8px; }
.pt-quick .seg { flex-wrap: nowrap; }
.wk-pick { position: relative; cursor: pointer; padding-inline: 10px; min-width: 40px; justify-content: center; }
.wk-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
/* iPad/Handy: Safari öffnet die Datumsauswahl nicht per showPicker() über das Symbol, nur beim direkten Antippen des Felds.
   Darum dort das (unsichtbare) Feld über den ganzen Knopf legen; 16px, damit iOS beim Antippen nicht hineinzoomt (2026-10-13) */
@media (pointer: coarse) { .wk-pick { overflow: hidden; } .wk-pick input { pointer-events: auto; font-size: 16px; cursor: pointer; min-width: 0; -webkit-appearance: none; appearance: none; } }
/* Pfeilzeile genau so breit wie die Wochenauswahl darüber: Pfeile fest an den Rändern, Datum dazwischen (springt nicht beim Durchklicken) */
.pt-time { width: max-content; max-width: 100%; }
.wk-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.wk-range { flex: 1 1 auto; min-width: 0; white-space: nowrap; font-family: var(--f-display); font-size: 1.15rem; text-align: center; }
.wk-step { padding-inline: 10px; min-width: 40px; justify-content: center; }
.wk-step .icon, .wk-pick .icon { width: 17px; height: 17px; }
.pt-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.plan-mode { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.plan-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.plan-bar p { margin: 0; flex: 1 1 280px; }
.plan-bar .hol-day { color: var(--ink); }
/* Tagesansicht: Tage als kleine Kärtchen in einer Zeile */
.pt-right .weekstrip { display: flex; gap: 5px; margin: 0; }
.pt-right .wday { width: 46px; padding: 4px 2px; }
.pt-right .wday small { position: absolute; left: 4px; top: 3px; font-size: .62rem; }
/* Tablet / kleiner Laptop: Kopf untereinander, rechte Spalte linksbündig */
@media (max-width: 900px) {
  .plan-head-grid { flex-direction: column; align-items: stretch; }
  .pt-right { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}
/* Handy */
@media (max-width: 560px) {
  .plan-head-grid, .pt-time { min-width: 0; }
  .pt-time { width: auto; }
  .pt-quick .seg { flex: 1 1 auto; min-width: 0; }
  .pt-quick .seg button { flex: 1 1 0; min-width: 0; padding: 6px 4px; font-size: .76rem; white-space: nowrap; }
}
@media (max-width: 360px) { .pt-quick .wk-w { display: none; } .pt-quick .seg button { font-size: .82rem; } }
@media (max-width: 560px) {
  .wk-nav { justify-content: space-between; }
  .wk-range { font-size: 1rem; min-width: 0; }
  .pt-right { flex-direction: column; align-items: stretch; }
  .pt-right .weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .pt-right .wday { width: auto; }
  .plan-mode { align-self: flex-end; }
  .plan-bar .btn { width: 100%; justify-content: center; }
}

.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.wday { position: relative; border: 2px solid var(--line); background: var(--paper); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.2; }
.wday b { font-family: var(--f-display); font-size: 1.3rem; }
.wday span, .wday small { font-size: .75rem; color: var(--muted); }
.wday.on { border-color: var(--pine); background: color-mix(in srgb, var(--pine) 8%, var(--paper)); }
.wday.is-today span { color: var(--pine); font-weight: 800; }
.dot-mine { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
@media (max-width: 560px) { .wday small { display: none; } }

.plan-scroll { overflow-x: auto; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); }
.plan { display: grid; grid-template-columns: 56px repeat(var(--cols, 3), minmax(140px, 1fr)); min-width: 520px; --row: 24px; }
.plan.week { grid-template-columns: 50px repeat(7, minmax(108px, 1fr)); min-width: 820px; }
.plan-times { display: grid; grid-template-rows: 52px repeat(var(--rows), var(--row)); border-right: 1px solid var(--line); }
.plan-times span { font-size: .72rem; color: var(--muted); padding: 2px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.plan-col { border-right: 1px solid var(--line); min-width: 0; }
.plan-col:last-child { border-right: 0; }
.plan-head { height: 52px; display: flex; flex-direction: column; justify-content: center; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--soft); }
.plan-head small { color: var(--muted); font-size: .78rem; }
.plan-head b, .plan-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.day-head { width: 100%; border: 0; border-bottom: 1px solid var(--line); align-items: flex-start; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.day-head:hover { background: color-mix(in srgb, var(--pine) 8%, var(--soft)); }
.day-head.today { background: var(--sun-bg); }
.day-head.today b { color: #8a6100; }
.plan-head .hol, .hol-day { color: var(--rose); font-weight: 700; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hol-day { font-size: .85rem; margin: -4px 0 8px; }
.plan-col.weekend .plan-body { background: color-mix(in srgb, var(--sky) 4%, var(--paper)); }
.plan-col.ferien .plan-body { background: color-mix(in srgb, var(--rose) 6%, var(--paper)); }
/* Gesetzlicher Feiertag: Name kräftig (dunkelrot), Spalte etwas grauer als Ferien */
.plan-head .hol.is-feiertag, .hol-day.is-feiertag { color: #a3263e; font-weight: 800; }
.plan-col.feiertag .plan-body { background: repeating-linear-gradient(135deg, color-mix(in srgb, #a3263e 7%, var(--paper)) 0 8px, var(--paper) 8px 16px); }
.wday.is-feiertag span { color: #a3263e; font-weight: 800; }

/* Termin im Raumplan: Farbe = Person (im Profil wählbar), ausgefüllt mit weißer Schrift */
.ev { position: absolute; top: calc(var(--top) * var(--row) + 1px); height: calc(var(--h) * var(--row) - 2px); min-height: 14px;
  left: calc(3px + var(--l) * (100% - 6px) / var(--n)); width: calc((100% - 6px) / var(--n) - 2px);
  background: color-mix(in srgb, var(--rc) 15%, var(--paper)); box-shadow: inset 3px 0 0 var(--rc); color: var(--ink);
  border: 0; border-radius: 6px; padding: 2px 5px 2px 7px; text-align: left; font: inherit; font-size: .72rem; line-height: 1.25; overflow: hidden; cursor: pointer; overflow-wrap: anywhere; }
.ev:hover { filter: brightness(.97); z-index: 2; }
.ev b { font-weight: 700; }
.ev { background: var(--rc); color: #fff; box-shadow: none; }
.ev .ev-t { font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .9); }
.ev .ev-w { color: rgba(255, 255, 255, .9); }
/* eigene Buchungen: zusätzlich ein heller Rand innen */
.ev.own { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.ev.nomatch { outline: 1.5px dashed var(--danger); outline-offset: -1.5px; }

.plan-body { position: relative; display: grid; grid-template-rows: repeat(var(--rows), var(--row)); }
.slot { border: 0; border-bottom: 1px dashed var(--line); background: transparent; cursor: pointer; padding: 0; }
.slot:nth-child(2n) { border-bottom-style: solid; }
.slot:hover { background: color-mix(in srgb, var(--pine) 10%, transparent); }
.slot { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* Neuer Termin beim Aufziehen: Rahmen in der eigenen Farbe, darüber Uhrzeit und Dauer */
.ev-draft { position: absolute; left: 3px; right: 3px; top: calc(var(--top) * var(--row) + 1px); height: calc(var(--h) * var(--row) - 2px); z-index: 3; pointer-events: none;
  border: 2px dashed var(--rc); border-radius: 6px; background: color-mix(in srgb, var(--rc) 18%, transparent); }
.ev-draft-tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: var(--ink); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1.3; padding: 3px 8px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.plan-times + .plan-col .ev-draft-tip { left: 0; transform: none; } .plan-col:last-child .ev-draft-tip { left: auto; right: 0; transform: none; }
body.is-dragging, body.is-dragging * { cursor: ns-resize !important; user-select: none; -webkit-user-select: none; }

.room-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.room-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 16px; border: 0; border-radius: 12px; background: var(--soft); font: inherit; text-align: left; cursor: pointer; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s ease; }
.room-tabs button:hover { background: color-mix(in srgb, var(--pine) 14%, var(--soft)); }
.room-tabs button small { color: var(--muted); font-size: .8rem; }
/* gewählter Raum: kräftig ausgefüllt */
.room-tabs button.on { background: color-mix(in srgb, var(--pine) 14%, var(--soft)); box-shadow: inset 0 0 0 2px var(--pine); }
.room-tabs button:focus-visible { outline: 3px solid var(--pine, #378a3d); outline-offset: 2px; }

/* Avatar: rundes Foto oder Initialen */
.av { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: #fff; color: var(--ink); font-weight: 800; }
.av.av-in { width: 26px; height: 26px; font-size: .62rem; box-shadow: 0 0 0 2px #fff; }
.av.av-ev { width: 1.7em; height: 1.7em; font-size: .68rem; vertical-align: middle; margin-right: 4px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); float: left; }
.av.av-lg { width: 22px; height: 22px; font-size: .6rem; box-shadow: 0 0 0 2px var(--rc); }
.lg-who { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 560px) {
  .room-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .room-tabs button { padding: 8px 8px; font-size: .82rem; line-height: 1.2; }
  .room-tabs button small { display: none; }
}
#app .ev, #app .ev * { hyphens: manual; -webkit-hyphens: manual; }

/* Raumplan: Termine über 45 Min. mit größerem Foto (30 px), links neben dem Text */
.ev.ev-big .av-ev { width: 30px; height: 30px; font-size: .75rem; margin: 1px 6px 2px 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.ev.ev-big { padding-top: 3px; }

/* Zu kurzfristig zum Ändern/Löschen: sichtbar, aber ausgegraut (Hinweis per title bzw. Antippen) */
.is-locked { opacity: .45; cursor: not-allowed; }

/* Laptop/Computer: Raum- und Tagesauswahl kompakt, damit der Kalender den Platz bekommt (Wunsch Chris, 2026-10-10) */
@media (min-width: 561px) {
  .room-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
  .room-tabs button { flex-direction: row; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: 999px; }
  .room-tabs button b { font-size: .95rem; }
  .room-tabs button small { font-size: .78rem; }
  .weekstrip { gap: 6px; margin-bottom: 10px; }
  .wday { padding: 5px 4px; border-radius: 10px; border-width: 1.5px; line-height: 1.15; }
  .wday b { font-size: 1.05rem; }
  .wday span, .wday small { font-size: .7rem; }
}
/* Sehr schmale Handys (≤ 360 px): Raumnamen kleiner und notfalls getrennt („Beratungs-raum“), steht am Ende, damit es gilt */
@media (max-width: 360px) {
  .room-tabs button { font-size: .72rem; padding-inline: 6px; }
  .room-tabs button b { min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
}

/* Buchungsfenster Raum: Felder in Zeilen (Raum + Datum, Von + Bis + Wiederholen), alle gleich hoch, wenig Abstand → kein Scrollbalken am Laptop */
.bk-form { gap: 12px; }
.bk-form .field { gap: 4px; }
.bk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 12px; align-items: end; }
.bk-form .input { height: 46px; padding-block: 0; }
.bk-form input.input[type="date"], .bk-form input.input[type="time"] { height: 46px; padding-block: 0; line-height: 42px; } /* schlägt die iPhone-Regel aus shared/extra.css; ohne appearance zentriert erst die Zeilenhöhe den Text */
.bk-times { grid-template-columns: 128px 128px repeat(auto-fit, minmax(150px, 1fr)); }
.bk-form .bk-dates { margin-top: -4px; }
.bk-form .sum { padding: 12px 14px; }
@media (max-width: 480px) { .bk-row { grid-template-columns: 1fr; } .bk-times { grid-template-columns: 1fr 1fr; } .bk-times .field:nth-child(n+3) { grid-column: 1 / -1; } }
/* Weitere Räume: unauffälliger Link unter der Raumauswahl, aufgeklappt eine schmale Zeile mit Häkchen */
.bk-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 14px; background: var(--soft); border-radius: 12px; }
.bk-more-l { color: var(--muted); font-weight: 700; font-size: .88rem; }
.bk-skip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-height: 46px; }

/* Buchungsfenster: Haken „Im Wochenplan der Website zeigen“, ausgegraut, wenn nicht wöchentlich */
.bk-week.is-off { color: var(--muted); cursor: not-allowed; }
.bk-week.is-off input { cursor: not-allowed; }
