/* ARENA Apple test — the schedule as a calendar. Remove with calendar.js. */
.cal-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.cal-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.cal-main { padding: 16px; min-width: 0; }

/* small month calendar */
.mini-cal { padding: 14px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mini-head b { color: var(--heading); }
/* the chevron icon points left: "previous" points back and "next" points forward in each language (review fix 2026-11-13) */
.mini-head .btn:last-child .icon { transform: scaleX(-1); }
[dir="rtl"] .mini-head .btn:last-child .icon { transform: none; }
[dir="rtl"] .mini-head .btn:first-child .icon { transform: scaleX(-1); }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.mini-grid > span { font-size: var(--fs-meta); color: var(--muted); padding: 4px 0; }
.mini-grid button { border: 0; background: transparent; border-radius: 999px; aspect-ratio: 1; min-height: 34px; font-weight: 600; color: var(--ink); cursor: pointer; }
.mini-grid button:hover { background: var(--blue-tint); }
.mini-grid button.other { color: var(--muted); opacity: .55; }
.mini-grid button.wk { background: var(--blue-tint); border-radius: 8px; }
.mini-grid button.today { box-shadow: inset 0 0 0 2px var(--blue); }
.mini-grid button.sel { background: var(--blue); color: var(--white); }

/* coaches */
.coach-panel { padding: 14px; display: grid; gap: 6px; }
.coach-panel .h3 { margin: 0 0 4px; }
.coach-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--heading); min-height: 44px; }
.coach-opt:hover { background: var(--frame); }
.coach-opt.on { background: var(--t, var(--blue-tint)); }
.coach-opt input { width: 20px; height: 20px; accent-color: var(--c, var(--blue)); margin: 0; flex: none; }
.coach-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; flex: none; vertical-align: middle; margin-inline-end: 6px; }
.coach-opt .coach-dot { margin: 0; }
.coach-cell { display: inline-flex; align-items: flex-start; gap: 4px; }
.coach-cell .coach-dot { margin-top: 6px; }

/* toolbar */
.cal-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav .cal-label { font-size: var(--fs-h3, 1.15rem); color: var(--heading); min-width: 150px; text-align: center; }
[dir="ltr"] .cal-nav > .btn:nth-child(3) .icon { transform: scaleX(-1); }
[dir="rtl"] .cal-nav > .btn:first-child .icon { transform: scaleX(-1); }
.cal-views { min-width: min(100%, 380px); }
.cal-tip { margin-bottom: 10px; }
.cal-note { margin: 0 0 10px; }

/* week and day grids */
.cal-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; }
.sc-grid { --hh: 92px; min-width: calc(64px + var(--cols) * 92px); }
.sc-head, .cal-body { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(0, 1fr)); }
.sc-head { border-bottom: 1px solid var(--rule); background: var(--blue-tint); position: sticky; top: 0; z-index: 2; }
.cal-dh { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border: 0; background: transparent; font: inherit; color: var(--muted); border-inline-start: 1px solid var(--rule); cursor: default; }
button.cal-dh { cursor: pointer; }
button.cal-dh:hover { background: var(--blue-tint); }
.cal-dh b { color: var(--heading); font-size: 1rem; }
.cal-dh.today b { background: var(--blue); color: var(--white); padding: 0 10px; border-radius: 999px; }
.cal-body { position: relative; height: calc(var(--rows, 12) * var(--hh)); }
.home-cal .sc-grid { --hh: 74px; }
.home-cal .cal-closed { display: none; }
.cal-hours { position: relative; }
.cal-hours > span { position: absolute; inset-inline: 0; transform: translateY(-50%); text-align: center; font-size: var(--fs-meta); color: var(--muted); }
.cal-hours > span:first-child { transform: none; }
.sc-grid { --line: #8E94B8; --line-soft: #D5D8EA; }
.cal-col { position: relative; border-inline-start: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--hh) / 2), var(--line-soft) calc(var(--hh) / 2) calc(var(--hh) / 2 + 1px), transparent calc(var(--hh) / 2 + 1px) var(--hh)); }
.cal-hours { border-inline-end: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hh)); }
.sc-head { border-bottom: 2px solid var(--line) !important; }
.sc-head .cal-dh { border-inline-start: 1px solid var(--line); }
.cal-scroll { border: 1px solid var(--line) !important; }
.cal-hours > span, .cal-hours > span:first-child { transform: none; padding-top: 6px; font-weight: 600; color: var(--heading); }
.cal-col.closed { background-color: var(--frame); }
.cal-closed { position: absolute; inset-inline: 0; top: 40%; text-align: center; color: var(--muted); font-size: var(--fs-meta); font-weight: 600; }
.cal-now { position: absolute; inset-inline: 0; height: 2px; background: var(--magenta); z-index: 3; pointer-events: none; }

