/* Free time selection and its Block dialog (JS/alt/alt-calendar-free.js). The runs themselves are drawn by the calendar grid inside its bands
   (alt-calendar-grid.css); this sheet owns the slot states a run reuses, the floating selection bar and the dialog. Tokens only. */

.a-cfree-hint{ font-size:var(--a-fs-12); color:var(--a-dim); }
.a-cfree-hint.a-cfree-reason{ flex:1 1 100%; padding:6px 10px; border:1px solid var(--a-amber); border-radius:var(--a-r-sm); background:var(--a-amber-soft); color:var(--a-text); }

/* ---------- one slot ---------- */
.a-cfree-sl{
  display:flex; align-items:center; gap:8px; min-width:0; min-height:32px; padding:3px 8px;
  border:0; border-top:1px solid var(--a-line-soft); background:transparent; color:var(--a-text);
  font:var(--z-p, 13px)/var(--a-lh-ui) var(--a-body); text-align:left; position:relative;
}
/* The now line sits inside the slot the minute falls in, at its share of the slot (JS/alt/alt-calendar-grid.js draws it). */
.a-cfree-sl > .a-cg-now{ position:absolute; left:0; right:0; margin:0; height:10px; transform:translateY(-50%); z-index:0; }
.a-cfree-sl > .a-cfree-lab, .a-cfree-sl > .a-cfree-t{ position:relative; z-index:1; }
.a-cfree-sl > .a-cg-now .a-cg-now-t{ display:none; }

.a-cfree-lab{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-cfree-t{ margin-left:auto; flex:none; font:var(--z-s, 12px)/var(--a-lh-ui) var(--a-body); font-variant-numeric:tabular-nums; color:var(--a-dim); }
.a-cfree-sl.busy{ background:var(--a-raised); }
.a-cfree-sl.free{ background:var(--a-green-soft); box-shadow:inset 3px 0 0 var(--a-green); cursor:pointer; }
.a-cfree-sl.free:hover{ box-shadow:inset 3px 0 0 var(--a-green), inset 0 0 0 1px var(--a-green); }
.a-cfree-sl.free:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; }
.a-cfree-sl.sel{ background:var(--a-blue-soft); box-shadow:inset 3px 0 0 var(--a-blue); }
.a-cfree-sl.sel:hover{ box-shadow:inset 3px 0 0 var(--a-blue), inset 0 0 0 1px var(--a-blue); }
.a-cfree-sl.sel .a-cfree-lab{ color:var(--a-blue-text); font-weight:700; }
.a-cfree-sl.pending{
  background:repeating-linear-gradient(45deg, var(--a-blue-soft) 0 6px, var(--a-panel) 6px 12px);
}
.a-cfree-sl.pending .a-cfree-lab{ color:var(--a-blue-text); font-weight:700; }
.a-cfree-sl.blocked{ background:var(--a-raised); box-shadow:inset 3px 0 0 var(--a-line-strong); }
.a-cfree-sl.blocked .a-cfree-lab{ font-weight:700; }
/* A meeting STRIDE sent (kind 'meeting'): the same pending stripe, and an accepted one takes the grid's dashed meeting edge so it never reads as a block. */
.a-cfree-sl.mtg.blocked{ box-shadow:inset 3px 0 0 var(--a-blue); border-top-style:dashed; }
.a-cfree-sl.mtg .a-cfree-lab{ font-weight:700; }
/* Edit / Cancel meeting… on a meeting STRIDE sent; the question that replaces the label wraps rather than clipping the buttons. */
.a-cfree-acts{ display:inline-flex; flex:none; gap:4px; margin-left:auto; position:relative; z-index:1; }
.a-cfree-sl.asking{ flex-wrap:wrap; }
.a-cfree-sl.asking .a-cfree-lab{ white-space:normal; }
.a-cfree-sl.past{ color:var(--a-faint); }
/* A busy, pending or blocked slot already over: the grid's past vocabulary (alt-calendar-grid.css .a-cg-ev.ended), mirrored here.
   --a-panel ground, --a-faint ink, a 1px dotted edge and a clock glyph; never opacity, never a strikethrough (that means cancelled).
   The words stay: the title, "Pending", the blocked square. */
.a-cfree-sl.busy.past, .a-cfree-sl.pending.past, .a-cfree-sl.blocked.past{
  background:var(--a-panel); box-shadow:none; border:1px dotted var(--a-line-soft); color:var(--a-faint);
}
.a-cfree-sl.busy.past .a-cfree-lab, .a-cfree-sl.pending.past .a-cfree-lab, .a-cfree-sl.blocked.past .a-cfree-lab,
.a-cfree-sl.past .a-cfree-d, .a-cfree-sl.past .a-cfree-t{ color:var(--a-faint); font-weight:400; }
.a-cfree-sl.busy.past .a-cfree-lab::before, .a-cfree-sl.pending.past .a-cfree-lab::before, .a-cfree-sl.blocked.past .a-cfree-lab::before{
  content:""; display:inline-block; width:9px; height:9px; margin-right:6px; vertical-align:-1px; box-sizing:border-box;
  border:1px solid currentColor; border-radius:50%;
  background:linear-gradient(currentColor,currentColor) 50% 15% / 1px 35% no-repeat, linear-gradient(currentColor,currentColor) 50% 50% / 30% 1px no-repeat;
}
.a-cfree-sl.c{ min-height:26px; padding:2px 6px; font-size:var(--z-s, 12px); }

