/* Clever Events — front end. Dark by default; colors come from CSS vars
   injected by the customizer settings. Mobile-first responsive. */

.ce-wrap {
	--ce-bg: #000;
	--ce-text: #fff;
	--ce-accent: #e50914;
	--ce-accent-hover: #ff5a61;
	--ce-card: #141414;
	--ce-link: #e50914;
	--ce-border: #2a2a2a;
	--ce-radius: 12px;
	background: var(--ce-bg);
	color: var(--ce-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	padding: 1.25rem;
	box-sizing: border-box;
}
.ce-wrap *, .ce-wrap *::before, .ce-wrap *::after { box-sizing: border-box; }

/* Any red-accent link lightens (instead of the theme's default blue) on hover. */
.ce-wrap a { color: var(--ce-link); }
.ce-wrap a:hover, .ce-wrap a:focus { color: var(--ce-accent-hover); }
/* Links styled as buttons/cards keep white text (their background carries the color). */
.ce-wrap a.ce-card, .ce-wrap a.ce-card:hover, .ce-wrap a.ce-card:focus,
.ce-wrap a.ce-card-cta, .ce-wrap a.ce-card-cta:hover, .ce-wrap a.ce-card-cta:focus,
.ce-wrap a.ce-time, .ce-wrap a.ce-time:hover, .ce-wrap a.ce-time:focus,
.ce-wrap a.ce-sponsor, .ce-wrap a.ce-sponsor:hover, .ce-wrap a.ce-sponsor:focus,
.ce-wrap a.ce-btn, .ce-wrap a.ce-btn:hover, .ce-wrap a.ce-btn:focus { color: var(--ce-text); }

.ce-section { margin-bottom: 2.5rem; }
/* Front-end section navigation (Current / Past / Items). */
.ce-fe-nav { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 2rem; }
.ce-fe-tab {
	background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer;
	padding: .75rem 1.1rem; font-size: 1rem; font-weight: 700; border-bottom: 3px solid transparent;
	font-family: inherit;
}
.ce-fe-tab:hover { color: #fff; }
.ce-fe-tab.is-active { color: #fff; border-bottom-color: var(--ce-accent); }
.ce-h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 1rem; }
.ce-h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.ce-empty { opacity: .7; }

/* ---- Cards ---- */
.ce-card { display: block; text-decoration: none; color: var(--ce-text); margin-bottom: .6rem; }
.ce-card-wrap { display: flex; flex-direction: column; height: 100%; }
.ce-card-cta {
	display: block; text-align: center; margin-top: auto;
	background: var(--ce-accent); color: #fff; text-decoration: none;
	font-weight: 700; padding: .55rem .75rem; border-radius: 8px;
	transition: background .15s ease;
}
.ce-card-cta:hover, .ce-card-cta:focus { background: var(--ce-accent-hover); color: #fff; }
.ce-card-poster {
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: 10px;
	overflow: hidden;
	background: var(--ce-card);
	box-shadow: 0 6px 20px rgba(0,0,0,.5);
	transition: transform .2s ease;
}
.ce-card:hover .ce-card-poster { transform: translateY(-4px); }
.ce-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-card-noimg { width: 100%; height: 100%; background: #222; }
.ce-badge {
	position: absolute; top: 8px; left: 8px;
	background: var(--ce-accent); color: #fff;
	font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.ce-card-title { font-weight: 700; margin-top: .6rem; font-size: 1rem; }
.ce-card-date { opacity: .65; font-size: .85rem; margin-top: .15rem; }

/* ---- Carousel ---- */
.ce-carousel { position: relative; }
.ce-track {
	display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth;
	scrollbar-width: none; padding-bottom: .5rem;
}
.ce-track::-webkit-scrollbar { display: none; }
.ce-track .ce-card-wrap { flex: 0 0 160px; }
.ce-arrow {
	position: absolute; top: 35%; z-index: 2;
	background: rgba(0,0,0,.6); color: #fff; border: none;
	width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem; cursor: pointer;
}
.ce-arrow-left { left: -6px; }
.ce-arrow-right { right: -6px; }

/* ---- Grid ---- */
.ce-grid {
	display: grid; gap: 1.25rem;
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) { .ce-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .ce-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---- Event detail ---- */
.ce-back { color: var(--ce-accent); text-decoration: none; font-weight: 600; display: inline-block; margin-bottom: 1rem; }
.ce-back:hover, .ce-back:focus { color: var(--ce-accent-hover); }
.ce-event-title { font-size: 2rem; font-weight: 800; margin: 0 0 1rem; }
.ce-event-top { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .ce-event-top.ce-has-video { grid-template-columns: 280px 1fr; } }
/* No video: just the flyer, centered, at its natural portrait width. */
.ce-event-top.ce-no-video { grid-template-columns: 1fr; justify-items: center; }
.ce-event-top.ce-no-video .ce-event-flyer { max-width: 360px; width: 100%; }
.ce-event-flyer img { width: 100%; border-radius: 10px; aspect-ratio: 9/16; object-fit: cover; }
.ce-video-frame { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; }
.ce-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ce-event-desc { margin: 1.5rem 0; line-height: 1.6; opacity: .9; }

/* ---- Showtimes ---- */
.ce-showtimes-note { margin: 0 0 1rem; font-size: .95rem; opacity: .8; }
.ce-ticket-details { margin-top: 2rem; }
.ce-ticket-details-body { line-height: 1.6; }
.ce-ticket-details-body a { color: var(--ce-accent); }
.ce-ticket-details-body a:hover { color: var(--ce-accent-hover); }
.ce-shop-loading { padding: 2rem; text-align: center; opacity: .7; }
.ce-shop-actions { margin-top: 1.5rem; }
.ce-shop-actions .ce-btn { width: 100%; }
.ce-date-row { display: flex; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.1); flex-wrap: wrap; }
.ce-date-label { font-weight: 700; min-width: 110px; }
.ce-times { display: flex; gap: .5rem; flex-wrap: wrap; }
.ce-time {
	display: inline-block; padding: .5rem .9rem; border: 1px solid rgba(255,255,255,.25);
	border-radius: 6px; color: var(--ce-text); text-decoration: none; font-weight: 600;
	transition: background .15s, border-color .15s;
}
.ce-time:hover { background: var(--ce-accent); border-color: var(--ce-accent); }

/* ---- Brought to you by ---- */
.ce-brought-by { margin-top: 3rem; }
.ce-sponsor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: center; }
@media (min-width: 700px) { .ce-sponsor-grid { grid-template-columns: repeat(6, 1fr); } }
.ce-sponsor { display: flex; align-items: center; justify-content: center; }
.ce-sponsor img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---- Tickets selection ---- */
.ce-showtime-label { opacity: .8; margin: -.5rem 0 1.5rem; }
.ce-items { display: flex; flex-direction: column; gap: .5rem; }
.ce-item {
	display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
	background: var(--ce-card); padding: .9rem 1rem; border-radius: 8px;
}
.ce-item-name { font-weight: 600; }
.ce-item-price { opacity: .85; }
.ce-soldout { opacity: .5; }
.ce-soldout-tag { color: var(--ce-accent); font-weight: 700; text-transform: uppercase; font-size: .85rem; }
.ce-qty { display: flex; align-items: center; gap: .5rem; }
.ce-qty button { width: 32px; height: 32px; border-radius: 6px; border: none; background: var(--ce-accent); color: #fff; font-size: 1.2rem; cursor: pointer; }
.ce-qty button:hover, .ce-qty button:focus { background: var(--ce-accent-hover); color: #fff; }
.ce-qty-input { width: 44px; text-align: center; background: #000; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; height: 32px; }

/* ---- Summary ---- */
.ce-summary { margin-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; }
.ce-summary-row { display: flex; justify-content: space-between; padding: .3rem 0; }
.ce-summary-total { font-weight: 800; font-size: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); margin-top: .4rem; padding-top: .6rem; }

/* ---- Buttons / checkout ---- */
.ce-btn {
	display: inline-block; margin-top: 1.25rem; background: var(--ce-accent); color: #fff;
	border: none; padding: .9rem 1.5rem; font-weight: 700; font-size: 1rem; border-radius: 8px; cursor: pointer;
}
.ce-btn:disabled { opacity: .4; cursor: not-allowed; }
.ce-checkout-fields { display: flex; flex-direction: column; gap: 1rem; max-width: 480px; }
.ce-checkout-fields[hidden] { display: none; }
.ce-checkout-fields label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; }
.ce-checkout-fields input { background: #000; border: 1px solid rgba(255,255,255,.25); color: #fff; padding: .7rem; border-radius: 6px; }
.ce-shipping { margin-top: 1.5rem; }
.ce-shipping-note { opacity: .8; font-size: .9rem; margin: 0; }
.ce-ship-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .ce-ship-row { grid-template-columns: 1fr; } }
.ce-order-review { margin: 1.5rem 0; }
#ce-payment-element { margin: 1.25rem 0; max-width: 480px; }
.ce-error { color: var(--ce-accent); margin: .5rem 0; }
.ce-notice {
	margin: 1rem 0 .5rem; padding: .65rem .9rem; border-radius: 8px;
	background: rgba(229,9,20,.12); border: 1px solid var(--ce-accent);
	color: var(--ce-text); font-size: .9rem; font-weight: 600;
	opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
	max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; border-width: 0;
}
.ce-notice.is-show {
	opacity: 1; transform: none; max-height: 200px;
	padding-top: .65rem; padding-bottom: .65rem; border-width: 1px;
}
.ce-thankyou { text-align: center; padding: 3rem 1rem; }
.ce-order-uid { opacity: .8; }

/* Sold-out showtime on event detail */
.ce-time-soldout { opacity: .45; cursor: not-allowed; border-style: dashed; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ce-time-soldout small { font-size: .65rem; color: var(--ce-accent); text-transform: uppercase; }
.ce-remaining { font-size: .8rem; opacity: .65; margin-left: .5rem; }
.ce-soldout-banner { background: var(--ce-card); border: 1px solid var(--ce-accent); color: var(--ce-accent); padding: 1rem; border-radius: 8px; font-weight: 700; text-align: center; }
.ce-subevent { margin-top: 2.5rem; }

/* Main event area: lighter grey panel so it reads as the primary event.
   Add-On Items reuse the same panel styling. */
.ce-mainevent,
.ce-addons-panel {
	background: #2a2a2a;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 12px;
	padding: 1rem 1.25rem 1.25rem;
}
.ce-mainevent { margin-bottom: 3rem; }
.ce-addons-panel { margin-top: 3rem; }
.ce-mainevent > .ce-h3,
.ce-addons-panel > .ce-h3 { margin-top: .25rem; }
/* Rows inside the lighter panels get a darker card for contrast. */
.ce-mainevent .ce-item,
.ce-addons-panel .ce-item { background: #141414; }

/* Add-on row: optional image thumbnail beside the name. */
.ce-item-main { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.ce-item-thumb {
	width: 48px; height: 48px; flex: 0 0 48px;
	object-fit: cover; border-radius: 6px;
	background: #000;
}

/* Explanatory sentences under section headings. */
.ce-section-note {
	margin: 0 0 .9rem;
	font-size: .9rem;
	line-height: 1.45;
	opacity: .8;
}

/* ---------- Ticket Taker Scanner ---------- */
.ce-scanner { max-width: 520px; margin: 0 auto; }
.ce-scanner-loading { padding: 2rem; text-align: center; opacity: .7; }
.ce-scanner-card { display: flex; flex-direction: column; gap: 1rem; }
.ce-scanner-label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; }
.ce-scanner-label input { background: #000; border: 1px solid rgba(255,255,255,.25); color: #fff; padding: .7rem; border-radius: 6px; }
.ce-scanner-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.ce-scanner-sub { opacity: .7; margin-top: -.5rem; }
.ce-scanner-events { display: flex; flex-direction: column; gap: .6rem; }
.ce-scanner-event {
	display: flex; flex-direction: column; gap: .25rem; text-align: left;
	background: var(--ce-card); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
	padding: .85rem 1rem; color: #fff; cursor: pointer;
}
.ce-scanner-event:hover { border-color: var(--ce-accent); }
.ce-se-date { font-size: .85rem; color: var(--ce-accent); font-weight: 700; }
.ce-se-title { font-weight: 700; }
.ce-scan-stage { position: relative; width: 100%; aspect-ratio: 3/4; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.ce-scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.ce-scan-result { min-height: 2.5rem; margin-bottom: 1rem; }
.ce-scan-msg { padding: .75rem 1rem; border-radius: 8px; font-weight: 600; }
.ce-scan-good { background: rgba(46,204,113,.16); color: #2ecc71; border: 1px solid rgba(46,204,113,.4); }
.ce-scan-warn { background: rgba(255,179,0,.16); color: #ffb300; border: 1px solid rgba(255,179,0,.4); }
.ce-scan-bad { background: rgba(229,9,20,.16); color: #ff5a61; border: 1px solid rgba(229,9,20,.4); }

/* ---- Scanner check-in order panel ---- */
.ce-checkin-card { margin-top: .85rem; background: var(--ce-card, #151515); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 1rem; }
.ce-checkin-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ce-checkin-uid { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.ce-checkin-cust { opacity: .75; font-size: .9rem; }
.ce-checkin-progress { font-weight: 700; padding: .55rem .75rem; border-radius: 8px; background: rgba(255,179,0,.14); color: #ffb300; border: 1px solid rgba(255,179,0,.35); margin-bottom: .75rem; }
.ce-checkin-progress.is-complete { background: rgba(46,204,113,.16); color: #2ecc71; border-color: rgba(46,204,113,.4); }
.ce-checkin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.ce-checkin-item { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.ce-checkin-item .ce-ci-label { font-weight: 600; }
.ce-checkin-item .ce-ci-state { font-size: .85rem; opacity: .9; white-space: nowrap; }
.ce-checkin-item.is-used { background: rgba(46,204,113,.1); border-color: rgba(46,204,113,.3); }
.ce-checkin-item.is-used .ce-ci-state { color: #2ecc71; }
.ce-checkin-item.is-partial .ce-ci-state { color: #ffb300; }
.ce-checkin-item.is-just { box-shadow: 0 0 0 2px var(--ce-accent, #e50914); }
.ce-scan-btn { position: sticky; bottom: 1rem; width: 100%; }

/* ---- Customizer: border color + radius applied to key surfaces ---- */
.ce-card-poster,
.ce-card-cta,
.ce-mainevent,
.ce-addons-panel,
.ce-item,
.ce-scanner-event,
.ce-scan-stage,
.ce-summary { border-radius: var(--ce-radius); }
.ce-mainevent,
.ce-addons-panel { border-color: var(--ce-border); }
.ce-date-row { border-bottom-color: var(--ce-border); }
.ce-checkout-fields input,
.ce-scanner-label input { border-color: var(--ce-border); border-radius: calc(var(--ce-radius) * 0.5); }
