/*
 * Orders › Kitchen display ( the order board; 6.0.8, the restaurant orders plan's Phase 2 ). A dark kitchen screen in every admin colour scheme: WP EasyCart
 * PRO's board ( admin/js/order-board-v2-pro.js draws it ) and the Free plan's locked preview ( wp_easycart_admin_upsell::preview_order_board() )
 * use the same markup. Kitchen mode ( body.wpec-kitchen ) lays the board over the whole window.
 */
.ecob {
	--k-bg: #0e1320;
	--k-card: #192033;
	--k-raise: #222b42;
	--k-ink: #eef1f8;
	--k-muted: #a9b1c6;
	--k-line: #2c3550;
	--k-new: #fb923c;
	--k-prep: #f4c15d;
	--k-ready: #4ade80;
	--k-late: #f87171;
	--k-later: #9aa8e6;
	--k-here: #38bdf8;
	--k-focus: #9ec5ff;
	box-sizing: border-box;
	background: var(--k-bg);
	color: var(--k-ink);
	border-radius: 14px;
	padding: 16px;
	font-size: 14px;
	line-height: 1.4;
	margin: 0 0 16px;
}
.ecob *,
.ecob *::before,
.ecob *::after {
	box-sizing: border-box;
}
.ecob button {
	font: inherit;
	cursor: pointer;
}
.ecob :focus-visible {
	outline: 3px solid var(--k-focus);
	outline-offset: 2px;
}
.ecob-sample {
	pointer-events: none;
}
/* The board's own display rules never show what the script hides. */
.ecob [hidden] {
	display: none !important;
}

/* Top bar */
.ecob-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--k-line);
}
.ecob-loc {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0;
	color: var(--k-ink);
}
.ecob-where {
	position: relative;
}
.ecob-where select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--k-raise) url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23eef1f8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E" ) no-repeat right 12px center;
	color: var(--k-ink);
	border: 1px solid var(--k-line);
	border-radius: 8px;
	min-height: 44px;
	padding: 6px 34px 6px 12px;
	font-size: 1.05rem;
	font-weight: 700;
	max-width: 100%;
}
.ecob-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--k-raise);
	color: var(--k-muted);
	font-size: 0.85rem;
}
.ecob-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--k-ready);
}
.ecob-pill.is-off .ecob-dot {
	background: var(--k-late);
}
.ecob-spacer {
	flex: 1 1 auto;
}
.ecob-clock {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 1.05rem;
	color: var(--k-muted);
}
.ecob-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--k-line);
	background: var(--k-raise);
	color: var(--k-ink);
	text-decoration: none;
	font-weight: 600;
}
.ecob-btn:hover,
.ecob-btn:focus {
	color: var(--k-ink);
	border-color: var(--k-muted);
}
.ecob-btn.is-primary {
	background: var(--k-new);
	border-color: var(--k-new);
	color: #1b0f05;
}
.ecob-btn.is-on {
	border-color: var(--k-ready);
	color: var(--k-ready);
}
.ecob-btn .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* The Start shift banner ( browsers play sound only after a tap ) and messages */
.ecob-banner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--k-raise);
	border: 1px solid var(--k-new);
}
.ecob-banner p {
	margin: 0;
	flex: 1 1 260px;
	color: var(--k-ink);
}
.ecob-msg {
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--k-raise);
	color: var(--k-ink);
}
.ecob-msg.is-error {
	border: 1px solid var(--k-late);
}

/* Lanes */
.ecob-lanes {
	display: grid;
	grid-template-columns: 0.85fr 1.2fr 1fr 1fr;
	gap: 12px;
	margin-top: 12px;
	align-items: start;
}
.ecob-lane {
	min-width: 0;
}
.ecob-lane-h {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 8px;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--k-muted);
	font-weight: 600;
}
.ecob-n {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.9rem;
	letter-spacing: 0;
}
.ecob-empty {
	padding: 18px 12px;
	border: 1px dashed var(--k-line);
	border-radius: 10px;
	color: var(--k-muted);
	text-align: center;
	font-size: 0.9rem;
}