/* A task dragged over an open slot: the grid's drop wash, and the slot says what the drop does (calFreeDropLabel via data-drop).
   The slot's own words step aside for the label; nothing animates. */
.a-cfree-sl.free.dragover{
  background:var(--a-blue-soft); background:color-mix(in srgb, var(--a-blue) 14%, transparent);
  box-shadow:inset 3px 0 0 var(--a-blue); outline:1px dashed var(--a-blue); outline-offset:-2px;
}
.a-cfree-sl.free.dragover > .a-cfree-lab, .a-cfree-sl.free.dragover > .a-cfree-t, .a-cfree-sl.free.dragover > .a-cg-free-h{ display:none; }
.a-cfree-sl.free.dragover::after{
  content:attr(data-drop); position:relative; z-index:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:var(--a-fs-11); font-weight:600; color:var(--a-blue-text);
}
/* Placing (Block time… on a task): every slot that can take it carries a static dashed green edge. */
.a-cfree-sl.free.place{ outline:1px dashed var(--a-green); outline-offset:-3px; }
.a-cfree-sl.free.place:focus-visible{ outline:2px solid var(--a-ring); outline-offset:-2px; }

/* ---------- the selection bar: sticks to the bottom of the calendar's own scroll ---------- */
.a-cfree-bar{
  position:sticky; bottom:8px; z-index:1; display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; min-width:0;
  margin-top:var(--a-1); padding:8px 12px; border:1px solid var(--a-blue); border-radius:var(--a-r-lg);
  background:var(--a-raised); box-shadow:var(--a-shadow);
}
.a-cfree-count{ font-size:var(--z-p,13px); font-weight:700; }
.a-cfree-ctl{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; margin-left:auto; }

/* ---------- the Block dialog: the add-to-day dialog's size and sections ---------- */
.a-cfree-dlg{ width:min(480px, 92vw); height:auto; max-height:88vh; }
.a-cfree-dlg .a-drawer-h h2{ flex:1 1 auto; min-width:0; }
.a-cfree-dlg .a-drawer-b{ display:flex; flex-direction:column; gap:var(--a-3); min-height:0; overflow:auto; }
.a-cfree-dlg .a-drawer-b > p{ margin:0; }
.a-cfree-dlg .a-drawer-f{ flex-wrap:wrap; }
.a-cfree-sum{ font-size:var(--a-fs-13); font-weight:600; }
.a-cfree-dlg-days{ max-height:200px; overflow:auto; padding:6px 10px; border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm); background:var(--a-bg); }
.a-cfree-dlg-day{ margin:6px 0 0; font-size:var(--a-fs-12); font-weight:700; }
.a-cfree-dlg-day:first-child{ margin-top:0; }
.a-cfree-dlg-list{ margin:2px 0 0 18px; padding:0; font-size:var(--a-fs-13); font-variant-numeric:tabular-nums; }
.a-cfree-people{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; }
.a-cfree-people > .a-hint{ margin:0; }
/* Length (a task's block): the shared segmented control at its own height, hugging its options (at most five short ones fit 420). */
.alt-app .a-cfree-dlg .a-cfree-len{ align-self:flex-start; }
.a-cfree-err:not([hidden]){ padding:6px 9px; border:1px solid var(--a-red); border-radius:var(--a-r-sm); background:var(--a-red-soft); color:var(--a-text); }

@media (max-width:640px){
  .a-cfree-bar{ padding:6px 8px; gap:4px 8px; }
  .a-cfree-ctl{ gap:4px 6px; }
}
@media (prefers-reduced-motion:no-preference){
  .a-cfree-sl{ transition:background-color var(--dur-micro, 140ms) linear, box-shadow var(--dur-micro, 140ms) linear; }
}

/* A slot with a detail line stacks it under the label. */
.a-cfree-sl.has-d{ flex-direction:column; align-items:flex-start; justify-content:center; gap:0; }
.a-cfree-sl.has-d > .a-cfree-lab, .a-cfree-d{ max-width:100%; }
.a-cfree-d{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:var(--z-c, 11px)/var(--a-lh-ui) var(--a-body); color:var(--a-dim); position:relative; z-index:1; }
.a-cfree-sl.run{ min-height:calc(var(--a-cfree-n, 1) * 32px); }
.a-cfree-sl.run.c{ min-height:calc(var(--a-cfree-n, 1) * 26px); }
