/*=============================================
   Booking Sheet — Uses Theme Variables
   =============================================*/

/* --- Overlay & Container --- */
.sheet-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}
.sheet-backdrop.open {
	opacity: 1;
	visibility: visible;
}

booking-sheet {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translate(-50%, calc(100% + 60px));
	width: 100%;
	max-width: 600px;
	height: 90vh;
	background: var(--sheet-bg);
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
	box-shadow: var(--shadow-lg);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
	color: var(--sheet-text);
}

booking-sheet.open {
	transform: translate(-50%, 0);
}

@media (min-width: 768px) {
	booking-sheet {
		height: auto;
		max-height: 85vh;
		bottom: 0;
		transform: translate(-50%, calc(100% + 60px));
		border-radius: var(--radius-xl) var(--radius-xl) 0 0;
		opacity: 0;
	}

	booking-sheet.open {
		transform: translate(-50%, 0);
		opacity: 1;
	}
}

.sheet-header {
	position: relative;
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.sheet-close {
	position: absolute;
	top: 8px;
	right: 16px;
	background: var(--sheet-close-bg);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--sheet-close-color);
	transition: background 0.2s;
	z-index: 10;
}

.sheet-close:hover {
	background: var(--border);
}

.sheet-reset {
	position: absolute;
	top: 8px;
	right: 56px;
	background: var(--sheet-close-bg);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--sheet-close-color);
	transition: background 0.2s;
	z-index: 10;
}
.sheet-reset:hover {
	background: var(--border);
}

.stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: 32px;
	position: relative;
}

.stepper::before {
	content: "";
	position: absolute;
	top: 14px;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--step-inactive);
	z-index: 0;
}
.step {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	opacity: 1;
}
.step-circle {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--sheet-bg);
	border: 2px solid var(--step-inactive);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--step-inactive);
	transition: all 0.3s ease;
}
.step-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--step-inactive);
	text-transform: uppercase;
}
.step.active .step-circle {
	border-color: var(--step-active);
	color: var(--step-active);
	transform: scale(1.1);
}
.step.active .step-label {
	color: var(--step-active);
}
.step.done .step-circle {
	background: var(--step-done);
	border-color: var(--step-done);
	color: white;
}

/* --- Body Content --- */
.sheet-body {
	flex: 1;
	overflow-y: auto;
	padding: 0;
	scroll-behavior: smooth;
}

.step-content {
	display: none;
	padding: 24px;
	animation: fadeIn 0.4s ease;
}
.step-content.active {
	display: block;
}
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
	}
}

h3.step-title {
	margin: 0 0 16px 0;
	font-size: 1.25rem;
	color: var(--sheet-text);
}

/* --- Type Choice Cards --- */
.type-choice-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 480px) {
	.type-choice-grid {
		grid-template-columns: 1fr;
	}
}

.type-choice-card {
	position: relative;
	border: 2px solid var(--sheet-border);
	border-radius: 16px;
	padding: 32px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
	text-align: center;
	background: var(--sheet-control-bg);
}

.type-choice-card:hover {
	border-color: var(--step-active);
	background: color-mix(in srgb, var(--step-active) 6%, transparent);
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.type-card-icon {
	color: var(--sheet-text-muted);
	transition: color 0.2s;
}

.type-choice-card:hover .type-card-icon {
	color: var(--step-active);
}

.type-card-label {
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--sheet-text);
}

/* --- Ticket List Items --- */
.ticket-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--sheet-border-subtle);
	border-radius: 12px;
	margin-bottom: 12px;
	transition: border-color 0.2s;
}
.ticket-row:hover {
	border-color: var(--sheet-border);
}
.t-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.t-name {
	font-weight: 600;
	font-size: 1rem;
}
.t-price {
	font-size: 0.9rem;
	color: var(--sheet-text-muted);
}
.t-control {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--sheet-control-bg);
	padding: 4px;
	border-radius: 8px;
}
.t-btn {
	width: 28px;
	height: 28px;
	border: none;
	background: var(--sheet-bg);
	box-shadow: var(--shadow-sm);
	border-radius: 6px;
	cursor: pointer;
	font-weight: bold;
	color: var(--sheet-text);
}
.t-count {
	font-weight: 600;
	min-width: 20px;
	text-align: center;
}

/* --- Forms --- */
.form-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.form-row {
	display: flex;
	gap: 12px;
}
.form-row > * {
	flex: 1;
}
.sheet-input {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--sheet-border);
	border-radius: 8px;
	font-size: 1rem;
	outline: none;
	transition: border-color 0.2s;
	background: var(--sheet-bg);
	color: var(--sheet-text);
}
.sheet-input:focus {
	border-color: var(--step-active);
}
.sheet-input.error {
	border-color: #ff3b30;
	background: rgba(255, 59, 48, 0.05);
}

.summary-box {
	background: var(--sheet-elevated);
	border: 1px solid var(--sheet-border);
	border-radius: var(--radius-lg);
	padding: 24px;
	margin-top: 24px;
	margin-bottom: 24px;
}

.s-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
	font-size: 0.95rem;
	color: var(--sheet-text-muted);
	line-height: 1.5;
}

