/* Camp Services — ticket log (ct-) + service point kiosk (ck-). Plan 2026-10-12-camp-control F-G2.
   Pages/CampServices/CampTickets.razor, Pages/CampServices/CampKiosk.razor. Linked from Tr.DACS.Web/Pages/_Host.cshtml. */

/* ── ticket log ─────────────────────────────────────────────────────────────────────────── */

.ct-page { display: flex; flex-direction: column; gap: .75rem; padding: var(--dacs-page-pad); }
.ct-card { margin: 0; }
.ct-card > .dash-card-head { border-radius: .5rem .5rem 0 0; }
.ct-muted { color: var(--dacs-gray-500, #6b7280); }
.ct-strong { font-weight: 600; }
.ct-req { color: #d64545; }

.ct-btn-primary { background: var(--dacs-primary, #2563eb); border-color: var(--dacs-primary, #2563eb); color: #fff; }
.ct-btn-primary:hover:not(:disabled) { filter: brightness(.95); color: #fff; }
.ct-btn-danger { background: #d64545; border-color: #d64545; color: #fff; }
.ct-btn-danger:hover:not(:disabled) { filter: brightness(.95); color: #fff; }

.ct-filters { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: flex-end; padding: .625rem .75rem; }
.ct-field { display: flex; flex-direction: column; gap: .2rem; margin: 0; min-width: 8.5rem; }
.ct-field > span { font-size: .75rem; font-weight: 600; color: var(--dacs-gray-600, #4b5563); }
.ct-field-person { min-width: 15rem; }

/* Floating dropdowns: absolute, never push the layout. */
.ct-dd, .ct-search { position: relative; }
.ct-search > i { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); color: var(--dacs-gray-400, #9ca3af); pointer-events: none; }
.ct-search > input { padding-left: 1.8rem; }
.ct-dd-backdrop { position: fixed; inset: 0; z-index: 1040; }
.ct-dd-menu {
	position: absolute; top: calc(100% + 4px); left: 0; z-index: 1041; min-width: 100%; max-height: 18rem; overflow-y: auto;
	margin: 0; padding: .25rem 0; list-style: none; background: var(--dacs-white, #fff);
	border: 1px solid var(--dacs-gray-200, #e5e7eb); border-radius: .5rem; box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}
.ct-dd-right { left: auto; right: 0; min-width: 16rem; }
.ct-dd-menu li { display: flex; flex-direction: column; padding: .4rem .75rem; cursor: pointer; }
.ct-dd-menu li:hover { background: var(--dacs-gray-100, #f3f4f6); }
.ct-dd-menu li a { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; }
.ct-dd-menu li a small { margin-left: auto; color: var(--dacs-gray-500, #6b7280); }
.ct-dd-menu .ct-dd-empty { cursor: default; color: var(--dacs-gray-500, #6b7280); }

.ct-chip {
	display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .25rem .2rem .6rem; border-radius: 999px;
	background: var(--dacs-gray-100, #f3f4f6); border: 1px solid var(--dacs-gray-200, #e5e7eb); font-size: .85rem; max-width: 100%;
}
.ct-chip small { color: var(--dacs-gray-500, #6b7280); }
.ct-chip button { border: 0; background: transparent; padding: 0 .3rem; line-height: 1; color: var(--dacs-gray-500, #6b7280); }

.ct-void-info { display: flex; gap: .4rem; align-items: flex-start; color: #9b2c2c; }
.ct-result { color: #b45309; font-weight: 500; }

.ct-badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.ct-badge-issued { background: #e0ebfa; color: #2a5ea8; }
.ct-badge-consumed { background: #dcf1e5; color: #1f7a45; }
.ct-badge-rejected { background: #fdecc8; color: #8a5a00; }
.ct-badge-voided { background: #f8dada; color: #9b2c2c; }


.ct-modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1050; }
.ct-modal { position: fixed; z-index: 1051; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(30rem, calc(100vw - 2rem)); max-height: calc(100vh - 32px); overflow: auto; }
.ct-modal .dash-card { margin: 0; box-shadow: 0 20px 48px rgba(15, 23, 42, .28); }
.ct-modal .dash-card-head { border-radius: .5rem .5rem 0 0; }
.ct-form { display: flex; flex-direction: column; gap: .75rem; padding: .75rem; }
.ct-form .ct-field { min-width: 0; }
.ct-modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .625rem .75rem; border-top: 1px solid var(--dacs-gray-100, #f3f4f6); }
.ct-alert { display: flex; gap: .4rem; align-items: flex-start; padding: .5rem .65rem; border-radius: .375rem; background: #fdeaea; color: #9b2c2c; font-size: .85rem; }
.ct-void-summary { margin: 0; font-size: .85rem; }

/* ── kiosk (full screen, tablet at the service point door) ─────────────────────────────── */

.ck-root {
	position: fixed; inset: 0; z-index: 1030; display: flex; flex-direction: column;
	background: #0f172a; color: #f8fafc; font-family: var(--dacs-font-sans, 'Inter', sans-serif);
	user-select: none; -webkit-user-select: none; overflow: hidden;
	visibility: visible; /* BlankLayout wraps the body in .visibility_hidden until its JS init runs */
}
/* Off-screen but focusable (display:none / visibility:hidden would not take focus). */
.ck-reader { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

.ck-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.25rem; background: rgba(255, 255, 255, .05); }
.ck-bar-point { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.ck-bar-point > i { font-size: 2.2rem; color: #93c5fd; }
.ck-bar-title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.ck-bar-sub { font-size: .9rem; color: #94a3b8; }
.ck-bar-right { display: flex; align-items: center; gap: 1rem; }
.ck-counter { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.ck-counter-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-counter-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.ck-clock { font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 5ch; text-align: right; }
.ck-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: .6rem;
	border: 1px solid rgba(255, 255, 255, .15); background: transparent; color: #cbd5e1; font-size: 1.25rem; text-decoration: none;
}
.ck-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.ck-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.ck-idle { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .9rem; }
.ck-idle-icon { font-size: clamp(6rem, 18vmin, 11rem); color: #60a5fa; animation: ck-pulse 2.4s ease-in-out infinite; }
.ck-idle-icon.ck-fatal { color: #f87171; animation: none; }
.ck-idle-title { font-size: clamp(2rem, 6vmin, 3.5rem); font-weight: 700; }
.ck-idle-hint { font-size: clamp(1rem, 2.6vmin, 1.4rem); color: #94a3b8; }
.ck-idle-busy { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; color: #cbd5e1; }
@keyframes ck-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .7; transform: scale(.96); } }

.ck-cam-btn {
	display: inline-flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .85rem 1.6rem; border-radius: .8rem;
	border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.15rem; font-weight: 600;
}
.ck-cam-btn:hover { background: rgba(255, 255, 255, .16); }

.ck-camera { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: #000; }
.ck-video { width: min(92vw, 70vh); aspect-ratio: 1; object-fit: cover; border-radius: 1rem; background: #111; }
.ck-camera-hint { font-size: 1.2rem; color: #e2e8f0; }
.ck-cam-cancel { margin-top: 0; }

.ck-result {
	position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: .75rem; padding: 2rem; text-align: center; overflow-y: auto; animation: ck-in .15s ease-out;
}
.ck-result.is-ok { background: #2e9e5b; }
.ck-result.is-denied { background: #c53030; }
@keyframes ck-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.ck-result-icon { font-size: clamp(5rem, 16vmin, 9rem); line-height: 1; }
.ck-result-title { font-size: clamp(2.4rem, 8vmin, 4.8rem); font-weight: 800; line-height: 1.05; }
.ck-result-detail { font-size: clamp(1.2rem, 3.6vmin, 2rem); font-weight: 600; opacity: .95; }
.ck-result-person { margin-top: .5rem; }
.ck-result-name { font-size: clamp(1.6rem, 5vmin, 2.8rem); font-weight: 700; }
.ck-result-meta { font-size: clamp(1rem, 2.6vmin, 1.4rem); opacity: .9; }
.ck-result-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .5rem; }
.ck-fact { display: flex; flex-direction: column; padding: .55rem 1rem; border-radius: .7rem; background: rgba(0, 0, 0, .16); min-width: 9rem; }
.ck-fact span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.ck-fact strong { font-size: clamp(1.1rem, 3vmin, 1.6rem); }
.ck-fact-dish strong { font-size: clamp(1.3rem, 3.6vmin, 2rem); }
.ck-quotas { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.ck-quota { display: flex; align-items: baseline; gap: .45rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.ck-quota.is-empty { background: rgba(0, 0, 0, .25); }
.ck-quota-num { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ck-quota-label { font-size: 1rem; }

.ck-allergen {
	display: flex; align-items: center; gap: 1rem; width: min(100%, 52rem); margin-top: .75rem; padding: 1rem 1.4rem; border-radius: .9rem;
	background: #f59e0b; color: #1f1300; text-align: left; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35);
}
.ck-allergen.is-conflict { animation: ck-blink 1s step-end infinite; }
.ck-allergen-icon { font-size: 3rem; flex: none; }
.ck-allergen-title { font-size: clamp(1.3rem, 4vmin, 2.2rem); font-weight: 800; line-height: 1.15; }
.ck-allergen-list { font-size: clamp(1rem, 2.8vmin, 1.4rem); font-weight: 600; }
@keyframes ck-blink { 50% { box-shadow: 0 0 0 8px #fff; } }

@media (max-width: 640px) {
	.ck-bar { flex-wrap: wrap; padding: .6rem .9rem; }
	.ck-counter { display: none; }
}
