/* Jegyellenőrző alap stílusok - Modern, kártyás dizájn */
.tws-ticket-checker-app {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	max-width: 800px !important;
	margin: 0 auto !important;
	background: #f4f7f6 !important; /* Soft background for the app area */
	border-radius: 16px !important;
	box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
	overflow: hidden !important;
	color: #1a1a1a !important;
	border: 1px solid rgba(0,0,0,0.05) !important;
}

.tws-tc-is-admin {
	max-width: 100% !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
}

/* Belépési képernyő */
.tws-tc-auth-screen {
	padding: 40px 30px !important;
	text-align: center !important;
	background: #ffffff !important;
}

.tws-tc-auth-screen h2 {
	margin-top: 0 !important;
	color: #111 !important;
	font-weight: 700 !important;
	font-size: 24px !important;
	margin-bottom: 10px !important;
}

.tws-tc-form-group {
	margin-bottom: 24px !important;
	text-align: left !important;
}

.tws-tc-form-group label {
	display: block !important;
	margin-bottom: 8px !important;
	font-weight: 600 !important;
	color: #444 !important;
	font-size: 14px !important;
}

.tws-tc-form-group input {
	width: 100% !important;
	padding: 14px 16px !important;
	border: 1px solid #ddd !important;
	border-radius: 10px !important;
	font-size: 16px !important;
	box-sizing: border-box !important;
	transition: all 0.2s ease !important;
	background: #fafafa !important;
}

.tws-tc-form-group input:focus {
	border-color: #007cba !important;
	background: #fff !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(0,124,186,0.15) !important;
}

/* Kód megadó (OTP) mező specifikus stílusok */
.tws-tc-email-display {
	margin-bottom: 24px !important;
	padding: 16px !important;
	background: #f8fafc !important;
	border: 1px dashed #cbd5e1 !important;
	border-radius: 10px !important;
	text-align: center !important;
}

.tws-tc-email-display small {
	display: block !important;
	color: #64748b !important;
	margin-bottom: 4px !important;
}

.tws-tc-email-display strong {
	display: block !important;
	color: #0f172a !important;
	font-size: 16px !important;
	margin-bottom: 8px !important;
}

.tws-tc-email-display a {
	color: #007cba !important;
	text-decoration: none !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}

.tws-tc-email-display a:hover {
	text-decoration: underline !important;
}

.tws-tc-otp-input {
	font-family: monospace !important;
	font-size: 28px !important;
	letter-spacing: 12px !important;
	text-align: center !important;
	padding: 16px !important;
	font-weight: bold !important;
	color: #007cba !important;
}

/* Gombok */
.tws-tc-btn {
	background: linear-gradient(135deg, #007cba, #005a87) !important;
	color: #fff !important;
	border: none !important;
	padding: 14px 24px !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	width: 100% !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 4px 12px rgba(0,124,186,0.25) !important;
}

.tws-tc-btn:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 16px rgba(0,124,186,0.35) !important;
}

.tws-tc-btn:active {
	transform: translateY(0) !important;
}

.tws-tc-btn:disabled {
	background: #cbd5e1 !important;
	box-shadow: none !important;
	cursor: not-allowed !important;
	transform: none !important;
}

.tws-tc-btn-small {
	padding: 8px 16px !important;
	font-size: 13px !important;
	width: auto !important;
	border-radius: 8px !important;
}

.tws-tc-btn-secondary {
	background: #ffffff !important;
	color: #333 !important;
	border: 1px solid #ddd !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
}

.tws-tc-btn-secondary:hover {
	background: #f8f9fa !important;
	box-shadow: 0 4px 8px rgba(0,0,0,0.08) !important;
}