/* Tickets */
.ecob-tk {
	background: var(--k-card);
	border-radius: 10px;
	padding: 10px 12px;
	border-left: 4px solid var(--k-later);
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 10px;
}
.ecob-tk.is-new {
	border-left-color: var(--k-new);
	box-shadow: 0 0 0 2px var(--k-new);
}
.ecob-tk.is-preparing {
	border-left-color: var(--k-prep);
}
.ecob-tk.is-ready {
	border-left-color: var(--k-ready);
}
.ecob-tk.is-late {
	border-left-color: var(--k-late);
}
.ecob-tk.is-busy {
	opacity: 0.6;
}
/* I'm here ( 6.0.8, the restaurant orders plan's 4b ): the customer said they arrived. */
.ecob-tk.is-here {
	border-left-color: var(--k-here);
	box-shadow: 0 0 0 2px var(--k-here);
}
.ecob-here {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: #0c3448;
	color: #d7f0ff;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 0.92rem;
}
.ecob-here .dashicons {
	color: var(--k-here);
	flex: none;
}
.ecob-here b {
	color: #fff;
	font-weight: 700;
}
.ecob-here-note {
	display: block;
	color: #fff;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.ecob-tk-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}
.ecob-tk-no {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--k-ink);
	text-decoration: none;
}
a.ecob-tk-no:hover,
a.ecob-tk-no:focus {
	color: var(--k-ink);
	text-decoration: underline;
}
.ecob-tk-when {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.82rem;
	color: var(--k-muted);
	text-align: right;
}
.ecob-tk-when b {
	color: var(--k-ink);
	font-weight: 600;
}
.ecob-tk-when .is-late {
	color: var(--k-late);
	font-weight: 600;
}
.ecob-tk-name {
	color: var(--k-muted);
	font-size: 0.88rem;
}
.ecob-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.ecob-chip {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--k-raise);
	color: var(--k-ink);
	font-size: 0.76rem;
	font-weight: 600;
}
.ecob-chip.is-unpaid {
	background: #3a2a12;
	color: #f5c27a;
}
.ecob-items {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.95rem;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ecob-items li {
	margin: 0;
}
.ecob-q {
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	display: inline-block;
	min-width: 22px;
	font-weight: 700;
}
.ecob-opt {
	color: var(--k-muted);
	font-size: 0.84rem;
	display: block;
	padding-left: 26px;
}
.ecob-note {
	font-size: 0.86rem;
	color: var(--k-prep);
	margin: 0;
}
.ecob-acts {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}
.ecob-go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	font-weight: 700;
	flex: 1 1 auto;
	background: var(--k-new);
	color: #1b0f05;
}
.ecob-go.is-ready,
.ecob-go.is-picked {
	background: var(--k-ready);
	color: #06210f;
}
.ecob-go.is-start {
	background: var(--k-later);
	color: #0d1433;
}
.ecob-sm {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 9px;
	background: var(--k-raise);
	color: var(--k-ink);
	border: 1px solid var(--k-line);
	border-radius: 8px;
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.86rem;
	text-decoration: none;
}
.ecob-sm:hover,
.ecob-sm:focus {
	color: var(--k-ink);
	border-color: var(--k-muted);
}
.ecob-ring {
	font-size: 0.8rem;
	color: var(--k-new);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.ecob-foot {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px solid var(--k-line);
	color: var(--k-muted);
	font-size: 0.86rem;
}
.ecob-foot b {
	color: var(--k-ink);
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-weight: 500;
}
.ecob-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

/* Kitchen mode: the board over the whole window, larger type */
body.wpec-kitchen {
	overflow: hidden;
}
body.wpec-kitchen .ecob {
	position: fixed;
	inset: 0;
	z-index: 100050;
	border-radius: 0;
	margin: 0;
	overflow: auto;
	font-size: 16px;
	padding: 18px 20px 24px;
}

/* Narrower screens */
@media ( max-width: 1100px ) {
	.ecob-lanes {
		grid-template-columns: 1fr 1fr;
	}
}
@media ( max-width: 640px ) {
	.ecob-lanes {
		grid-template-columns: 1fr;
	}
	.ecob-clock {
		display: none;
	}
}
@media ( prefers-reduced-motion: no-preference ) {
	.ecob-tk.is-new.is-ringing {
		animation: ecob-ring 1.6s ease-in-out infinite;
	}
	@keyframes ecob-ring {
		50% {
			box-shadow: 0 0 0 6px rgba( 251, 146, 60, 0.45 );
		}
	}
}

/* The location chooser ( WP EasyCart PRO's board ) */
.ecob-where {
	position: relative;
}
.ecob-where > summary {
	list-style: none;
	font-size: 1.15rem;
	font-weight: 700;
}
.ecob-where > summary::-webkit-details-marker {
	display: none;
}
.ecob-where-pop {
	position: absolute;
	z-index: 20;
	top: calc( 100% + 6px );
	left: 0;
	min-width: 260px;
	max-width: min( 92vw, 380px );
	padding: 12px 14px;
	border-radius: 10px;
	background: var( --k-card );
	border: 1px solid var( --k-line );
	box-shadow: 0 12px 30px rgba( 0, 0, 0, 0.45 );
}
.ecob-where-pop fieldset {
	border: 0;
	margin: 0 0 8px;
	padding: 0;
}
.ecob-where-pop legend {
	color: var( --k-muted );
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 6px;
}
.ecob-where-pop label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 40px;
	color: var( --k-ink );
}
.ecob-where-pop input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var( --k-new );
}
.ecob-where-hint {
	color: var( --k-muted );
	font-size: 0.82rem;
	margin: 0 0 10px;
}
.ecob-page .ecv2-page-intro {
	margin-bottom: 12px;
}

