/* «לסדר» (7.11.2026, Achiya chose א׳ of dash-flex.onimli.pages.dev; arrange.js): the key by every room's title, the parts
   as cards of paper on the table while arranging (8.11.2026, «על השולחן», א׳ of arrange-feel.onimli.pages.dev), the
   drawer at the foot, the tabs as keys you pick up, and what moves by the mouse or a finger (a part, a tab, a column of
   «לקוחות», a customer, an appointment on the week). Only the dashboard's own tokens, so night follows. */

/* what the business hid */
.ar-off { display: none !important; }
/* «למי הבוט עונה» out of «צ׳אטים» (START): it still opens in its drawer, and a window of it over the page with no card under
   it (a top-layer window shows past its card's size; 8.11.2026 sweep: the settings' tree's rows of it opened on nothing) */
#who-drawer #f-who.ar-off { display: grid !important; }
.chats-layout > #f-who.ar-off:has(dialog.who-win[open]) { display: block !important; position: fixed; width: 0; height: 0; overflow: hidden; }
.page-app #room-home[data-mode="stats"] .ar-stay-off { display: none !important; }   /* «היום · מי מחכה»: hidden in «נתונים» only */

/* the key */
.ar-open { display: inline-flex; align-items: center; gap: 4px; }
.ar-open[hidden], .page-app #room-home:not([data-mode="stats"]) .ar-open { display: none; }
.ar-ic { display: inline-grid; place-items: center; }
.ar-ic svg { width: 18px; height: 18px; }

/* «דף התורים» in one column while arranging: its parts in the order they will show on a phone */
html[data-arranging] #room-calendar .tor-own { grid-template-columns: minmax(0, 1fr); }
html[data-arranging] #room-calendar .tor-own > .tor-week { grid-column: auto; grid-row: auto; }

/* the tabs while arranging: raised keys you pick up, each with its ✕; «היום» stays first, pinned, and can't go */
.ar-tab-edit { position: relative; }
.ar-tab-edit > a { cursor: grab; }
.ar-tab-edit > a:not([data-room-link="home"]) { background: var(--sheet); border-radius: 14px; box-shadow: 0 0 0 1px var(--hair), 0 6px 12px -6px rgba(27, 26, 23, 0.34); }
.ar-tab-edit > a[data-room-link="home"] { cursor: default; }   /* nothing to pick up */
.ar-tabx { position: absolute; z-index: 3; top: 2px; inset-inline-start: 2px; display: grid; width: 24px; height: 24px; place-items: center; padding: 0; color: var(--sheet); background: var(--ink); border: 2px solid var(--sheet); border-radius: 50%; cursor: pointer; }
.ar-tabx::before { content: ""; position: absolute; inset: -10px; }
.ar-tabx svg { width: 12px; height: 12px; }
.ar-tabpin { position: absolute; z-index: 3; top: 0; inset-inline-start: 6px; width: 16px; height: 19px; color: var(--ink); pointer-events: none; }
#roomnav a, #cust-order .co-tile, .board-appt { -webkit-touch-callout: none; }

/* a part, a tab, a column or a block on its way (8.11.2026, «כמו השיטה של אפל שהכל מרגיש מוחשי»): picked up a touch
   bigger with a spring and a deep shadow (--lift: screen-kit.js liftOf, less for a wide one), carried above the rest, and
   put down the same way (.ar-drop: putDown, its flight into place) */