.tws-tc-btn-success {
	background: linear-gradient(135deg, #10b981, #059669) !important;
	box-shadow: 0 4px 12px rgba(16,185,129,0.25) !important;
}

.tws-tc-btn-success:hover {
	box-shadow: 0 6px 16px rgba(16,185,129,0.35) !important;
}

.tws-tc-btn-undo {
	background: #ffffff !important;
	color: #dc2626 !important;
	border: 1px solid #fecaca !important;
	box-shadow: 0 2px 6px rgba(220,38,38,0.1) !important;
}

.tws-tc-btn-undo:hover {
	background: #fef2f2 !important;
	box-shadow: 0 4px 10px rgba(220,38,38,0.15) !important;
}

/* Üzenetek */
.tws-tc-message {
	margin-top: 15px !important;
	padding: 12px 16px !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
}
.tws-tc-message.error {
	background: #fef2f2 !important;
	color: #dc2626 !important;
	border: 1px solid #fecaca !important;
}
.tws-tc-message.success {
	background: #f0fdf4 !important;
	color: #16a34a !important;
	border: 1px solid #bbf7d0 !important;
}

/* Főképernyő / Fejléc */
.tws-tc-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	padding: 20px 24px !important;
	background: #ffffff !important;
	border-bottom: 1px solid rgba(0,0,0,0.06) !important;
	position: sticky !important;
	top: 0 !important;
	z-index: 10 !important;
	box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}

.tws-tc-header h2 {
	margin: 0 !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	flex-grow: 1 !important;
	margin-left: 15px !important;
	color: #111 !important;
}

/* Jegylista fejléc: balra a navigáció, jobbra az esemény neve és időpontja
   egymás alatt. A gombok így egy helyen maradnak, a cím nem szorul közéjük. */
.tws-tc-header-actions {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	flex-shrink: 0 !important;
}

#tws-tc-tickets-view .tws-tc-header h2 {
	text-align: right !important;
	line-height: 1.3 !important;
}

/* Az esemény időpontja a jegylista fejlécében: egy eseménynek több előadása
   lehet, a lista viszont mindig csak az egyikről szól */
.tws-tc-event-date-note {
	display: block !important;
	margin-top: 2px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #64748b !important;
}

/* Keresés és Statisztika */
.tws-tc-search-box {
	padding: 20px 24px 0 24px !important;
	background: #f4f7f6 !important;
}

.tws-tc-search-box input {
	width: 100% !important;
	padding: 12px 40px 12px 16px !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 12px !important;
	font-size: 15px !important;
	box-sizing: border-box !important;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat right 14px center !important;
	box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
	transition: all 0.2s ease !important;
}

.tws-tc-search-box input:focus {
	border-color: #007cba !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(0,124,186,0.1) !important;
}

.tws-tc-stats {
	padding: 16px 24px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #64748b !important;
	background: #f4f7f6 !important;
}

.tws-tc-color-success {
	color: #10b981 !important;
}

.tws-tc-color-warning {
	color: #f59e0b !important;
}

/* Listák és kártyák */
.tws-tc-list {
	padding: 16px 24px 30px 24px !important;
	background: #f4f7f6 !important;
}

.tws-tc-loading, .tws-tc-empty, .tws-tc-error {
	padding: 40px !important;
	text-align: center !important;
	color: #64748b !important;
	background: #fff !important;
	border-radius: 12px !important;
	border: 1px dashed #cbd5e1 !important;
}

.tws-tc-error {
	color: #dc2626 !important;
	border-color: #fecaca !important;
	background: #fef2f2 !important;
}

/* Eseménylista: csoportcímek (Ma / Közelgő / Lezajlott) */
.tws-tc-group-title {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	margin: 4px 2px 12px 2px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	color: #64748b !important;
}

.tws-tc-group-title:not(:first-child) {
	margin-top: 28px !important;
}

.tws-tc-group-title.is-today {
	color: #007cba !important;
}

.tws-tc-group-title em {
	font-style: normal !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	color: #64748b !important;
	background: rgba(100,116,139,0.12) !important;
	border-radius: 999px !important;
	padding: 2px 8px !important;
}

.tws-tc-group-title.is-today em {
	color: #007cba !important;
	background: rgba(0,124,186,0.12) !important;
}

/* Esemény kártyák */
.tws-tc-event-card {
	display: grid !important;
	grid-template-columns: auto minmax(0, 1fr) auto !important;
	align-items: center !important;
	gap: 16px !important;
	padding: 16px !important;
	margin-bottom: 12px !important;
	background: #ffffff !important;
	border-radius: 16px !important;
	border: 1px solid rgba(0,0,0,0.04) !important;
	cursor: pointer !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
	box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
	position: relative !important;
	overflow: hidden !important;
}