/* Kitchen tickets ( 6.0.8, 2e: WP EasyCart PRO's board ): the Tickets panel, beside Sound on, opens to the left; its switch and
   paper width are kept by each screen. The ticket itself prints with WP EasyCart PRO's own styles. */
.ecob-tickets .ecob-where-pop {
	left: auto;
	right: 0;
	min-width: 300px;
}
.ecob-tickets > summary {
	font-size: inherit;
	font-weight: 600;
}
.ecob-tickets.is-on > summary {
	border-color: var( --k-ready );
	color: var( --k-ready );
}
.ecob-where-pop .ecob-switch {
	font-weight: 600;
}
.ecob-where-pop .ecob-switch input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 40px;
	height: 24px;
	border-radius: 999px;
	border: 1px solid var( --k-line );
	background: var( --k-raise );
	cursor: pointer;
}
.ecob-where-pop .ecob-switch input[type="checkbox"]::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var( --k-muted );
	transition: transform 0.15s ease;
}
.ecob-where-pop .ecob-switch input[type="checkbox"]:checked {
	background: var( --k-ready );
	border-color: var( --k-ready );
}
.ecob-where-pop .ecob-switch input[type="checkbox"]:checked::after {
	background: #06210f;
	transform: translateX( 16px );
}
.ecob-where-pop input[type="radio"] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var( --k-new );
}
.ecob-where-pop input:focus-visible {
	outline: 2px solid var( --k-focus );
	outline-offset: 2px;
}
.ecob-tickets-pop fieldset {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}
.ecob-tickets-pop fieldset legend {
	width: 100%;
}
.ecob-tickets-help {
	margin-top: 10px;
	color: var( --k-muted );
	font-size: 0.85rem;
}
.ecob-tickets-help > summary {
	cursor: pointer;
	color: var( --k-ink );
	min-height: 32px;
	display: flex;
	align-items: center;
}
.ecob-tickets-help ol {
	margin: 6px 0 8px;
	padding-left: 1.2em;
}
.ecob-tickets-help li {
	margin-bottom: 4px;
}
.ecob-tickets-help p {
	margin: 0;
}
.ecob-sm.ecob-tk-print {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.ecob-sm.ecob-tk-print .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* 6.0.8: the page while the kitchen display is switched off ( wp_easycart_admin_order_board::print_off() ): an ordinary admin card. */
.ecob-off {
	box-sizing: border-box;
	max-width: 640px;
	margin: 8px 0 24px;
	padding: 28px 28px 24px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 12px;
	color: #1d2327;
}
.ecob-off-icon.dashicons {
	width: 40px;
	height: 40px;
	font-size: 40px;
	color: #646970;
}
.ecob-off-title {
	margin: 12px 0 6px;
	font-size: 18px;
	line-height: 1.3;
}
.ecob-off-text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #3c434a;
}
.ecob-off-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}
