/* ==========================================================================
   Chamdon — Live café menu, kitchen display and VIP club.
   Loaded only on the café / kitchen / VIP templates.
   ========================================================================== */

.ch-cafe-hero {
	background:
		radial-gradient(ellipse at 15% 0%, rgba(200, 138, 62, 0.16), transparent 55%),
		linear-gradient(180deg, #f5efeb, #faf6f0);
	border-bottom: 1px solid rgba(114, 18, 36, 0.1);
}

.ch-table-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #1a0d0f;
	color: #faf6f0;
	font-size: 0.8125rem;
	font-weight: 600;
}

.ch-table-badge strong {
	font-family: "Space Grotesk", monospace;
	color: #feb968;
}

/* Menu grid cards */
.ch-menu-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border: 1px solid rgba(114, 18, 36, 0.1);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 2px 8px -2px rgba(88, 14, 29, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ch-menu-card:hover {
	transform: translateY(-3px);
	border-color: rgba(200, 138, 62, 0.3);
	box-shadow: 0 12px 32px -4px rgba(88, 14, 29, 0.08), 0 4px 12px -2px rgba(26, 13, 15, 0.04);
}

.ch-menu-card.is-unavailable {
	opacity: 0.55;
	filter: grayscale(0.6);
	pointer-events: none;
}

.ch-menu-card__media {
	position: relative;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	border-radius: 12px;
	background: #f5efeb;
}

.ch-menu-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ch-menu-card__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.7;
}

.ch-menu-card__desc {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.9;
	color: #564242;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ch-menu-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid rgba(114, 18, 36, 0.08);
}

.ch-menu-card__price {
	font-family: "Space Grotesk", monospace;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #721224;
}

.ch-menu-card__price small {
	font-size: 0.7em;
	font-weight: 500;
	opacity: 0.7;
	margin-inline-start: 3px;
}

/* Cart lines in the café panel */
.ch-cafe-line {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid rgba(114, 18, 36, 0.08);
	font-size: 0.8125rem;
}

.ch-cafe-line:last-child {
	border-bottom: 0;
}

.ch-cafe-qty {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid rgba(114, 18, 36, 0.12);
	border-radius: 999px;
	padding: 2px;
}

.ch-cafe-qty button {
	width: 24px;
	height: 24px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #f5efeb;
	color: #564242;
	font-size: 0.875rem;
	line-height: 1;
}

.ch-cafe-qty span {
	min-width: 18px;
	text-align: center;
	font-family: "Space Grotesk", monospace;
	font-weight: 600;
}

/* Status pills */
.ch-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.8;
}

