/**
 * Custom Style CSS
 * 
 * Custom styles for booking functionality and design helpers
 * 
 * @package Noma_Theme
 * @since 1.0.0
 */

/* ============================================
   Booking Loading - center spinner only (no full-page overlay)
   ============================================ */
.noma-booking-loading {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	background: transparent;
	pointer-events: none;
}

.noma-booking-loading .spinner {
	pointer-events: auto;
}

.noma-booking-loading .spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Next button: loader inside button (no center overlay when Next is clicked) */
.next-btn.noma-next-loading {
	cursor: not-allowed;
	opacity: 0.85;
}

.next-btn .noma-btn-spinner {
	display: inline-block;
	vertical-align: middle;
	width: 18px;
	height: 18px;
	margin-right: 8px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* ============================================
   Booking Error Messages
   ============================================ */
.noma-booking-error {
	display: none;
}

.noma-booking-error .error-message-content {
	padding: 20px;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	margin: 20px 0;
}

.noma-booking-error h4 {
	margin-top: 0;
}

.noma-booking-error .error-text {
	margin-bottom: 10px;
}

.noma-booking-error .retry-booking-btn {
	margin-top: 10px;
	background-color: #326295 !important;
	color: #ffffff !important;
	border-color: #326295 !important;
	padding: 10px 20px !important;
	border-radius: 5px !important;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.noma-booking-error .retry-booking-btn:hover {
	background-color: #2a5280 !important;
	border-color: #2a5280 !important;
}

/* ============================================
   Session Cards Container
   ============================================ */
.session-cards-container {
	display: grid;
	grid-template-columns: repeat(2, minmax(280px, 1fr));
	gap: 30px;
	align-items: start;
	max-width: 700px;
	margin: auto;
}

.session-cards-container .card_session {
	margin: 0;
	width: 100%;
	max-width: none;
	min-width: 0;
}

#step2 .chose_date {
	position: sticky;
	top: 0;
	z-index: 5;
}

@media (max-width: 991px) {
	.session-cards-container {
		grid-template-columns: 1fr;
	}
}

/* ============================================
   Lazy Loading Images
   ============================================ */
img[loading="lazy"] {
	opacity: 0;
	transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
	opacity: 1;
}

/* ============================================
   Booking Notification Toast
   ============================================ */
.noma-booking-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10000;
	max-width: 400px;
	animation: slideInRight 0.3s ease-out;
}

.noma-booking-notification .notification-content {
	background-color: #fff;
	border: 1px solid #E1C5BA;
	border-radius: 5px;
	padding: 15px 20px;
	box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	gap: 12px;
}

.noma-booking-notification .notification-icon {
	font-size: 20px;
	color: #326295;
	flex-shrink: 0;
}

.noma-booking-notification .notification-message {
	flex: 1;
	color: #304358;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 500;
}

.noma-booking-notification .notification-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #959595;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: color 0.2s;
	flex-shrink: 0;
}

.noma-booking-notification .notification-close:hover {
	color: #304358;
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.noma-booking-notification {
		top: 10px;
		right: 10px;
		left: 10px;
		max-width: none;
	}
}

/* ============================================
   Seat Map Styling
   ============================================ */
.seat.selected {
	opacity: 1 !important;
	filter: brightness(1.2) !important;
	stroke: #27ae60 !important;
	stroke-width: 3px !important;
}

.seat-map-dynamic-container {
	width: 100%;
	overflow: auto;
	position: relative;
	min-height: 400px;
}

.seat-map-dynamic-container svg {
	width: 100%;
	height: auto;
	display: block;
}

/* Step 6: Pickup time options in one line (like original departure time layout) */
.pickup-list-container .pickup-list-options,
.pickup-list-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pickup-list-container .pickup-list-options time {
	display: block;
}

/* Seat map color bar (legend) - section value + color only; spacing like reference */
.seat-map-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin-bottom: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
	justify-content: center;
}
.seat-map-legend-row {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-right: 24px;
}
.seat-map-legend-row:last-child {
	margin-right: 0;
}
.seat-map-legend-item {
	display: inline-block;
	width: 14px;
	height: 14px;
	min-width: 14px;
	min-height: 14px;
	border-radius: 4px;
	vertical-align: middle;
}
.seat-map-legend-label {
	font-size: 11px;
	color: #333;
	vertical-align: middle;
}

/* ============================================
   Step 2 – Seating popup card (left panel rich card)
   ============================================ */
.step2-left-panel {
	position: relative;
	min-height: 320px;
}
.step2-left-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.step2-product-popup.step2-popup-card {
	position: fixed;
	left: 20%;
	/* position: absolute; */
	top: 55%;
	/* left: 50%; */
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 360px;
	max-height: calc(100% - 40px);
	background-color: #304358;
	overflow: hidden;
	z-index: 2;
	border-radius: 8px;
	box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}
.step2-popup-inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 100%;
	position: relative;
}
.step2-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.step2-popup-close:hover {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}
.step2-popup-image-wrap {
	flex: 0 0 auto;
	width: 100%;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.2);
}
.step2-popup-image-wrap .step2-popup-image {
	width: 100% !important;
	height: 100% !important;
	display: block;
}
ul.step2-popup-notes {
    margin-left: 15px;
    margin-bottom: 15px;
    color: #fff;
}
.step2-popup-image-wrap .step2-popup-image img {
	width: 150px !important;
	height: 150px !important;
	object-fit: cover;
	display: block;
}
.step2-popup-details {
	flex: 1 1 auto;
	padding: 16px 20px 20px;
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.step2-popup-details .step2-popup-title {
	margin: 0 0 6px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}
.step2-popup-details .step2-popup-description {
	margin: 0 0 10px;
	font-size: 0.9rem;
	padding:0;
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.4;
}
.step2-popup-price-capacity {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}
.step2-popup-details .step2-popup-price {
	margin: 0;
	font-size: 1.1rem;
	padding:0;
	font-weight: 700;
	color: #fff;
}
.step2-popup-details .step2-popup-capacity {
	margin: 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.9);
}
.step2-popup-details .step2-popup-confirm-btn {
	margin-top: auto;
	align-self: flex-end;
}