.s-row.total {
	border-top: 2px dashed var(--sheet-border);
	margin-top: 16px;
	padding-top: 16px;
	font-weight: 800;
	font-size: 1.25rem;
	color: var(--sheet-text);
	letter-spacing: -0.5px;
}

.review-items-container {
	background: var(--sheet-bg);
	border: 1px solid var(--sheet-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: 24px;
	box-shadow: var(--shadow-sm);
}

.review-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--sheet-border-subtle);
	transition: background 0.2s;
}

.review-item:last-child {
	border-bottom: none;
}

.review-item:hover {
	background: var(--sheet-elevated);
}

.r-item-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.r-item-label {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--sheet-text);
}

.r-item-meta {
	font-size: 0.85rem;
	color: var(--sheet-text-muted);
	font-family: var(--font-mono);
}

.r-item-price {
	font-weight: 700;
	font-size: 1rem;
	color: var(--sheet-text);
}

/* --- Seat Map --- */
#sheet-seat-map-container {
	height: 400px;
	width: 100%;
	background: var(--sheet-bg);
	border-radius: 8px;
	overflow: hidden;
}

/* --- Footer --- */
.sheet-footer {
	padding: 16px 24px;
	border-top: 1px solid var(--sheet-border-subtle);
	display: flex;
	gap: 12px;
	background: var(--sheet-bg);
}
.btn-sheet {
	flex: 1;
	padding: 14px;
	border-radius: 10px;
	border: none;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: transform 0.1s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.btn-sheet:active {
	transform: scale(0.98);
}
.btn-back {
	background: var(--sheet-control-bg);
	color: var(--sheet-text);
	flex: 0.4;
}
.btn-next {
	background: var(--step-active);
	color: var(--text-inverse);
	flex: 1;
}
.btn-next:disabled {
	background: var(--step-inactive);
	cursor: not-allowed;
}

/* Loaders */
.spinner {
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* --- Resume / Found Order Screen --- */
.resume-view {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 40px 24px;
	text-align: center;
}

.resume-icon {
	width: 80px;
	height: 80px;
	background: var(--info-soft);
	color: var(--info);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
	box-shadow: 0 8px 20px rgba(33, 150, 243, 0.15);
}

.resume-content {
	margin-bottom: 32px;
	max-width: 400px;
	width: 100%;
}

.resume-content h3 {
	margin: 0 0 12px 0;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sheet-text);
}

.resume-content p {
	margin: 0 0 16px 0;
	font-size: 1rem;
	color: var(--sheet-text-muted);
	line-height: 1.5;
}

.resume-price-badge {
	display: inline-flex;
	align-items: center;
	background: var(--sheet-elevated);
	border: 1px solid var(--sheet-border);
	padding: 8px 16px;
	border-radius: 50px;
	font-weight: 600;
	color: var(--sheet-text);
	font-size: 1rem;
}

.resume-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 320px;
}

.btn-resume-primary {
	background: var(--step-active);
	color: white;
	padding: 16px;
	font-size: 1.05rem;
	box-shadow: var(--shadow-sm);
	justify-content: center;
}

.btn-resume-secondary {
	background: transparent;
	border: 1px solid var(--sheet-border);
	color: var(--sheet-text-muted);
	padding: 14px;
	justify-content: center;
}
.btn-resume-secondary:hover {
	background: var(--sheet-elevated);
	border-color: var(--sheet-border);
	color: var(--sheet-text);
}

.btn-destructive {
	background: var(--danger-soft);
	color: var(--danger);
	border: 1px solid rgba(235, 87, 87, 0.2);
	flex: 0.4;
}
.btn-destructive:hover {
	background: rgba(235, 87, 87, 0.15);
	border-color: rgba(235, 87, 87, 0.4);
}

/* --- Add-on Cards --- */
.addon-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-bottom: 20px;
}

.addon-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--sheet-bg);
	border: 2px solid var(--sheet-border-subtle);
	border-radius: var(--radius-lg);
	padding: 16px;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
	position: relative;
	overflow: hidden;
}

.addon-card:hover {
	border-color: var(--sheet-border);
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.addon-card.selected {
	border-color: var(--step-active);
	background: var(--primary-soft);
}

.addon-info {
	flex: 1;
	padding-right: 16px;
}

.addon-name {
	display: block;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--sheet-text);
	margin-bottom: 4px;
}

.addon-desc {
	display: block;
	font-size: 0.85rem;
	color: var(--sheet-text-muted);
	line-height: 1.4;
}

.addon-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	min-width: 80px;
}

.addon-price {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--sheet-text);
	background: var(--sheet-control-bg);
	padding: 6px 12px;
	border-radius: 8px;
	transition: all 0.2s;
}

.addon-card.selected .addon-price {
	background: var(--step-active);
	color: #fff;
}

.addon-checkbox-circle {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid var(--sheet-border);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	color: transparent;
}

.addon-card.selected .addon-checkbox-circle {
	background: var(--step-active);
	border-color: var(--step-active);
	color: #fff;
	transform: scale(1.1);
}

/* --- intl-tel-input theme match --- */
.iti__country-list {
	background: var(--sheet-elevated);
	color: var(--sheet-text);
	border-color: var(--sheet-border);
}
.iti__country:hover {
	background: var(--sheet-control-bg);
}