:root { --ar-spring: cubic-bezier(.34, 1.56, .64, 1); --ar-shadow: 0 24px 50px rgba(27, 26, 23, .22), 0 6px 14px rgba(27, 26, 23, .1); }
.ar-lift, .co-col.co-lift, .dl-b.is-drag, .ar-drop { position: relative; z-index: 30; transition: scale .32s var(--ar-spring), rotate .32s var(--ar-spring), box-shadow .32s ease; }
.ar-lift, .co-col.co-lift { scale: var(--lift, 1.03); box-shadow: var(--ar-shadow); }
.dl-b.is-drag { scale: var(--lift, 1.03); }
html.ar-dragging, html.ar-dragging body { overflow-x: clip; }   /* a card past the edge doesn't widen the page (a phone zooms out), as customers-screen.css dl-dragging */
html[data-arranging] .ar-b { transform-origin: 50% 0; }      /* a card rises from its top edge; in the hand, arrange.js drag holds it where the finger is */
html.ar-dragging, html.ar-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* «על השולחן»: every part is a card of paper on the table, the whole card is what you hold */
html[data-arranging] :is(.ar-b, .ar-pinned) { position: relative; }
html[data-arranging] .ar-b {
  margin: 18px 10px; border-radius: var(--leaf-sm);
  box-shadow: 0 0 0 10px var(--sheet), 0 0 0 11px var(--hair), 0 18px 30px -16px rgba(27, 26, 23, 0.34);
  cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: box-shadow 0.3s ease, scale 0.32s var(--ar-spring), rotate 0.32s var(--ar-spring), opacity 0.2s;
}   /* they rise one after the other as the mode opens: arrange.js setEditing (in CSS it would start again whenever a card moves) */
html[data-arranging] .ar-b.ar-stay { cursor: default; }   /* «היום · מי מחכה» in «נתונים»: it stays where it is, only its ✕ */
html[data-arranging] .ar-b.ar-bare { background: var(--sheet); }
html[data-arranging] .ar-b > :not(.ar-mark) { pointer-events: none; }   /* nothing in a card is pressed while it is arranged */
html[data-arranging] .ar-b:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 13px; }
/* in the hand it is above everything, the drawer and the tabs too; over the drawer it goes small around the finger, about to go in */
html[data-arranging] .ar-b.ar-lift { z-index: 90; box-shadow: 0 0 0 10px var(--sheet), 0 0 0 11px var(--hair), 0 34px 56px -14px rgba(27, 26, 23, 0.42), 0 8px 18px rgba(27, 26, 23, 0.12); cursor: grabbing; }
html[data-arranging] .ar-b.ar-into { scale: 0.42; opacity: 0.9; }
.ar-probe { position: absolute; width: 0; height: 0; pointer-events: none; }   /* arrange.js drag: the point the finger holds */
/* the handle at the card's top edge, and ✕ at its far corner (the title starts at the near one) */
.ar-grab { position: absolute; top: -7px; left: 50%; width: 38px; height: 5px; translate: -50% 0; background: color-mix(in srgb, var(--ink) 24%, transparent); border-radius: 3px; pointer-events: none; }
.ar-xb { position: absolute; z-index: 3; top: -17px; inset-inline-end: -17px; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: var(--sheet); background: var(--ink); border: 2px solid var(--sheet); border-radius: 50%; box-shadow: 0 3px 8px rgba(27, 26, 23, 0.22); cursor: pointer; }
.ar-xb::before { content: ""; position: absolute; inset: -9px; }
.ar-xb svg { width: 13px; height: 13px; }
/* what stays: a yellow pin, drawn, holds it to the table */
.ar-pin { position: absolute; z-index: 3; top: -15px; inset-inline-start: 14px; width: 22px; height: 26px; color: var(--ink); pointer-events: none; }
.ar-pin svg, .ar-tabpin svg { display: block; width: 100%; height: 100%; }
:is(.ar-pin, .ar-tabpin, .ar-desk__drawer) svg :is(path, rect) { stroke-dasharray: 1; animation: ar-draw 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both, ar-ink 0.7s steps(1, end) 0.25s both; }
.ar-hint { grid-column: 1 / -1; margin: 2px 0 4px; color: var(--ink-2); font: 16px/1.5 var(--f-ui); text-align: center; text-wrap: balance; }
html[data-arranging] section.room:not([hidden]) { padding-bottom: 120px; }
.ar-hint__pin { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; }
.ar-hint__pin .ar-ic svg { width: 17px; height: 20px; }
html[data-arranging] .dl-toast { bottom: calc(var(--app-bottom-bar, 0px) + 86px); }
html:has(.ar-desk.is-open) .dl-toast { display: none; }   /* the open drawer shows what went in, and the toast would cover it */

