/* Module "kalender" (calendar, src/modules.js): styles, moved out of voodoo.css in 2.78.8. Pages only get this
   file when the module is on (src/routes/pages.js appends it to <head>, after voodoo.css/altar.css). */

/* Events in the middle of the lobby bar (js/modules/kalender/topbar-events.js; mountTopbar({ mid: true }) creates .topbar-mid). The band lies
   centred above the bar, --mid-max (set by the script) keeps it between the brand and the buttons. If there is too little room for that
   (.mid-row), it stands centred in an own line below. Fonts only from the theme variables ("Aa"). */
.topbar-mid { display: none; }
.topbar.has-mid .topbar-mid:not([hidden]) {
  display: flex; position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%);
  align-items: center; justify-content: center; max-width: var(--mid-max, 0px); overflow: hidden;
}
.topbar.mid-row { flex-wrap: wrap; row-gap: 8px; }
.topbar.mid-row .spacer { display: none; }
.topbar.mid-row nav { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
.topbar.mid-row .topbar-mid:not([hidden]) { position: static; transform: none; flex: 0 0 100%; order: 3; max-width: 100%; }
.tb-events { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-seg { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tb-events.tight .tb-seg { flex: 0 1 auto; min-width: 0; }
.tb-sep { flex: 0 0 auto; align-self: stretch; width: 1px; margin: 4px 0; background: rgba(180, 120, 232, .3); }
.tb-label { font-family: var(--data); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ui-dim); white-space: nowrap; }
.tb-when { flex: 0 0 auto; font-family: var(--data); font-size: .7rem; color: var(--ui-dim); white-space: nowrap; }
.tb-ev, .tb-count {
  flex: 0 0 auto; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  padding: 1px 8px; font: inherit; font-family: var(--body); font-size: .76rem; color: var(--ui-text);
  background: rgba(8, 5, 13, .5); border: 1px solid rgba(180, 120, 232, .18); border-left: 3px solid var(--k, var(--gold)); border-radius: var(--r);
}
.tb-count { max-width: none; }
.tb-events.tight .tb-ev { flex: 0 1 auto; min-width: 0; }
.tb-ev:hover, .tb-ev:focus-visible, .tb-count:hover, .tb-count:focus-visible { border-color: var(--loa-lit); border-left-color: var(--k, var(--gold)); outline: none; }
.tb-ev b { margin-right: 3px; font-family: var(--data); font-weight: 600; color: var(--k); }
.tb-count b { font-family: var(--data); font-weight: 600; color: var(--ui-title); }

/* ------------------------------------------------------------- Kalender (Lobby) */
/* Small month view in the panel, the same view big in the overlay (.cal-big), a day's events and the form
   as an overlay too (js/modules/kalender/calendar.js). Colour per kind via --k: watch session violet, livestream green, other gold. */
.k-watch { --k: var(--loa-lit); }
.k-stream { --k: var(--spirit); }
.k-other { --k: var(--gold); }
.k-birthday { --k: var(--blood); }   /* birthdays: rose red from the palette */



/* grosse Monatsansicht (Overlay) */
.overlay .sheet > header { flex-wrap: wrap; row-gap: 6px; }   /* title + buttons may wrap, the buttons themselves not */
.overlay .sheet > header .btn { white-space: nowrap; }
.overlay .sheet.cal-sheet { width: min(1040px, 100%); }   /* .overlay .sheet stands further below and would win otherwise */
.cal-big { gap: 4px; }
.cal-big .cal-day {
  aspect-ratio: auto; min-height: 104px; padding: 6px 7px; gap: 4px;
  align-items: stretch; justify-content: flex-start; text-align: left; font-size: .82rem;
}
.cal-big .cal-dots { display: none; }
.cal-chip {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 5px;
  font-family: var(--body); font-size: .68rem; color: var(--ui-text);
  background: rgba(8, 5, 13, .55); border-left: 2px solid var(--k); border-radius: 2px;
}
.cal-chip b { margin-right: 3px; font-family: var(--data); font-weight: 600; color: var(--k); }
.cal-more { font-family: var(--data); font-size: .62rem; color: var(--ui-dim); }
@media (max-width: 640px) {   /* narrow: no titles in the cells, only the dots */
  .cal-big .cal-day { min-height: 52px; align-items: center; justify-content: center; }
  .cal-big .cal-chip, .cal-big .cal-more { display: none; }
  .cal-big .cal-dots { display: flex; }
}

/* Termine eines Tages */
.cal-day-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.cal-ev { padding: 12px 14px; background: rgba(8, 5, 13, .5); border: 1px solid rgba(180, 120, 232, .22); border-left: 3px solid var(--k); border-radius: var(--r); }
.cal-ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--data); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.cal-kind { color: var(--k); }
.cal-ev time { color: var(--ui-dim); white-space: nowrap; }
.cal-ev h3 { margin: 6px 0 2px; font: var(--ui-title-weight) 1.05rem var(--display); color: var(--ui-title); overflow-wrap: anywhere; }
.cal-desc { margin: 8px 0 0; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Formular */
.ev-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.ev-form .field { margin: 0; }
.ev-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ev-hint { margin: -4px 0 0; font-size: .76rem; }
.ev-bday { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ev-bday .ev-hint { grid-column: 1 / -1; }
.ev-form input[type=datetime-local], .ev-form select, #pointsEvent input[type=datetime-local] { color-scheme: dark; }   /* Auswahlfenster des Browsers passend zum dunklen Theme */
/* the general field styling (above) doesn't know datetime-local - the same here so the fields match the rest */
.ev-form input[type=datetime-local], #pointsEvent input[type=datetime-local] {
  width: 100%; min-width: 0; padding: 10px 12px;
  background: rgba(8, 5, 13, .85); border: 1px solid rgba(180, 120, 232, .28); border-radius: var(--r);
  color: var(--ui-text); font-family: var(--body); font-size: .95rem;
}
.ev-actions { margin-top: 4px; }
.room-card {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px;
  border: var(--hairline); border-radius: var(--r);
  background: rgba(8, 5, 13, .5);
  transition: border-color .15s, background .15s;
}
.room-card:hover { border-color: var(--loa-lit); background: rgba(37, 24, 56, .6); }
.room-card.here { border-color: var(--loa-lit); }   /* switching rooms in the room: the own room (2.64.0) */
.room-card .name {
  font-family: var(--display); font-size: 1.08rem;
  color: var(--ui-title); font-weight: var(--ui-title-weight);
}
.room-card .meta { font-family: var(--data); font-size: .72rem; color: var(--ui-dim); letter-spacing: .06em; }
.room-card .grow { flex: 1; min-width: 0; }
.room-card .thumb { width: 72px; height: 40px; object-fit: cover; border-radius: 4px; background: #000; flex: 0 0 auto; border: var(--hairline); }
