/* Drag to move (public/js/app/dragmove.js — it loads this file the first time something is made draggable) and the
   Schedule's week grid. Greg, Oct 15 2026: "Schedule moving and everything should be easy tap and drag or click and drag." */
.dm-handle { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab; }
.dm-resize-h { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.dm-dragging, body.dm-dragging * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.dm-lifted { opacity: .35; }
.dm-ghost { position: fixed !important; z-index: 2000; pointer-events: none; margin: 0; box-shadow: 0 14px 30px rgba(4, 7, 12, .28); opacity: .96; transform-origin: 0 0; }
.dm-tag { position: fixed; left: 0; top: 0; z-index: 2001; pointer-events: none; background: var(--ink); color: var(--card); font: 700 12.5px/1 var(--display); padding: 6px 9px; border-radius: 8px; white-space: nowrap; box-shadow: 0 4px 12px rgba(4, 7, 12, .25); }
.dm-over { background: color-mix(in srgb, var(--teal) 7%, transparent) !important; }
.dm-drop { position: absolute; left: 3px; right: 3px; z-index: 4; pointer-events: none; border: 2px dashed var(--teal); border-radius: 8px; background: color-mix(in srgb, var(--teal) 14%, transparent); }
.dm-drop span { position: absolute; left: 4px; top: 2px; font: 700 11.5px var(--display); color: var(--teal); white-space: nowrap; }
.dm-drop.no { border-color: var(--stop-ink); background: color-mix(in srgb, var(--stop-ink) 12%, transparent); }
.dm-drop.no span { color: var(--stop-ink); white-space: normal; right: 4px; }

/* the "Just this one / Every week" box after a drop — a bottom sheet on a phone */
.dm-pop { position: fixed; z-index: 2100; width: min(330px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; }
.dm-pop-h { display: flex; align-items: center; gap: 8px; } .dm-pop-h b { flex: 1; font: 800 15px var(--display); }
.dm-pop-h .x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; min-width: 36px; min-height: 36px; }
.dm-pop .dm-opt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; min-height: 48px; width: 100%; }
.dm-pop .dm-opt span { font-weight: 500; font-size: 12.5px; color: var(--muted); } .dm-pop .dm-opt.main span { color: inherit; opacity: .85; }
.dm-pop .dm-opt[disabled] { opacity: .55; cursor: not-allowed; }
.dm-pop .check { font-size: 13px; }
@media (max-width: 600px) { .dm-pop { left: 16px !important; right: 16px; top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom)); width: auto; } }

/* Schedule → Week grid: days across, hours down (the Training grid's pieces, .pt-*) */
.sch-grid { grid-template-columns: 52px repeat(7, minmax(96px, 1fr)); min-width: 740px; }
.sch-grid .pt-times { position: sticky; left: 0; z-index: 5; background: var(--card); }
.sch-occ { position: absolute; left: 3px; right: 3px; z-index: 2; display: flex; flex-direction: column; overflow: hidden; padding: 3px 7px; border-radius: 8px; font-size: 12px; line-height: 1.25; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--t) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--t) 45%, transparent); border-left: 4px solid var(--t); }
.sch-occ b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sch-occ span { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-occ:hover { border-color: var(--t); } .sch-occ:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.sch-occ.cancelled { opacity: .55; } .sch-occ.cancelled b { text-decoration: line-through; }
.sch-occ.moved { box-shadow: inset 0 0 0 1px var(--warn-ink); }
.sch-occ.saving { opacity: .6; pointer-events: none; }
.sch-occ .dm-resize-h { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; cursor: ns-resize; }
.sch-occ .dm-resize-h::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: color-mix(in srgb, var(--t) 70%, transparent); }
@media (pointer: coarse) { .sch-occ .dm-resize-h { height: 16px; } }
.sch-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.sch-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.sch-hint { margin: 0 0 8px; }