/* a lesson */
.cal-ev { box-shadow: 0 1px 2px rgb(6 16 106 / .08); position: absolute; display: grid; align-content: start; gap: 2px; text-align: start; overflow: hidden; padding: 8px 10px; border: 0; border-radius: 10px;
  background: var(--t); color: var(--heading); border-inline-start: 5px solid var(--c); font: inherit; font-size: 12px; line-height: 1.35; cursor: pointer; z-index: 1; }
.cal-ev:hover { box-shadow: 0 0 0 2px var(--c); z-index: 4; }
.cal-ev b { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; color: color-mix(in srgb, var(--c) 75%, #06106A); white-space: nowrap; overflow: hidden; }
.cal-ev > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--heading); font-weight: 600; font-size: 13px; }
.cal-ev > .ring { font-weight: 500; color: var(--muted); font-size: 12px; }
.ev-mark { font-style: normal; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 999px; background: var(--white, #fff); color: var(--c); margin-inline-start: 6px; flex: none; }
.ev-mark.full { background: var(--c); color: var(--white, #fff); }
.cal-ev.full { background: color-mix(in srgb, var(--c) 34%, white); }
.cal-ev.done { background: color-mix(in srgb, var(--c) 12%, white); }
.cal-ev.short { padding: 4px 10px; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px; }
.cal-ev.tight, .cal-ev.short { padding: 3px 6px; display: flex; align-items: center; gap: 5px; }
.cal-ev.tight b, .cal-ev.short b { font-size: 13px; flex: none; overflow: visible; }
.cal-ev.tight > span, .cal-ev.short > span { min-width: 0; }
.cal-ev.short b .ev-mark, .cal-ev.tight b .ev-mark { margin-inline-start: 4px; }
.cal-ev.can-drag { touch-action: none; }

/* month */
.cal-month { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.cal-mhead, .cal-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mhead { background: var(--blue-tint); border-bottom: 1px solid var(--rule); }
.cal-mdow { padding: 8px 4px; text-align: center; font-size: var(--fs-meta); color: var(--muted); font-weight: 600; }
.cal-mcell { display: grid; align-content: start; gap: 3px; min-height: 110px; padding: 6px; border: 0; border-inline-start: 1px solid var(--rule); border-top: 1px solid var(--rule); background: var(--white, #fff); text-align: start; font: inherit; cursor: pointer; min-width: 0; }
.cal-mcell:hover { background: var(--blue-tint); }
.cal-mcell > b { color: var(--heading); }
.cal-mcell.other { background: var(--frame); }
.cal-mcell.other > b { color: var(--muted); }
.cal-mcell.today > b { background: var(--blue); color: var(--white); border-radius: 999px; width: fit-content; padding: 0 8px; }
.cal-mcell.closed { background: var(--frame); }
.cal-chip { display: block; padding: 2px 6px; border-radius: 6px; background: var(--t); border-inline-start: 3px solid var(--c); font-size: .78rem; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: .78rem; color: var(--muted); font-weight: 600; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 12px; color: var(--muted); font-size: var(--fs-meta); }
.cal-legend span { display: inline-flex; gap: 6px; align-items: center; }
.cal-legend .lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.cal-legend .lg.full { background: color-mix(in srgb, var(--blue) 30%, white); border-inline-start: 3px solid var(--blue); }
.cal-legend .lg.done { background: color-mix(in srgb, var(--blue) 12%, white); border-inline-start: 3px solid var(--blue); }
.cal-legend .lg.now { background: var(--magenta); width: 3px; }

/* booking several days */
.bk-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bk-day { display: grid; gap: 2px; justify-items: center; padding: 10px 6px; min-height: 64px; border-radius: 12px; border: 1px solid var(--edge); background: var(--white, #fff); font: inherit; cursor: pointer; color: var(--heading); }
.bk-day .dn { font-weight: 700; }
.bk-day small { color: var(--muted); font-size: var(--fs-meta); }
.bk-day[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.bk-day[aria-pressed="true"] small { color: var(--white); }
.bk-day:disabled { opacity: .45; cursor: not-allowed; }
.bk-count { margin: 12px 0 0; font-weight: 700; color: var(--blue); }
.bk-plan { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.bk-plan li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--frame); }
.bk-plan li.ok .icon { color: var(--ok, #1F8A5B); }
.bk-plan li.no { background: var(--warn-tint, #FFF4D6); }
.bk-plan li.no .icon { color: var(--danger, #B42318); }
.bk-plan small { display: block; color: var(--danger, #B42318); font-weight: 600; }
.summary .bk-plan { margin: 0; }

@media (max-width: 1100px) { .cal-layout { grid-template-columns: 240px minmax(0, 1fr); } }
@media (max-width: 760px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cal-side { position: static; }
  .mini-cal { display: none; }
  .coach-panel { display: flex; gap: 8px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .coach-panel .h3, .coach-panel .hint { display: none; }
  .coach-opt { flex: none; min-height: 40px; padding: 6px 12px; border: 1px solid var(--edge); border-radius: 999px; white-space: nowrap; gap: 6px; }
  .coach-opt input { width: 16px; height: 16px; }
  .cal-main { padding: 10px; }
  .cal-views { min-width: 100%; }
  .cal-nav { width: 100%; justify-content: space-between; }
  .cal-nav .cal-label { min-width: 0; flex: 1; }
  .sc-grid { --hh: 84px; }
  .cal-mcell { min-height: 64px; }
  .cal-chip { font-size: 0; height: 6px; padding: 0; border-inline-start: 0; background: var(--c); }
}
.cal-ev.tight > .ring, .cal-ev.short > .ring { font-size: 11px; }
.cal-ev.tight .ev-mark { display: none; }

/* ---------- the schedule print sheet ---------- */
.dialog:has(.sp-wrap) { width: min(1180px, 96vw); max-width: none; }
.sp-opts { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px; }
.sp-opts .seg { min-width: 0; }
.sp-wrap { overflow: auto; }
.sp-sheet { width: 1060px; margin: 0 auto; background: #fff; color: #06106A; font-family: Cairo, "Segoe UI", sans-serif; }
.sp-page { padding: 14px 16px; background: #fff; }
.sp-page + .sp-page { margin-top: 18px; border-top: 1px dashed #8E94B8; }
.sp-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 10px; }
.sp-head img { width: 92px; }
.sp-head :is(h1, h2) { margin: 0; font-size: 22px; color: #0000A7; }
.sp-head p { margin: 2px 0 0; color: #4A5070; font-size: 13px; }
.sp-printed { font-size: 11px !important; align-self: end; }
.sp-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.sp-table th, .sp-table td { border: 1.2px solid #1B1F4B; padding: 4px; vertical-align: top; text-align: start; }
.sp-table thead th { background: #E9EBFA; text-align: center; padding: 6px 4px; }
.sp-table thead th b { display: block; font-size: 13px; }
.sp-table thead th span { display: block; font-size: 11px; font-weight: 500; color: #4A5070; }
.sp-table .sp-corner, .sp-table .sp-hour { width: 78px; white-space: nowrap; text-align: center; background: #F4F5FB; font-weight: 700; }
.sp-table td { height: 46px; }
.sp-closed { background: repeating-linear-gradient(135deg, #F1F2F7 0 6px, #fff 6px 12px); color: #4A5070; text-align: center !important; vertical-align: middle !important; font-weight: 700; }
.sp-item { display: grid; padding: 3px 6px; margin-bottom: 3px; border-radius: 4px; background: var(--t); border-inline-start: 4px solid var(--c); line-height: 1.3; break-inside: avoid; }
.sp-item b { font-size: 12.5px; }
.sp-item span { font-size: 11px; color: #22264A; }
.sp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.sp-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; font-weight: 600; }
.sp-key span { display: inline-flex; align-items: center; gap: 6px; }
.sp-key i { width: 14px; height: 14px; border-radius: 3px; background: var(--c); display: inline-block; }
.sp-foot .pole { flex: 1 1 200px; height: 6px; }
/* black and white: no fills, strong lines, the name carries everything */
.sp-sheet.bw .sp-item { background: #fff; border: 1px solid #000; border-inline-start: 4px solid #000; }
.sp-sheet.bw .sp-table thead th, .sp-sheet.bw .sp-hour, .sp-sheet.bw .sp-corner { background: #fff; }
.sp-sheet.bw .sp-key { display: none; }
.sp-sheet.bw .sp-head :is(h1, h2) { color: #000; }
.sp-sheet.bw, .sp-sheet.bw .sp-item span, .sp-sheet.bw .sp-head p { color: #000; }
@media print {
  .sp-sheet { width: auto; zoom: 1 !important; }
  .sp-page { padding: 0; break-after: page; }
  .sp-page:last-child { break-after: auto; }
  .sp-page + .sp-page { margin-top: 0; border-top: 0; }
  .sp-wrap { overflow: visible; }
}
.sp-sheet.bw .pole, .sp-sheet.bw .sp-head img { filter: grayscale(1) contrast(1.4); }

/* month view: full day names, one letter on phones (review fix 2026-11-13) */
.cal-mdow .w-n { display: none; }
@media (max-width: 600px) {
  .cal-mdow .w-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cal-mdow .w-n { display: inline; }
}
