/* ========================================
   Simple Booking - Frontend Styles
   Scoped with #sb-modal for theme protection
   ======================================== */

/* Modal Overlay */
#sb-modal.sb-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Modal Container — reset all inherited theme styles */
#sb-modal .sb-modal-container {
	background: #fff;
	border-radius: 12px;
	max-width: 520px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 30px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: #333;
	line-height: 1.5;
	text-align: left;
}

/* Reset theme styles on all buttons inside modal */
#sb-modal .sb-modal-container button {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	outline: none;
}

/* Close Button */
#sb-modal .sb-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none !important;
	border: none !important;
	font-size: 28px;
	color: #999 !important;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	min-width: auto;
	width: auto;
	height: auto;
	z-index: 5;
}

#sb-modal .sb-modal-close:hover,
#sb-modal .sb-modal-close:focus {
	color: #333 !important;
	background: none !important;
}

/* ========================================
   Progress Bar (7 steps — compact layout)
   ======================================== */
#sb-modal .sb-progress {
	display: flex;
	justify-content: space-between;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border: none;
	outline: none;
	padding-right: 30px;
	gap: 2px;
}

#sb-modal .sb-progress-step {
	flex: 1;
	text-align: center;
	font-size: 11px;
	color: #bbb;
	font-weight: 500;
	position: relative;
}

#sb-modal .sb-progress-step .sb-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #eee;
	color: #999;
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 3px;
}

#sb-modal .sb-progress-step .sb-step-label {
	display: block;
	font-size: 9px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#sb-modal .sb-progress-step.active .sb-step-num {
	background: #866047;
	color: #fff;
}

#sb-modal .sb-progress-step.active {
	color: #866047;
	font-weight: 600;
}

#sb-modal .sb-progress-step.completed .sb-step-num {
	background: #866047;
	color: #fff;
}

#sb-modal .sb-progress-step.completed {
	color: #866047;
}

/* Step Headings */
#sb-modal .sb-step h3 {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 600;
	color: #222;
	padding: 0;
	border: none;
	text-transform: none;
	letter-spacing: normal;
}

/* ========================================
   Calendar
   ======================================== */
#sb-modal .sb-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

#sb-modal .sb-calendar-header span {
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

#sb-modal .sb-cal-nav {
	background: none !important;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 18px;
	cursor: pointer;
	color: #555 !important;
	min-width: auto;
	width: auto;
	height: auto;
}

#sb-modal .sb-cal-nav:hover,
#sb-modal .sb-cal-nav:focus {
	background: #f5f5f5 !important;
	color: #333 !important;
}

#sb-modal .sb-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	margin-bottom: 4px;
}

#sb-modal .sb-calendar-weekdays span {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #888;
	padding: 6px 0;
}

#sb-modal .sb-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}

#sb-modal .sb-cal-day {
	text-align: center;
	padding: 10px 4px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.15s;
	border: none;
	background: none !important;
	color: #333 !important;
	min-width: auto;
	width: auto;
	height: auto;
}

#sb-modal .sb-cal-day:hover:not(.sb-cal-disabled):not(.sb-cal-empty) {
	background: #f0f0f0 !important;
	color: #333 !important;
}

#sb-modal .sb-cal-day.sb-cal-selected {
	background: #866047 !important;
	color: #fff !important;
	font-weight: 600;
}

#sb-modal .sb-cal-day.sb-cal-selected:hover {
	background: #6b4c38 !important;
	color: #fff !important;
}

#sb-modal .sb-cal-day.sb-cal-disabled {
	color: #ccc !important;
	cursor: not-allowed;
	text-decoration: line-through;
}

#sb-modal .sb-cal-day.sb-cal-disabled:hover {
	color: #ccc !important;
	background: none !important;
}

#sb-modal .sb-cal-day.sb-cal-today {
	border: 2px solid #866047;
}

#sb-modal .sb-cal-day.sb-cal-empty {
	cursor: default;
}

#sb-modal .sb-cal-day.sb-cal-empty:hover {
	background: none !important;
}

/* ========================================
   Session Buttons (Step 2)
   JS creates: .sb-session-btn with .sb-selected
   ======================================== */
#sb-modal .sb-session-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}

#sb-modal .sb-session-btn {
	padding: 18px 12px;
	border: 2px solid #866047;
	border-radius: 10px;
	background: #fff !important;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s;
	font-size: 16px;
	font-weight: 600;
	color: #333 !important;
	min-width: auto;
	width: auto;
	height: auto;
}

#sb-modal .sb-session-btn:hover {
	background: #f5f0ec !important;
	color: #333 !important;
}