.tws-tc-event-card::before {
	content: '' !important;
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	bottom: 0 !important;
	width: 4px !important;
	background: #007cba !important;
	opacity: 0 !important;
	transition: opacity 0.2s ease !important;
}

.tws-tc-event-card:hover,
.tws-tc-event-card:focus-visible {
	transform: translateY(-2px) !important;
	box-shadow: 0 10px 26px rgba(0,0,0,0.07) !important;
	border-color: rgba(0,124,186,0.15) !important;
	outline: none !important;
}

.tws-tc-event-card:hover::before,
.tws-tc-event-card:focus-visible::before {
	opacity: 1 !important;
}

.tws-tc-event-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(0,124,186,0.25) !important;
}

/* Érintéses visszajelzés: mobilon nincs hover, a koppintás mégis látszódjon */
.tws-tc-event-card:active {
	transform: scale(0.985) !important;
	background: #f8fafc !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* A mai esemény kiemelése */
.tws-tc-event-card.is-today {
	border-color: rgba(0,124,186,0.25) !important;
	box-shadow: 0 6px 18px rgba(0,124,186,0.10) !important;
}

.tws-tc-event-card.is-today::before {
	opacity: 1 !important;
}

/* A lezajlott események háttérbe lépnek, de kattinthatók maradnak */
.tws-tc-event-card.is-past {
	background: #fbfcfd !important;
	box-shadow: none !important;
}

.tws-tc-event-card.is-past .tws-tc-event-chip {
	background: #f1f5f9 !important;
	color: #94a3b8 !important;
	border-color: #e2e8f0 !important;
}

.tws-tc-event-card.is-past .tws-tc-event-title {
	color: #475569 !important;
}

/* Dátum-chip */
.tws-tc-event-chip {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 58px !important;
	padding: 8px 4px !important;
	border-radius: 12px !important;
	background: #f1f7fb !important;
	border: 1px solid rgba(0,124,186,0.12) !important;
	color: #007cba !important;
	line-height: 1.1 !important;
}

.tws-tc-event-card.is-today .tws-tc-event-chip {
	background: linear-gradient(135deg, #007cba, #005a87) !important;
	border-color: transparent !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0,124,186,0.28) !important;
}

.tws-tc-chip-month {
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	opacity: 0.85 !important;
}

.tws-tc-chip-day {
	font-size: 24px !important;
	font-weight: 800 !important;
	margin: 1px 0 !important;
}

.tws-tc-chip-weekday {
	font-size: 10px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	opacity: 0.7 !important;
}

.tws-tc-event-chip.is-empty {
	background: #f1f5f9 !important;
	border-color: #e2e8f0 !important;
	color: #94a3b8 !important;
}

/* Kártya törzs */
.tws-tc-event-body {
	min-width: 0 !important;
}

.tws-tc-event-title {
	margin: 0 0 6px 0 !important;
	font-size: 17px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: #111 !important;
}

.tws-tc-event-meta {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	font-size: 13px !important;
	color: #64748b !important;
}

/* Telítettség: pill a metában */
.tws-tc-capacity-label {
	font-size: 12px !important;
	font-weight: 600 !important;
	white-space: nowrap !important;
	color: #475569 !important;
	background: #f1f5f9 !important;
	border-radius: 999px !important;
	padding: 3px 9px !important;
}

.tws-tc-capacity-label.is-high {
	color: #b45309 !important;
	background: #fef3c7 !important;
}

.tws-tc-capacity-label.is-full {
	color: #b91c1c !important;
	background: #fee2e2 !important;
}

/* ...és vékony sáv a kártya alján, a kártya teljes szélességében */
.tws-tc-capacity-bar {
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	height: 3px !important;
	background: #e4eaf0 !important;
}

/* Halványabb árnyalatok: a pontos színkódot a pill hordozza, a sáv csak
   egy pillantásnyi arányjelzés — élénk színnel elvonná a figyelmet a címről. */
.tws-tc-capacity-bar span {
	display: block !important;
	height: 100% !important;
	background: #4ade80 !important;
	transition: width 0.3s ease !important;
}

.tws-tc-capacity-bar.is-high span {
	background: #fbbf24 !important;
}

.tws-tc-capacity-bar.is-full span {
	background: #f87171 !important;
}

.tws-tc-event-card.is-past .tws-tc-capacity-bar {
	opacity: 0.45 !important;
}

/* Jobb oldali nyíl */
.tws-tc-event-arrow {
	font-size: 26px !important;
	line-height: 1 !important;
	color: #cbd5e1 !important;
	padding-right: 4px !important;
	transition: transform 0.2s ease, color 0.2s ease !important;
}

.tws-tc-event-card:hover .tws-tc-event-arrow {
	color: #007cba !important;
	transform: translateX(3px) !important;
}

/* Vásárlói csoportok (egy rendelés = egy társaság = egy asztal) */
.tws-tc-group-card {
	margin-bottom: 10px !important;
	background: #ffffff !important;
	border-radius: 14px !important;
	border: 1px solid rgba(0,0,0,0.05) !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
	overflow: hidden !important;
}

.tws-tc-group-card.is-done {
	background: #f8fafc !important;
	border-color: #e2e8f0 !important;
}

.tws-tc-group-head {
	display: grid !important;
	grid-template-columns: 20px minmax(0, 1fr) auto !important;
	align-items: center !important;
	gap: 12px !important;
	padding: 14px 16px !important;
	cursor: pointer !important;
	transition: background 0.2s ease !important;
}

.tws-tc-group-head:hover {
	background: rgba(0,124,186,0.04) !important;
}

.tws-tc-group-head:focus-visible {
	outline: 2px solid #007cba !important;
	outline-offset: -2px !important;
}

/* A nyíl lecsukva jobbra, lenyitva lefelé mutat */
.tws-tc-group-toggle {
	font-size: 22px !important;
	line-height: 1 !important;
	color: #94a3b8 !important;
	text-align: center !important;
	transition: transform 0.2s ease, color 0.2s ease !important;
}

.tws-tc-group-card.is-open .tws-tc-group-toggle {
	transform: rotate(90deg) !important;
	color: #007cba !important;
}

.tws-tc-group-main {
	min-width: 0 !important;
}

.tws-tc-group-name {
	display: block !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.tws-tc-group-meta {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	margin-top: 5px !important;
	font-size: 13px !important;
	color: #64748b !important;
}

.tws-tc-group-size {
	font-size: 12px !important;
	font-weight: 700 !important;
	white-space: nowrap !important;
	color: #0369a1 !important;
	background: #e0f2fe !important;
	border-radius: 999px !important;
	padding: 3px 10px !important;
}

.tws-tc-group-progress {
	font-size: 12px !important;
	font-weight: 600 !important;
	white-space: nowrap !important;
	color: #475569 !important;
	background: #f1f5f9 !important;
	border-radius: 999px !important;
	padding: 3px 9px !important;
}

.tws-tc-group-progress.is-done {
	color: #047857 !important;
	background: #d1fae5 !important;
}

.tws-tc-group-action {
	margin-left: 8px !important;
}

/* A jegyek csak lenyitva látszanak */
.tws-tc-group-body {
	display: none !important;
	padding: 4px 16px 14px 16px !important;
	border-top: 1px solid rgba(0,0,0,0.05) !important;
	background: #fbfdff !important;
}

.tws-tc-group-card.is-open .tws-tc-group-body {
	display: block !important;
}

.tws-tc-group-body .tws-tc-ticket-card:last-child {
	margin-bottom: 0 !important;
}

/* Jegy kártyák */
.tws-tc-ticket-card {
	padding: 12px 16px !important;
	margin-top: 10px !important;
	margin-bottom: 0 !important;
	background: #ffffff !important;
	border-radius: 14px !important;
	border: 1px solid rgba(0,0,0,0.05) !important;
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
}

.tws-tc-ticket-card:hover {
	box-shadow: 0 6px 16px rgba(0,0,0,0.05) !important;
}

.tws-tc-ticket-card.is-redeemed {
	background: #f8fafc !important; /* Slightly distinct background */
	border: 1px solid #e2e8f0 !important;
}

.tws-tc-ticket-info {
	flex-grow: 1 !important;
}

.tws-tc-ticket-info strong {
	display: block !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	font-family: monospace !important; /* Makes serial numbers look cooler */
	letter-spacing: 0.5px !important;
}

.tws-tc-ticket-info small {
	display: block !important;
	color: #64748b !important;
	margin-top: 2px !important;
	font-size: 13px !important;
}

.tws-tc-redeem-date {
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #10b981 !important;
	margin-top: 8px !important;
	display: inline-block !important;
	background: #ecfdf5 !important;
	padding: 4px 8px !important;
	border-radius: 6px !important;
}

.tws-tc-ticket-action {
	margin-left: 15px !important;
}

/* Kisebb képernyők (Mobil) */
@media (max-width: 480px) {
	.tws-tc-header {
		padding: 16px !important;
		flex-wrap: wrap !important;
		gap: 10px !important;
	}
	.tws-tc-header h2 {
		order: -1 !important;
		width: 100% !important;
		margin-left: 0 !important;
		text-align: center !important;
		font-size: 18px !important;
		margin-bottom: 5px !important;
	}
	.tws-tc-header .tws-tc-btn {
		flex: 1 !important;
		text-align: center !important;
	}

	/* Mobilon a cím a fejléc tetején fut végig, alatta a két gomb egy sorban */
	.tws-tc-header-actions {
		width: 100% !important;
	}

	#tws-tc-tickets-view .tws-tc-header h2 {
		text-align: left !important;
	}
	
	/* Az eseménylista fejléce egy sorban marad: a cím balra, a Frissítés
	   gomb mellette. A jegyek nézetben marad a tördelt, három gombos fejléc. */
	#tws-tc-events-view .tws-tc-header {
		flex-wrap: nowrap !important;
		gap: 12px !important;
	}

	#tws-tc-events-view .tws-tc-header h2 {
		order: 0 !important;
		width: auto !important;
		margin: 0 !important;
		text-align: left !important;
	}

	#tws-tc-events-view .tws-tc-header .tws-tc-btn {
		flex: 0 0 auto !important;
	}

	.tws-tc-list {
		padding: 12px !important;
	}

	.tws-tc-group-title {
		margin-bottom: 10px !important;
	}

	.tws-tc-group-title:not(:first-child) {
		margin-top: 22px !important;
	}

	.tws-tc-event-card {
		gap: 12px !important;
		padding: 13px 12px !important;
		margin-bottom: 10px !important;
		border-radius: 14px !important;
	}

	.tws-tc-event-chip {
		width: 48px !important;
		padding: 6px 3px !important;
		border-radius: 10px !important;
	}

	.tws-tc-chip-day {
		font-size: 20px !important;
	}

	.tws-tc-chip-month,
	.tws-tc-chip-weekday {
		font-size: 9px !important;
	}

	.tws-tc-event-title {
		font-size: 15px !important;
		margin-bottom: 5px !important;
	}

	.tws-tc-event-meta {
		gap: 6px !important;
		font-size: 12px !important;
	}

	.tws-tc-capacity-label {
		font-size: 11px !important;
		padding: 2px 7px !important;
	}

	.tws-tc-event-arrow {
		font-size: 22px !important;
		padding-right: 0 !important;
	}

	.tws-tc-ticket-card {
		flex-direction: column !important;
		align-items: flex-start !important;
		padding: 12px !important;
	}

	.tws-tc-ticket-action {
		margin-left: 0 !important;
		margin-top: 12px !important;
		width: 100% !important;
	}

	.tws-tc-ticket-action button {
		width: 100% !important;
		padding: 10px !important;
	}

	/* A csoportgomb saját sorba kerül, hogy a név ne préselődjön össze */
	.tws-tc-group-head {
		grid-template-columns: 18px minmax(0, 1fr) !important;
		gap: 10px !important;
		padding: 12px !important;
	}

	.tws-tc-group-action {
		grid-column: 2 !important;
		margin-left: 0 !important;
		margin-top: 10px !important;
	}

	.tws-tc-group-action button {
		width: 100% !important;
	}

	.tws-tc-group-body {
		padding: 0 12px 12px 12px !important;
	}
}