/* the drawer at the foot, with «סיום» */
.ar-desk { position: fixed; z-index: 80; bottom: calc(var(--app-bottom-bar, 0px) + max(14px, env(safe-area-inset-bottom))); left: 50%; display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--sheet); border-radius: 999px; box-shadow: 0 0 0 1px var(--hair), 0 14px 34px rgba(27, 26, 23, 0.2); translate: -50% 0; transition: scale 0.3s var(--ar-spring), box-shadow 0.25s ease; }
.ar-desk[hidden] { display: none; }
.ar-desk > button { display: inline-flex; min-height: 48px; align-items: center; gap: 8px; padding: 0 20px; color: var(--ink); background: none; border: 0; border-radius: 999px; font: 17px/1 var(--f-ui); white-space: nowrap; cursor: pointer; }
.ar-desk > button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ar-desk .ar-desk__end, .ar-desk .ar-desk__end:hover { color: #1b1a17; background: var(--yellow); }
.ar-desk__drawer .ar-ic svg { width: 24px; height: 24px; }
.ar-desk__n { min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box; color: var(--sheet); background: var(--ink); border-radius: 12px; font: 14px/24px var(--f-ui); text-align: center; }
.ar-desk__n[hidden] { display: none; }
.ar-desk.is-over { scale: 1.1; box-shadow: 0 0 0 3px var(--yellow), 0 18px 40px rgba(27, 26, 23, 0.28); }
.ar-desk.is-over .ar-desk__drawer { background: color-mix(in srgb, var(--yellow) 40%, transparent); }
.ar-desk__open { position: absolute; bottom: calc(100% + 12px); left: 50%; width: min(calc(100vw - 32px), 420px); box-sizing: border-box; padding: 16px 16px 10px; background: var(--sheet); border-radius: 22px; box-shadow: 0 0 0 1px var(--hair), 0 22px 46px rgba(27, 26, 23, 0.24); translate: -50% 0; }
.ar-desk__open[hidden] { display: none; }
.ar-desk__title { margin: 0; color: var(--ink-2); font: 16px/1.45 var(--f-ui); }
.ar-folds { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; padding: 0; list-style: none; }
.ar-folds:empty { display: none; }
.ar-fold__back { font-size: 17px; }
.ar-reset { display: block; margin: 8px auto 0; }   /* «לסדר הכל כמו בהתחלה», at the drawer's end */

/* «לקוחות» in columns: a customer carried to another one; the columns by their heads */
#cust-order .co-tile { -webkit-user-select: none; user-select: none; }
.co-ghost { position: fixed; z-index: 85; margin: 0; list-style: none; pointer-events: none; transition: scale .32s var(--ar-spring), rotate .32s var(--ar-spring), box-shadow .32s ease; }
.co-ghost.is-up { scale: var(--lift, 1.04); rotate: -2deg; box-shadow: var(--ar-shadow); }
#cust-order .co-more { transition: scale .3s var(--ar-spring), box-shadow .2s; }
#cust-order .co-more.is-target { box-shadow: 0 0 0 2px var(--yellow); scale: 1.06; }
.co-gap { overflow: hidden; background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: var(--leaf-sm); outline: 1.5px dashed color-mix(in srgb, var(--ink) 26%, transparent); outline-offset: -1.5px; }
.co-tile.co-left { opacity: .35; }
.co-col.is-over { background: color-mix(in srgb, var(--yellow) 22%, transparent); box-shadow: inset 0 0 0 2px var(--yellow); }
.co-col__head[data-moves] { cursor: grab; }

/* «מגירות / לוח» and «לסדר» in the row of «לקוחות · נתונים» (only on «לקוחות»: «נתונים» has its own «לעצב») */
.ar-rowkeys { display: flex; flex: none; align-items: center; gap: 8px; margin-inline-start: auto; }
#room-customers .dl-switchrow { flex-wrap: wrap; gap: 8px; }   /* a narrow phone (360): the keys go under the switch, never off the side */
.ar-views { display: inline-flex; flex: none; gap: 2px; padding: 3px; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 999px; }
.ar-view { min-height: 36px; padding: 0 14px; color: var(--ink-2); background: none; border: 0; border-radius: 999px; font: 15px var(--f-ui); cursor: pointer; }
.ar-view[aria-pressed="true"] { color: #1b1a17; background: var(--yellow); }
.ar-view:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 480px) { .ar-rowkeys .ar-open { font-size: 0; gap: 0; } .ar-view { padding: 0 11px; } }

/* «תורים»: an appointment carried on the week, and «לחסום שעות» in the views' bar */
#cal-board-grid .board-appt[data-st="booked"] { cursor: grab; touch-action: pan-y; }
.board-appt.ar-left { opacity: .3; }
#room-calendar .cal-ghost { z-index: 4; overflow: visible !important; pointer-events: none; outline: 2px dashed var(--ink); outline-offset: -2px; transition: top .12s ease-out, scale .32s var(--ar-spring), box-shadow .32s ease; }
#room-calendar .cal-ghost.is-up { scale: 1.04; box-shadow: 0 14px 30px rgba(27, 26, 23, .2); }
.cal-ghost.is-bad { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--ink) 9%, var(--sheet)) 0 6px, var(--sheet) 6px 12px) !important; }
.cal-when { position: absolute; z-index: 5; bottom: calc(100% + 6px); inset-inline-start: 0; padding: 4px 10px; color: var(--on-band); background: var(--band); border-radius: 999px; font: 13px/1.3 var(--f-ui); white-space: nowrap; }
.ar-move { margin: 6px 0 18px; font: 17px/1.5 var(--f-ui); }
.ar-move s { color: var(--ink-soft); }
.ar-move__keys { display: grid; gap: 10px; }
#room-calendar .appts-bar #appt-block { margin: 0; }
#room-calendar .appts-bar > #appt-new:not([hidden]) { margin-inline-start: auto; }
#room-calendar .appts-bar > #appt-new[hidden] + #appt-block { margin-inline-start: auto; }
#room-calendar .appts-layout { margin-block-end: 40px; }

@keyframes ar-draw { from { stroke-dashoffset: 1; } }
@keyframes ar-ink { from { fill-opacity: 0; } }
@media (prefers-color-scheme: dark) {
  html[data-arranging] .ar-b { box-shadow: 0 0 0 10px var(--sheet), 0 0 0 11px var(--hair), 0 18px 30px -14px rgba(0, 0, 0, 0.6); }
  html[data-arranging] .ar-b.ar-lift { box-shadow: 0 0 0 10px var(--sheet), 0 0 0 11px var(--hair), 0 34px 56px -12px rgba(0, 0, 0, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .ar-lift, .co-col.co-lift, .dl-b.is-drag, .ar-drop, .co-ghost, #room-calendar .cal-ghost, #cust-order .co-more { transition: none; }
  html[data-arranging] .ar-b, .ar-desk { transition: none; animation: none; }
  :is(.ar-pin, .ar-tabpin, .ar-desk__drawer) svg :is(path, rect) { animation: none; }
}
