/*
 * The order timer (order timer step 5, 2026-11-25): the approved small card. Its own sheet and tokens: store.css and its
 * tokens are on store pages only, and the homepage band (below) uses this sheet too.
 * Three colours differ from the approved design, for AA: the closed label has no .75 opacity (3.9:1), the closed second
 * line is #595959 (was 4.35:1), the units are #5f5f5f (#6b6b6b on the seconds tile: 4.35:1).
 */
.cb-otimer, .cb-otimer * { box-sizing: border-box; }
.cb-otimer { --t-bg: #f4f4f4; --t-border: #ebebeb; --t-acc: #088800; --t-acc-bg: rgba( 8, 136, 0, .08 ); --t-acc-border: rgba( 8, 136, 0, .35 ); direction: rtl; min-width: 0; color: #404040; line-height: 1.4; font-family: Assistant, "Arial Hebrew", Arial, sans-serif; }
.cb-otimer[data-state="final"], .cb-otimer[data-state="hold"] { --t-acc: #dc3232; --t-acc-bg: rgba( 220, 50, 50, .08 ); --t-acc-border: rgba( 220, 50, 50, .45 ); }

/* The place both the page's own message and the card stand in: as tall as the card from the first paint, so neither
   answer moves the page. In em: it follows the store's text size. At the toolbar's 200% (px per
   element) and with very long edited texts a shift remains (measured: theme CLAUDE.md). */
.cb-otimer-slot { display: grid; grid-template-columns: minmax( 0, 1fr ); align-items: center; min-height: 10em; }
.cb-otimer-slot > * { grid-area: 1 / 1; } /* one cell: the message is centred, the empty mount takes no row */

.cb-otimer__card { display: grid; grid-template-columns: minmax( 0, 1fr ); gap: 10px; padding: 14px; border: 1px solid var( --t-border ); border-radius: 14px; background: var( --t-bg ); }
.cb-otimer[data-state="final"] .cb-otimer__card, .cb-otimer[data-state="hold"] .cb-otimer__card { border-color: var( --t-acc-border ); }
.cb-otimer[data-state="closed"] .cb-otimer__card { background: #e9e9e9; }
.cb-otimer__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.cb-otimer__label { font-size: 16px; font-weight: 800; color: #4a4a4a; }
.cb-otimer[data-state="closed"] .cb-otimer__label { font-weight: 700; }
.cb-otimer__sub { font-size: 14px; font-weight: 600; color: #6b6b6b; }
.cb-otimer[data-state="closed"] .cb-otimer__sub { color: #595959; }
/* Left to right: days, hours, minutes, seconds. */
.cb-otimer__tiles { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; direction: ltr; }
.cb-otimer__tile { flex: 1 1 0; min-width: min-content; /* large text: two by two, never cut */ padding: 8px 2px 7px; border: 1px solid #e1e1e1; border-radius: 10px; background: #fff; display: flex; flex-direction: column; align-items: center; }
.cb-otimer__num { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #404040; }
.cb-otimer__unit { margin-top: 4px; font-size: 12px; font-weight: 600; color: #5f5f5f; direction: rtl; text-align: center; }
.cb-otimer__tile--s { background: var( --t-acc-bg ); border-color: var( --t-acc-border ); }
.cb-otimer__tile--s .cb-otimer__num { color: var( --t-acc ); }
.cb-otimer a.cb-otimer__pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid var( --t-acc-border ); border-radius: 50px; background: var( --t-acc-bg ); color: var( --t-acc ); font-size: 15px; font-weight: 800; text-decoration: none; text-align: center; overflow-wrap: anywhere; }
.cb-otimer[data-state="closed"] a.cb-otimer__pill { border-color: #e1e1e1; background: transparent; color: #4a4a4a; }
.cb-otimer p.cb-otimer__sr, .cb-otimer__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect( 0 0 0 0 ); white-space: nowrap; border: 0; }

/*
 * The homepage band (step 6): the approved wide band in a white strip. --t-min is the tallest default state at that width:
 * the strip takes it from the first paint (data-state "loading" comes from the inline script beside the mount), and every
 * state fills it, so nothing below moves. Nothing to show = no strip. Two colours differ from the approved design, for AA:
 * the pill's green and red are darker (3.7:1 and 3.6:1 on its tint).
 */
.cb-otimer[data-cb-order-timer="band"] { --t-min: 132px; }
.cb-otimer[data-cb-order-timer="band"][data-state]:not( [data-state="unreachable"] ) { padding: 14px; min-height: calc( var( --t-min ) + 28px ); background: #fff; }
[data-cb-order-timer="band"] .cb-otimer__card { display: flex; align-items: center; align-content: center; justify-content: center; flex-wrap: wrap; gap: 24px; width: 100%; max-width: 1168px; min-height: var( --t-min ); margin: 0 auto; padding: 20px 32px; border-radius: 16px; }
[data-cb-order-timer="band"] .cb-otimer__label { font-size: 18px; }
[data-cb-order-timer="band"] .cb-otimer__sub { font-size: 15px; }
[data-cb-order-timer="band"] .cb-otimer__tiles { align-items: center; justify-content: center; gap: 8px 24px; }
[data-cb-order-timer="band"] .cb-otimer__tile { position: relative; flex: 0 0 auto; min-width: 88px; padding: 12px 16px 11px; border-radius: 12px; }
[data-cb-order-timer="band"] .cb-otimer__tile + .cb-otimer__tile::before { content: "·"; position: absolute; left: -24px; top: 50%; width: 22px; margin-top: -26px; color: #b5b5b5; font-size: 28px; line-height: 36px; text-align: center; }
[data-cb-order-timer="band"] .cb-otimer__num { font-size: 40px; }
[data-cb-order-timer="band"] .cb-otimer__unit { margin-top: 6px; font-size: 13px; }
[data-cb-order-timer="band"].cb-otimer a.cb-otimer__pill { --t-pill: #067000; max-width: 100%; padding: 12px 26px; color: var( --t-pill ); font-size: 16px; }
[data-cb-order-timer="band"].cb-otimer[data-state="final"] a.cb-otimer__pill, [data-cb-order-timer="band"].cb-otimer[data-state="hold"] a.cb-otimer__pill { --t-pill: #b51f1f; }
[data-cb-order-timer="band"].cb-otimer[data-state="closed"] a.cb-otimer__pill { --t-pill: #4a4a4a; }
/* Too narrow for one row: the pill always on its own, so a longer word or another font does not change the height. */
@media ( min-width: 669px ) and ( max-width: 1060px ) {
	.cb-otimer[data-cb-order-timer="band"] { --t-min: 264px; } /* 1.7.18: the dated title (204px before) */
	[data-cb-order-timer="band"] .cb-otimer__card { row-gap: 12px; }
	[data-cb-order-timer="band"] .cb-otimer__card::before { content: ""; order: 1; flex: 0 0 100%; }
	[data-cb-order-timer="band"] .cb-otimer__pill { order: 2; }
}
@media ( max-width: 760px ) {
	[data-cb-order-timer="band"] .cb-otimer__tiles { gap: 6px; }
	[data-cb-order-timer="band"] .cb-otimer__tile + .cb-otimer__tile::before { content: none; }
	[data-cb-order-timer="band"] .cb-otimer__tile { min-width: 68px; padding: 10px 10px 9px; border-radius: 10px; }
	[data-cb-order-timer="band"] .cb-otimer__num { font-size: 30px; }
	[data-cb-order-timer="band"] .cb-otimer__unit { margin-top: 4px; font-size: 12px; }
}
/* The approved phone band (its 640px and 400px, plus the two gutters): no pill, the second line only while closed. */
@media ( max-width: 668px ) {
	.cb-otimer[data-cb-order-timer="band"] { --t-min: 150px; } /* 1.7.18: the dated title (134px before) */
	[data-cb-order-timer="band"] .cb-otimer__card { flex-direction: column; flex-wrap: nowrap; gap: 10px; padding: 14px 12px; border-radius: 14px; }
	[data-cb-order-timer="band"] .cb-otimer__text { align-items: center; text-align: center; }
	[data-cb-order-timer="band"] .cb-otimer__label { font-size: 15px; }
	[data-cb-order-timer="band"] .cb-otimer__sub, [data-cb-order-timer="band"].cb-otimer a.cb-otimer__pill { display: none; }
	[data-cb-order-timer="band"][data-state="closed"] .cb-otimer__sub { display: block; font-size: 14px; }
}
@media ( max-width: 428px ) {
	[data-cb-order-timer="band"] .cb-otimer__tiles { width: 100%; }
	[data-cb-order-timer="band"] .cb-otimer__tile { flex: 1 1 0; min-width: min-content; padding-inline: 4px; }
	[data-cb-order-timer="band"] .cb-otimer__num { font-size: 26px; }
}

/* 1.7.18 (mockup 3): {br} in a title is a line break on the band above 1060px and nothing elsewhere (the view puts a
 * space before it). Below 1060px the band's and the card's title and note are centred; the card above is unchanged. */
.cb-otimer .cb-br { display: none; }
@media (min-width: 1061px) {
	[data-cb-order-timer="band"] .cb-br { display: block; }
}
@media (max-width: 1060px) {
	[data-cb-order-timer="band"] .cb-otimer__text, [data-cb-order-timer="card"] .cb-otimer__text { align-items: center; text-align: center; }
	/* The dated title takes two lines on the card here (172px at 320-768): the slot holds that room from the start, or
	 * the page jumps when the timer replaces the sentence (order-timer-page.test.mjs "no jump"). */
	.cb-otimer-slot { min-height: 11.5em; }
}

/* The staff hid the page's sentence and there is no free line: no green box, only the timer's place. */
body.cb-store .cb-delivery-box--bare { padding: 0; background: none; }