.ch-status--new { background: rgba(200, 138, 62, 0.16); color: #b45309; }
.ch-status--preparing { background: rgba(59, 79, 122, 0.12); color: #3b4f7a; }
.ch-status--served { background: #e8f2ec; color: #2f6b4f; }
.ch-status--paid { background: #1a0d0f; color: #feb968; }

/* Kitchen display */
.ch-kds {
	min-height: 100vh;
	background: #14100f;
	color: #f7f1e8;
}

.ch-kds__col {
	background: #1f1817;
	border: 1px solid rgba(200, 138, 62, 0.14);
	border-radius: 16px;
	padding: 14px;
	min-height: 240px;
}

.ch-kds__ticket {
	background: #2a2220;
	border: 1px solid rgba(200, 138, 62, 0.16);
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 10px;
}

.ch-kds__ticket.is-new {
	animation: ch-kds-flash 1.6s ease 2;
}

@keyframes ch-kds-flash {
	0%, 100% { box-shadow: 0 0 0 0 rgba(200, 138, 62, 0); }
	50% { box-shadow: 0 0 0 2px rgba(200, 138, 62, 0.55); }
}

/* VIP pass */
.ch-pass {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	background: linear-gradient(145deg, #2a171a, #1a0d0f 55%, #500012);
	color: #faf6f0;
	padding: 28px;
	box-shadow: 0 24px 60px -18px rgba(80, 0, 18, 0.55);
}

.ch-pass::after {
	content: "";
	position: absolute;
	inset-inline-end: -80px;
	top: -80px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	border: 1px solid rgba(200, 138, 62, 0.22);
	box-shadow: 0 0 0 40px rgba(200, 138, 62, 0.05);
}

.ch-pass__code {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	gap: 3px;
	padding: 10px;
	background: #faf6f0;
	border-radius: 10px;
	width: 132px;
	height: 132px;
}

.ch-pass__code span {
	background: #1a0d0f;
	border-radius: 1px;
}

/* Guest tracker — flashes when the bar acknowledges the order */
.ch-track--pulse {
	animation: ch-track-pulse 1.8s ease;
}

@keyframes ch-track-pulse {
	0%, 100% { box-shadow: inset 0 0 0 0 rgba(200, 138, 62, 0); }
	35% { box-shadow: inset 0 0 0 3px rgba(200, 138, 62, 0.55); }
}

/* New-order popup entrance */
[data-ch-kds-alert].flex > div:last-child {
	animation: ch-kds-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes ch-kds-pop {
	from { opacity: 0; transform: translateY(16px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* KDS archive ------------------------------------------------------------ */
.ch-kds__archive {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(200, 138, 62, 0.16);
	border-radius: var(--ch-r-md);
	background: rgba(255, 255, 255, 0.03);
}

.ch-kds__archive-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(200, 138, 62, 0.14);
	background: rgba(200, 138, 62, 0.06);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: rgba(250, 246, 240, 0.82);
}

.ch-kds__archive-count {
	padding: 1px 8px;
	border-radius: var(--ch-r-pill);
	background: rgba(255, 255, 255, 0.07);
	font-family: var(--ch-font-mono);
	font-size: 0.625rem;
	color: rgba(250, 246, 240, 0.6);
}

.ch-kds__archive-list {
	display: flex;
	flex-direction: column;
	max-height: 340px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ch-kds__archive-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ch-kds__archive-row:last-child {
	border-bottom: 0;
}

.ch-kds__archive-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ch-kds__archive-main strong {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--ch-cream);
}

.ch-kds__archive-id {
	font-family: var(--ch-font-mono);
	font-size: 0.5625rem;
	font-weight: 500;
	color: rgba(250, 246, 240, 0.35);
}

.ch-kds__archive-items {
	font-size: 0.6875rem;
	line-height: 1.85;
	color: rgba(250, 246, 240, 0.45);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ch-kds__archive-side {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
}

.ch-kds__archive-total {
	font-family: var(--ch-font-mono);
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--ch-amber-soft);
}

.ch-kds__archive-time {
	font-family: var(--ch-font-mono);
	font-size: 0.5625rem;
	color: rgba(250, 246, 240, 0.3);
}

.ch-kds__archive-phone {
	font-family: var(--ch-font-mono);
	font-size: 0.625rem;
	color: rgba(250, 246, 240, 0.6);
	text-decoration: none;
}

.ch-kds__archive-phone:hover {
	color: var(--ch-amber-soft);
}

.ch-kds__archive-status {
	padding: 1px 7px;
	border-radius: var(--ch-r-pill);
	font-size: 0.5625rem;
	font-weight: 700;
	line-height: 1.8;
	white-space: nowrap;
}

.ch-kds__archive-status.is-done {
	background: rgba(47, 107, 79, 0.25);
	color: #7fd3ab;
}

.ch-kds__archive-status.is-live {
	background: rgba(200, 138, 62, 0.22);
	color: var(--ch-amber-soft);
}

.ch-kds__archive-status.is-bad {
	background: rgba(179, 45, 46, 0.25);
	color: #ff9d9d;
}

.ch-kds__archive-status.is-muted {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(250, 246, 240, 0.55);
}

.ch-kds__archive-empty {
	margin: 0;
	padding: 22px 14px;
	text-align: center;
	font-size: 0.6875rem;
	color: rgba(250, 246, 240, 0.3);
}

/* Background-notification toggle (guest tracker) ------------------------- */
.ch-notify-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	padding: 9px 12px;
	border: 1px dashed var(--ch-line-strong);
	border-radius: var(--ch-r-sm);
	background: transparent;
	color: var(--ch-muted);
	font-family: inherit;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.8;
	cursor: pointer;
	transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.ch-notify-toggle:hover {
	border-color: var(--ch-amber);
	color: var(--ch-amber-deep);
	background: var(--ch-amber-tint);
}

.ch-notify-toggle.is-on {
	border-style: solid;
	border-color: rgba(47, 107, 79, 0.4);
	background: rgba(47, 107, 79, 0.08);
	color: #2f6b4f;
}