#sb-modal .sb-session-btn.sb-selected {
	background: #866047 !important;
	color: #fff !important;
	border-color: #866047;
}

#sb-modal .sb-session-btn.sb-selected:hover {
	background: #6b4c38 !important;
	color: #fff !important;
}

/* ========================================
   Time Slots (Step 3)
   JS creates: .sb-time-btn with .sb-selected
   Container class: .sb-time-options
   ======================================== */
#sb-modal .sb-time-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 20px;
}

#sb-modal .sb-time-btn {
	padding: 14px 8px;
	border: 2px solid #866047;
	border-radius: 8px;
	background: #fff !important;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s;
	font-size: 14px;
	font-weight: 500;
	color: #333 !important;
	min-width: auto;
	width: auto;
	height: auto;
}

#sb-modal .sb-time-btn:hover {
	background: #f5f0ec !important;
	color: #333 !important;
}

#sb-modal .sb-time-btn.sb-selected {
	background: #866047 !important;
	color: #fff !important;
}

#sb-modal .sb-time-btn.sb-selected:hover {
	background: #6b4c38 !important;
	color: #fff !important;
}

/* ========================================
   Seating Options (Step 4) — Card Layout
   Image left, text right. JS toggles .sb-seating-active
   ======================================== */
#sb-modal .sb-seating-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

#sb-modal .sb-seating-option {
	display: flex;
	align-items: stretch;
	min-height: 132px;
	border: 2px solid #ddd;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.15s;
	overflow: hidden;
	background: #fff !important;
}

#sb-modal .sb-seating-option:hover {
	border-color: #866047;
	background: #faf7f5 !important;
}

#sb-modal .sb-seating-option.sb-seating-active {
	border-color: #866047;
	background: #f5f0ec !important;
	box-shadow: 0 0 0 1px #866047;
}

/* Hidden radio — card border shows selection */
#sb-modal .sb-seating-radio-hidden {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Image side — left */
#sb-modal .sb-seating-img-side {
	flex-shrink: 0;
	width: 100px;
	min-height: 90px;
}

#sb-modal .sb-seating-img-side img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Text side — right */
#sb-modal .sb-seating-text-side {
	flex: 1;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* No-image cards get padding on both sides */
#sb-modal .sb-seating-option:not(.sb-seating-has-img) .sb-seating-text-side {
	padding: 16px;
}

#sb-modal .sb-seating-name {
	font-size: 16px;
	font-weight: 700;
	color: #222 !important;
	margin-bottom: 4px;
}

#sb-modal .sb-seating-desc {
	font-size: 13px;
	color: #666;
	font-weight: 400;
	line-height: 1.5;
	margin: 0;
}

#sb-modal .sb-seating-min-note {
	display: inline-block;
	margin-top: 6px;
	padding: 2px 8px;
	background: #fff3e0;
	color: #e65100;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	align-self: flex-start;
}

/* ========================================
   Ticket / Guest Selection
   ======================================== */
#sb-modal .sb-ticket-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	border-bottom: 1px solid #eee;
}

#sb-modal .sb-ticket-info {
	flex: 1;
}

#sb-modal .sb-ticket-label {
	display: block;
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 2px;
	color: #333;
}

#sb-modal .sb-ticket-price {
	font-size: 13px;
	color: #666;
}

#sb-modal .sb-qty-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

#sb-modal .sb-qty-btn {
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 50%;
	border: 2px solid #866047 !important;
	background: #fff !important;
	color: #866047 !important;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	padding: 0;
	line-height: 1;
}

#sb-modal .sb-qty-btn:hover {
	background: #866047 !important;
	color: #fff !important;
	border-color: #866047 !important;
}

#sb-modal .sb-qty-btn:disabled {
	border-color: #ddd !important;
	color: #ddd !important;
	cursor: not-allowed;
	background: #fff !important;
}

#sb-modal .sb-qty-btn:disabled:hover {
	background: #fff !important;
	color: #ddd !important;
	border-color: #ddd !important;
}

#sb-modal .sb-qty-value {
	font-size: 18px;
	font-weight: 600;
	min-width: 24px;
	text-align: center;
	color: #333;
}

/* Total */
#sb-modal .sb-total {
	padding: 16px 0;
	font-size: 18px;
	font-weight: 700;
	text-align: right;
	color: #222;
}

/* Package pricing info */
#sb-modal .sb-package-info {
	background: #f5f0ec;
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 16px;
	font-size: 14px;
	color: #555;
	text-align: center;
}

#sb-modal .sb-package-info strong {
	color: #866047;
}

/* ========================================
   Form Fields
   ======================================== */
