/* Verfügbarkeit von Instructors: Kalender, Aufenthalts-Karten, Anfrage-Fenster (instructor.html, avail.js) */

/* ---------- Kalender ---------- */
.cal { --cal-size: 40px; user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-head strong { font: 700 16px var(--f-display); }
.cal-nav { width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 20px/1 var(--f-display); cursor: pointer; }
.cal-nav:disabled { opacity: .25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd { font: 500 11px var(--f-mono); text-transform: uppercase; text-align: center; color: var(--ink-soft); padding: 4px 0; }
.cal-d { position: relative; height: var(--cal-size); border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft);
  font: 500 15px var(--f-mono); cursor: default; padding: 0; }
.cal-d.is-past { color: var(--sand-dark); text-decoration: line-through; text-decoration-color: var(--sand-line); }
.cal-d.is-rng { background: var(--sand-light); border-radius: 0; }
.cal-d.is-av { background: var(--shallows); color: var(--ink); font-weight: 600; cursor: pointer; border-radius: 6px; }
.cal-d.is-av:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-d.is-sel { background: var(--ink); color: var(--salt); }
.cal-d.is-sel::after { content: '✓'; position: absolute; top: 1px; right: 4px; font-size: 10px; color: var(--shallows); }
.cal-d.is-today::before { content: ''; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--kite-text); }
.cal-d[aria-disabled="true"] { cursor: default; }
.cal-d[aria-disabled="true"].is-av:hover { box-shadow: none; }
.cal-jump { margin-top: 8px; border: 0; background: none; color: var(--deep-water); font: 600 14px var(--f-display); text-decoration: underline; cursor: pointer; padding: 6px 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font: 12px var(--f-mono); color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.lg--av { background: var(--shallows); }
.lg--today { width: 6px; height: 6px; border-radius: 50%; background: var(--kite-text); }

/* ---------- Profil: Wo + wann ---------- */
.ipr-next { margin: 10px 0 0; font-size: 15px; }
.ipr-next a { color: var(--deep-water); }
.ipr-when { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ist-list { display: grid; gap: 12px; }
.ist { background: var(--paper); border: 1px solid var(--sand-line); border-left: 4px solid var(--lagoon); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.ist > * { margin: 0; }
.ist-kind { font: 500 12px var(--f-mono); text-transform: uppercase; color: var(--deep-water); }
.ist-place { font: 800 20px var(--f-display); font-stretch: 108%; display: flex; align-items: center; gap: 8px; }
.ist-when strong { font-size: 18px; }
.ist-when span { font: 13px var(--f-mono); color: var(--ink-soft); margin-left: 6px; }
.ist-row { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.ist-ic { flex: none; width: 18px; text-align: center; color: var(--deep-water); }
.ist-note { font-size: 15px; line-height: 1.45; background: var(--sand-light); border-radius: 4px; padding: 8px 12px; }
.ist-note::before { content: '«'; } .ist-note::after { content: '»'; }
.ist-ask { align-self: flex-start; margin-top: 4px; min-height: 40px; }
.ipr-calbox { background: var(--paper); border: 1px solid var(--sand-line); border-radius: 6px; padding: 14px; position: sticky; top: 96px; }
.ipr-calh { font: 600 12px var(--f-mono); text-transform: uppercase; margin: 0 0 8px; color: var(--deep-water); }
.ipr-calbox .hint { margin: 8px 0 0; }
.ipr-calbox .cal-d.is-av:not([aria-disabled]) { cursor: pointer; }

/* ---------- Anfrage-Fenster ---------- */
.rider-dlg.req-dlg { width: min(96vw, 820px); }
.req-form { gap: 18px !important; }
.req-top { display: flex; flex-direction: column; gap: 10px; }
.req-top > * { margin: 0; }
.req-grid { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 28px; align-items: start; }
.req-grid[hidden] { display: none; }
.req-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.req-col > * { margin: 0; }
.req-h { display: flex; align-items: center; gap: 8px; font: 800 17px var(--f-display); margin: 0; }
.req-h b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--salt); font: 600 13px var(--f-mono); }
.req-h b[hidden] { display: none; }
.req-picked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 0; }
.req-picked .chip { background: var(--ink); color: var(--salt); border: 0; font-size: 13px; padding: 4px 4px 4px 10px; }
.req-picked .chip button { color: var(--salt); font-size: 17px; line-height: 1; min-width: 24px; min-height: 24px; }
.req-picked .link-quiet { padding: 4px 0; font-size: 13px; }
.req-flex { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px dashed var(--sand-dark); border-radius: 6px; cursor: pointer; }
.req-flex[hidden] { display: none; }
.req-flex input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.req-flex span { display: flex; flex-direction: column; gap: 2px; }
.req-flex small { font-size: 13px; color: var(--ink-soft); }
.req-flex:has(input:checked) { border-style: solid; border-color: var(--ink); background: var(--sand-light); }
.req-offers { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.req-offer { position: relative; display: block; cursor: pointer; }
.req-offer input { position: absolute; opacity: 0; }
.req-offer > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; border: 1.5px solid var(--sand-dark); border-radius: 6px; background: var(--paper); }
.req-offer strong { font-size: 15px; }
.req-offer small { grid-column: 1; font: 12px var(--f-mono); color: var(--ink-soft); }
.req-offer b { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font: 600 15px var(--f-mono); }
.req-offer b small { display: block; font-weight: 400; font-size: 11px; }
.req-offer input:checked + span { border: 2px solid var(--ink); background: var(--sand-light); padding: 9.5px 11.5px; }
.req-offer input:focus-visible + span { outline: 3px solid var(--kite); outline-offset: 2px; }
.req-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; }
.req-stepper { display: flex; align-items: stretch; border: 1px solid var(--sand-dark); border-radius: 4px; background: var(--paper); height: 44px; }
.req-stepper button { width: 40px; border: 0; background: none; font: 700 20px var(--f-display); color: var(--ink); cursor: pointer; }
.req-stepper input { width: 40px; border: 0 !important; text-align: center; font: 600 16px var(--f-mono) !important; min-height: 0 !important; padding: 0 !important; background: none !important; -moz-appearance: textfield; }
.req-stepper input::-webkit-inner-spin-button, .req-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.req-msg { display: flex; flex-direction: column; gap: 10px; }
.req-msg > * { margin: 0; }
.req-bar { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px 18px; background: var(--paper); border-top: 1px solid var(--sand-line);
  display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.req-bar > * { margin: 0; }
.req-sum { font-size: 15px; line-height: 1.4; }
.req-sum:empty { display: none; }
.req-est { display: inline-block; margin-left: 8px; font: 600 13px var(--f-mono); color: var(--palm); }
.req-bar .saved:empty { display: none; }
.req-bar .step-actions { margin: 0; }

@media (max-width: 760px) {
  .ipr-when { grid-template-columns: minmax(0, 1fr); }
  .ipr-calbox { position: static; order: -1; }
  .req-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rider-dlg.req-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .rider-dlg.req-dlg form { max-height: 100dvh; height: 100%; padding: 18px 16px 24px; }
  .req-bar { margin: 0 -16px -24px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .cal { --cal-size: 44px; }
}
#when { scroll-margin-top: 110px; }

/* Offene Gruppen-Lektionen im Profil (instructor_busy.groups) */
.ipr-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ist--group { border-left-color: var(--kite); }
.ist--group .ist-place { font-size: 18px; }

/* ---------- Orte mit Farbe (Profil + Anfrage): p0 Shallows, p1 Sand/Orange, p2 Lagoon ---------- */
.cal-d.is-av.is-p1:not(.is-sel) { background: #F6C9A8; }
.cal-d.is-av.is-p2:not(.is-sel) { background: #B7C9E8; }
.lg--p0 { background: var(--shallows); }
.lg--p1 { background: #F6C9A8; }
.lg--p2 { background: #B7C9E8; }
.ist--p1 { border-left-color: #E9915A; }
.ist--p2 { border-left-color: #6E8FC4; }
.ist.is-flash { box-shadow: 0 0 0 3px var(--kite); transition: box-shadow .3s; }
.ist-mk--p1 { background: #E9915A !important; }
.ist-mk--p2 { background: #6E8FC4 !important; }
.ipr-where { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px; padding: 14px 16px; border-radius: 10px; background: var(--paper); border: 1px solid var(--sand-line); }
.ipr-where > * { margin: 0; }
.ipr-where-h { font-size: 16px; }
.ipr-where-h a { color: var(--deep-water); }
.ipr-pls { display: flex; flex-wrap: wrap; gap: 8px; }
.ipr-pl { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%; padding: 8px 12px 8px 14px; border-radius: 8px; text-decoration: none; color: var(--ink);
  background: #E4F4F2; border-left: 5px solid var(--lagoon); }
.ipr-pl b { font: 800 16px var(--f-display); display: flex; align-items: center; gap: 6px; }
.ipr-pl small { font: 12px var(--f-mono); color: var(--ink-soft); }
.ipr-pl.is-p1 { background: #FDEBDD; border-left-color: #E9915A; }
.ipr-pl.is-p2 { background: #E6ECF7; border-left-color: #6E8FC4; }
.ipr-pl:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.req-places { border: 0; padding: 0; margin: 0 0 4px; display: grid; gap: 6px; }
.req-place { position: relative; cursor: pointer; }
.req-place input { position: absolute; opacity: 0; }
.req-place > span { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1.5px solid var(--sand-dark); border-left: 5px solid var(--lagoon); border-radius: 6px; background: var(--paper); }
.req-place.is-p1 > span { border-left-color: #E9915A; }
.req-place.is-p2 > span { border-left-color: #6E8FC4; }
.req-place small { font: 12px var(--f-mono); color: var(--ink-soft); }
.req-place input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--sand-light); }
.req-place input:checked + span strong::after { content: ' ✓'; }
.req-place input:focus-visible + span { outline: 3px solid var(--kite); outline-offset: 2px; }
.req-where1 { margin: 0 0 4px; }
.req-where { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--sand-line); padding-top: 14px; }
.req-where > * { margin: 0; }
.req-where[hidden] { display: none; }
.req-where input[type=search] { width: 100%; min-height: 44px; border: 1px solid var(--sand-dark); border-radius: 4px; padding: 0 10px; font: 16px var(--f-display); background: var(--paper); }
.req-spots { border: 0; padding: 0; margin: 0; }
.req-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.req-chip { position: relative; }
.req-chip input { position: absolute; opacity: 0; inset: 0; }
.req-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--sand-dark); border-radius: 18px; font-size: 14px; cursor: pointer; background: var(--paper); }
.req-chip input:checked + span { background: var(--ink); color: var(--salt); border-color: var(--ink); }
.req-chip input:focus-visible + span { outline: 3px solid var(--kite); outline-offset: 2px; }

/* Orts-Formular: Ankunft/Abreise + Tage anderer Reisen */
.cal-d.is-end:not(.is-past) { background: var(--ink) !important; color: var(--salt) !important; }
.cal-d.is-busy { background: repeating-linear-gradient(135deg, #F6C9A8 0 4px, transparent 4px 8px); color: var(--ink-soft); cursor: not-allowed; }
.lg--busy { background: repeating-linear-gradient(135deg, #E9915A 0 2px, transparent 2px 4px); }
/* Instructor › Places & times: Schulen in der Nähe einer Reise (instructor-edit.js nearSchools, Migration 20261019000013) */
.ied-schools { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 8px; border-top: 1px dashed var(--sand-line, #e3d5b8); }
.ied-open { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ied-near { padding: 22px 24px; }
.ied-near-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.ied-near-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 14px;
  border: 1px solid var(--sand-line, #e3d5b8); border-radius: 10px; background: var(--paper, #fffdf8); }
.ied-ask { margin: 4px 0 10px; padding: 14px; border: 1.5px solid var(--kite, #ee5a2f); border-radius: 10px; background: var(--paper, #fffdf8); display: grid; gap: 8px; }
.ied-ask p { margin: 0; }
.ied-wd { display: flex; flex-wrap: wrap; gap: 6px; }
.ied-wd button { min-width: 44px; padding: 6px 10px; border: 1.5px solid var(--ink, #17262b); border-radius: 999px; background: var(--paper, #fffdf8); font: 600 13px var(--f-mono, monospace); cursor: pointer; }
.ied-wd button[aria-pressed="true"] { background: var(--ink, #17262b); color: var(--salt, #fff); }
