/* REQ-126: the Team calendar. The colour tokens (:root) and shared components are in ../styles.css; this file never defines :root variables. */

/* ── Team calendar (REQ-70.3) ─────────────────────────────────────────
   One neutral block style for every meeting (the meeting status token on the
   edge, no per-agent colours); states in shape + words; 44 px targets. */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.cal-seg, .cal-nav { display: inline-flex; gap: 4px; }
.cal-seg .btn, .cal-nav .btn { min-height: 44px; min-width: 44px; }
.cal-seg .btn.on { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.cal-range { margin: 0; font: 700 16px/1.3 var(--font-display); }
.cal-night { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.cal-night input { width: 20px; height: 20px; }
.cal-filters { margin-bottom: 12px; }
/* REQ-147: the 'Filters · N' button, the active filters line, the panel. */
.cal-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cal-fbtn { min-height: 44px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 0 16px; font-size: 14px; }
.cal-fbtn.on { background: var(--accent-soft); border-color: var(--accent); }
.cal-fbtn::before { content: '⚲'; margin-right: 6px; color: var(--mute); }
.cal-factive { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.cal-fpill { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 0 12px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); font: 600 13px/1.2 var(--font-body); overflow-wrap: anywhere; }
.cal-fx { font-size: 16px; color: var(--mute); }
.cal-fpill:hover .cal-fx { color: var(--ink); }
.cal-fpanel { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: 360px; max-width: 100vw; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--ink); display: none; flex-direction: column; }
.cal-fpanel[open] { display: flex; }
.cal-fpanel::backdrop { background: var(--spot-dim); }
.cal-fpanel.sheet { margin: auto 0 0 0; width: 100vw; height: auto; max-height: 85vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.cal-fphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px; }
.cal-fphead h2 { margin: 0; font: 700 18px/1.2 var(--font-display); }
.cal-fphead .btn, .cal-fpfoot .btn { min-height: 44px; }
.cal-fpbody { flex: 1; overflow-y: auto; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.cal-fpfoot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.cal-fpcount { flex: 1; color: var(--mute); font-size: 13px; }
.ms { display: flex; flex-direction: column; gap: 6px; }
.ms-label { font: 700 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.ms-box { display: flex; align-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.ms-box:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-input { flex: 1; min-width: 0; min-height: 42px; border: 0; background: transparent; color: var(--ink); padding: 0 10px; font: 500 14px/1.2 var(--font-body); }
.ms-input:focus { outline: none; }
.ms-input::placeholder { color: var(--faint); }
.ms-sum { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ms-caret { min-width: 44px; min-height: 42px; border: 0; background: transparent; color: var(--mute); cursor: pointer; }
.ms-list { list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.ms-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; cursor: pointer; }
.ms-opt.active { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.ms-opt:hover { background: var(--sunken); }
.ms-check { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1.5px solid var(--mute); border-radius: 5px; font-size: 13px; font-weight: 800; color: var(--accent); background: var(--panel); }
.ms-opt[aria-selected="true"] .ms-check { border-color: var(--accent); background: var(--accent-soft); }
.ms-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ms-all .ms-text { font-weight: 700; color: var(--mute); }
.ms-count { font: 600 12px/1 var(--font-mono); color: var(--faint); }
.cal-flabel { font: 700 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cal-fchip { min-height: 44px; border-radius: 999px; padding: 0 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.cal-fchip.on { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.cal-clear { min-height: 44px; }
.cal-scroll { overflow: auto; max-height: calc(100dvh - 260px); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.cal-grid { display: grid; grid-template-columns: 52px repeat(var(--cal-days), minmax(120px, 1fr)); grid-template-rows: auto var(--cal-h); min-width: 0; }
.cal-corner, .cal-dayhead { position: sticky; top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 10px 8px; font: 700 13px/1.2 var(--font-body); color: var(--mute); }
.cal-dayhead.today { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.cal-axis { position: relative; border-right: 1px solid var(--line); }
.cal-axis span { position: absolute; right: 6px; transform: translateY(-50%); font: 11px/1 var(--font-mono); color: var(--faint); }
.cal-axis span:first-child { transform: none; }
.cal-col { position: relative; border-right: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, var(--line) 59px, var(--line) 60px); }
.cal-block { position: absolute; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: flex-start; text-align: left;
  padding: 4px 6px; border: 1px solid var(--line); border-left: 4px solid var(--office-status-meeting); border-radius: 8px; background: var(--meeting-soft); color: var(--ink); font: 12px/1.3 var(--font-body); cursor: pointer; }
.cal-block > * { flex: none; }
.cal-block:hover { border-color: var(--office-status-meeting); }
.cal-block:focus-visible, .cal-arow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 3; }
.cal-subj { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-when { color: var(--mute); font-size: 12px; }
.cal-row, .cal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cal-av { border-radius: 50%; background: var(--sunken); flex: none; }
.cal-more-av { font: 700 11px/1 var(--font-mono); color: var(--mute); }
.cal-state, .cal-chip, .cal-mark { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); white-space: nowrap; background: var(--panel); color: var(--ink); }
a.cal-chip { min-height: 28px; text-decoration: none; }
a.cal-chip:hover { text-decoration: underline; }
.cal-mark.needs { border-color: var(--needs); color: var(--needs); }
/* REQ-71.2: Long and Conflicts flags, in the chip style, icon + words. */
.cal-flag { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--needs); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); white-space: nowrap; background: var(--panel); color: var(--needs); }
a.cal-flag { min-height: 28px; text-decoration: none; }
a.cal-flag:hover { text-decoration: underline; }
.cal-dlist a.cal-flag { margin-left: 6px; white-space: normal; }
.cal-due { display: inline-block; margin-left: 6px; color: var(--mute); font-size: 13px; }
.cal-dlist .cal-flag.f-overdue { margin-left: 6px; }
/* REQ-71.3: a question's answer options, each with its full text. */
.cal-opts { margin-top: 6px; }
.cal-flag.compact { padding: 0 5px; }
/* REQ-101.3: a new agent's introduction meeting: a waving hand and the word, neutral chip with the accent outline. */
.cal-intro { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--accent); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); white-space: nowrap; background: var(--panel); color: var(--ink); }
.cal-state.s-open .cal-shape { color: var(--office-status-meeting); animation: cal-pulse 1.6s ease-in-out infinite; }
@keyframes cal-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cal-state.s-open .cal-shape { animation: none; } }
.cal-moremtg { position: absolute; left: 2px; right: 2px; min-height: 44px; z-index: 2; font-size: 12px; background: var(--panel); }
.cal-outside { color: var(--mute); font-size: 13px; margin: 8px 0 0; }
.cal-agenda { display: flex; flex-direction: column; gap: 12px; }
.cal-ahead { position: sticky; top: 0; z-index: 1; margin: 0; padding: 8px 0; background: var(--bg); font: 700 14px/1.2 var(--font-display); }
.cal-alist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-arow { display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 44px; box-sizing: border-box; text-align: left; padding: 10px 12px;
  border: 1px solid var(--line); border-left: 4px solid var(--office-status-meeting); border-radius: 10px; background: var(--panel); color: var(--ink); font: 14px/1.35 var(--font-body); cursor: pointer; }
.cal-arow .cal-subj { white-space: normal; overflow-wrap: anywhere; }
.cal-first { color: var(--mute); overflow-wrap: anywhere; }
.cal-empty { padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--mute); }
.cal-empty .oi-btns { justify-content: center; }
.cal-empty .btn { min-height: 44px; }
.cal-detail { inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; box-sizing: border-box; padding: 16px 20px 24px;
  border: 0; border-left: 1px solid var(--line); background: var(--panel); color: var(--ink); overflow: auto; }
.cal-detail::backdrop { background: rgba(8, 6, 14, 0.25); }
.cal-dtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal-dclose { min-height: 44px; min-width: 44px; }
.cal-detail h2 { font: 700 20px/1.25 var(--font-display); margin: 8px 0; overflow-wrap: anywhere; }
.cal-detail h2:focus { outline: none; }
.cal-dmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-dwhen { color: var(--mute); margin: 8px 0 0; }
.cal-dsec { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.cal-dsec h3 { margin: 0; font: 700 11px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cal-people, .cal-dlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-people li { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.cal-people a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.cal-role { color: var(--mute); font-size: 13px; }
.cal-dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-actions li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cal-wait { flex-basis: 100%; color: var(--needs); font-size: 13px; }
.cal-actions .cal-opts { flex-basis: 100%; }
.cal-dnote { color: var(--mute); }
.cal-dsub { color: var(--mute); font-size: 13px; margin: 0; }
@media (max-width: 600px) {
  .cal-detail { inset: 0; width: 100vw; border-left: 0; }
  .cal-bar { gap: 8px; }
  .cal-range { flex-basis: 100%; order: -1; }
}
@media (max-width: 1180px), (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  .cal-corner, .cal-dayhead, .cal-ahead { top: var(--nav-h, 0px); }
}

/* REQ-95.4 (Pablo): Rondos in the Team calendar. A planned one is a dashed
   block with 'Planned' until it starts; a Rondo chip (circle of arrows and
   words) marks them; each idea's outcome is a chip in words. */
.cal-block.planned, .cal-arow.planned { border-style: dashed; background: transparent; }
.cal-block.planned .cal-subj, .cal-arow.planned .cal-subj { color: var(--mute); }
.cal-rondo { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); white-space: nowrap; background: var(--panel); color: var(--ink); }
.cal-outcome { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 0 8px; font: 700 11px/1.8 var(--font-mono); border: 1px solid currentColor; margin-right: 4px; }
.cal-outcome.o-to-suggest { color: var(--done); }
.cal-outcome.o-parked { color: var(--mute); }
.cal-outcome.o-dropped { color: var(--blocked); }

/* REQ-106.3: the daily scrums in the Team calendar. */
.cal-pods { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.cal-podrow { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-podchip { display: inline-flex; align-items: center; gap: 6px; }
.cal-poddot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line); }
.cal-poddots { gap: 3px; }
.cal-block.scrum, .cal-arow.scrum { border-left-color: var(--accent); background: var(--panel); }
.cal-block.scrum.planned, .cal-arow.scrum.planned { border-style: dashed; border-left-style: solid; }
.cal-state.s-running .cal-shape { color: var(--office-status-meeting); animation: cal-pulse 2s ease-in-out infinite; }
.cal-state.s-no-scrum, .cal-state.s-planned { color: var(--mute); }
@media (prefers-reduced-motion: reduce) { .cal-state.s-running .cal-shape { animation: none; } }
.cal-dsum { font-weight: 700; margin: 4px 0 8px; }
.cal-scrumday, .cal-updates, .cal-scrumqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-scrumrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%; min-height: 44px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.cal-upd, .cal-sq { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cal-upd.missing { color: var(--mute); border-style: dashed; }
.cal-updh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-updh a { min-height: 28px; display: inline-flex; align-items: center; }
.cal-dnb { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0 0; }
.cal-dnb dt { font: 700 11px/1.7 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.cal-dnb dd { margin: 0; overflow-wrap: anywhere; }
.cal-dnb dd.muted { color: var(--mute); }
.cal-flag.f-blocked { border-color: var(--blocked); color: var(--blocked); }
.cal-qstate.s-answered { border-color: var(--done); color: var(--done); }
.cal-qstate { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); }
.cal-qstate.s-open { border-color: var(--needs); color: var(--needs); }
.cal-answer { margin: 4px 0 0; font-weight: 600; }
.cal-avh { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font: 700 12px/1 var(--font-body); }
.cal-sq .btn { min-height: 44px; margin-top: 6px; }
@media (max-width: 600px) { .cal-podrow { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; } .cal-pods { flex-wrap: nowrap; flex-direction: column; align-items: stretch; } }
/* UAT-76: an update filled from the agent's card at the end of the scrum, in words. */
.cal-fromcard { display: inline-flex; align-items: center; border: 1px dashed var(--line); border-radius: 999px; padding: 0 7px; font: 600 11px/1.7 var(--font-mono); color: var(--mute); }