#sb-modal .sb-field {
	margin-bottom: 16px;
}

#sb-modal .sb-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #444;
}

#sb-modal .sb-field input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
	transition: border-color 0.15s;
	color: #333;
	background: #fff;
}

#sb-modal .sb-field input:focus {
	outline: none;
	border-color: #866047;
	box-shadow: 0 0 0 2px rgba(134, 96, 71, 0.2);
}

#sb-modal .sb-field input.sb-input-error {
	border-color: #d63638;
}

/* Promo input + Apply button */
#sb-modal .sb-promo-input-wrap {
	display: flex;
	gap: 8px;
}

#sb-modal .sb-promo-input-wrap input {
	flex: 1;
}

#sb-modal .sb-btn-apply {
	padding: 10px 20px;
	background: #866047;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

#sb-modal .sb-btn-apply:hover {
	background: #6f4f3a;
}

/* ========================================
   Summary (Step 7)
   ======================================== */
#sb-modal .sb-summary {
	background: #f9f9f9;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

#sb-modal .sb-summary-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

#sb-modal .sb-summary-row:last-child {
	border-bottom: none;
}

#sb-modal .sb-summary-label {
	color: #666;
	font-weight: 500;
}

#sb-modal .sb-summary-value {
	font-weight: 600;
	color: #222;
}

#sb-modal .sb-summary-total {
	font-size: 18px;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 2px solid #ddd;
}

#sb-modal .sb-summary-divider {
	border: none;
	border-top: 1px solid #eee;
	margin: 4px 0;
}

/* ========================================
   Buttons
   ======================================== */
#sb-modal .sb-step-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 24px;
	gap: 12px;
}

#sb-modal .sb-btn {
	padding: 12px 28px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
	text-transform: none;
	letter-spacing: normal;
	min-width: auto;
}

#sb-modal .sb-btn-next,
#sb-modal .sb-btn-submit {
	background: #866047 !important;
	color: #fff !important;
	margin-left: auto;
}

#sb-modal .sb-btn-next:hover:not(:disabled),
#sb-modal .sb-btn-submit:hover:not(:disabled) {
	background: #6b4c38 !important;
	color: #fff !important;
}

#sb-modal .sb-btn-next:disabled,
#sb-modal .sb-btn-submit:disabled {
	background: #bbb !important;
	color: #fff !important;
	cursor: not-allowed;
}

#sb-modal .sb-btn-back {
	background: #f0f0f0 !important;
	color: #555 !important;
}

#sb-modal .sb-btn-back:hover {
	background: #e0e0e0 !important;
	color: #333 !important;
}

/* ========================================
   Error Messages
   ======================================== */
#sb-modal .sb-error {
	background: #fef0f0;
	border: 1px solid #f5c6c6;
	color: #d63638;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 14px;
	margin-top: 12px;
}

/* ========================================
   Success Screen
   ======================================== */
#sb-modal .sb-success-icon {
	width: 64px;
	height: 64px;
	background: #866047;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin: 0 auto 16px;
}

#sb-modal #sb-step-success {
	text-align: center;
}

#sb-modal #sb-step-success h3 {
	color: #866047;
}

#sb-modal #sb-step-success p {
	color: #555;
	font-size: 15px;
}

#sb-modal #sb-step-success .sb-btn {
	margin-top: 20px;
	background: #866047 !important;
	color: #fff !important;
}

#sb-modal #sb-step-success .sb-btn:hover {
	background: #6b4c38 !important;
	color: #fff !important;
}

/* ========================================
   Loading Spinner
   ======================================== */
#sb-modal .sb-loading {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	z-index: 10;
}

#sb-modal .sb-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #eee;
	border-top-color: #866047;
	border-radius: 50%;
	animation: sb-spin 0.7s linear infinite;
}

@keyframes sb-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 540px) {
	#sb-modal .sb-modal-container {
		padding: 20px;
		max-height: 95vh;
	}

	/* Hide progress bar on mobile — too cramped with 7 steps */
	#sb-modal .sb-progress {
		display: none;
	}

	#sb-modal .sb-session-options {
		grid-template-columns: 1fr;
	}

	#sb-modal .sb-time-options {
		grid-template-columns: 1fr;
	}

	#sb-modal .sb-ticket-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	#sb-modal .sb-qty-controls {
		align-self: flex-end;
	}

	#sb-modal .sb-seating-img-side {
		width: 80px;
		min-height: 70px;
	}

	#sb-modal .sb-seating-name {
		font-size: 14px;
	}

	#sb-modal .sb-seating-desc {
		font-size: 12px;
	}
}
