/* =============================================================================
   WPT Booking Form — styles
   ============================================================================= */

/* Custom properties — easy to override in child themes */
:root {
	--wpt-primary:        #2271b1;
	--wpt-primary-hover:  #135e96;
	--wpt-success:        #00a32a;
	--wpt-error:          #d63638;
	--wpt-border:         #dcdcde;
	--wpt-bg-light:       #f6f7f7;
	--wpt-bg-summary:     #f0f4f8;
	--wpt-text:           #1e1e1e;
	--wpt-text-muted:     #646970;
	--wpt-radius:         6px;
	--wpt-gap:            1.5rem;
	--wpt-transition:     0.15s ease;
}

/* Hide the native WooCommerce cart form on the WPT product page */
.wpt-product-page .cart {
	display: none !important;
}

/* =============================================================================
   Layout: two-column wrapper
   ============================================================================= */

.wpt-booking-wrapper {
	display: grid;
	grid-template-columns: 1fr minmax(260px, 300px);
	gap: var(--wpt-gap);
	align-items: start;
	margin: 1.5rem 0 2rem;
}

.wpt-booking-main {
	min-width: 0;
}

.wpt-booking-sidebar {
	position: sticky;
	top: 2rem;
}

/* =============================================================================
   Utility
   ============================================================================= */

.wpt-hidden {
	display: none !important;
}

.wpt-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* =============================================================================
   Form sections
   ============================================================================= */

.wpt-section {
	margin-bottom: 1.5rem;
	padding: 1.25rem;
	background: #fff;
	border: 1px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
}

.wpt-section__title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--wpt-text);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.wpt-badge {
	display: inline-block;
	padding: 0.15em 0.5em;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--wpt-primary);
	color: #fff;
	border-radius: 3px;
}

/* =============================================================================
   Date input
   ============================================================================= */

.wpt-date-input {
	width: 100%;
	max-width: 220px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
	font-size: 1rem;
	color: var(--wpt-text);
	background: #fff;
	box-sizing: border-box;
}

.wpt-date-input:focus {
	outline: 2px solid var(--wpt-primary);
	outline-offset: 1px;
	border-color: var(--wpt-primary);
}

/* =============================================================================
   Slot grid
   ============================================================================= */

.wpt-slot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 0.5rem;
}

.wpt-slot-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.6rem 0.5rem;
	background: var(--wpt-bg-light);
	border: 2px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
	cursor: pointer;
	transition: border-color var(--wpt-transition), background var(--wpt-transition);
	font-family: inherit;
	text-align: center;
}

.wpt-slot-btn:hover {
	border-color: var(--wpt-primary);
	background: #f0f6fc;
}

.wpt-slot-btn--active {
	border-color: var(--wpt-primary) !important;
	background: var(--wpt-primary) !important;
	color: #fff;
}

.wpt-slot-btn__hour {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
}

.wpt-slot-btn__seats {
	font-size: 0.7rem;
	margin-top: 0.2rem;
	opacity: 0.8;
}

.wpt-no-slots {
	color: var(--wpt-text-muted);
	margin: 0;
	font-style: italic;
}

/* =============================================================================
   Ticket type rows
   ============================================================================= */

.wpt-ticket-types {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.wpt-ticket-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wpt-bg-light);
}

.wpt-ticket-row:last-child {
	border-bottom: none;
}

.wpt-ticket-row__label {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	cursor: default;
}

.wpt-ticket-row__name {
	font-weight: 600;
	color: var(--wpt-text);
}

.wpt-ticket-row__note {
	font-size: 0.8rem;
	color: var(--wpt-text-muted);
}

/* =============================================================================
   Quantity controls
   ============================================================================= */

.wpt-qty-control {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.wpt-qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: var(--wpt-bg-light);
	border: 1px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
	cursor: pointer;
	font-size: 1.1rem;
	font-family: inherit;
	line-height: 1;
	color: var(--wpt-text);
	transition: background var(--wpt-transition), border-color var(--wpt-transition);
}

.wpt-qty-btn:hover {
	background: var(--wpt-primary);
	border-color: var(--wpt-primary);
	color: #fff;
}

.wpt-qty-input {
	width: 52px;
	padding: 0.3rem 0.4rem;
	border: 1px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
	font-size: 1rem;
	text-align: center;
	color: var(--wpt-text);
	-moz-appearance: textfield;
}

.wpt-qty-input::-webkit-inner-spin-button,
.wpt-qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wpt-qty-input:focus {
	outline: 2px solid var(--wpt-primary);
	outline-offset: 1px;
	border-color: var(--wpt-primary);
}

/* =============================================================================
   No Limit section
   ============================================================================= */

.wpt-nolimit-availability {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: var(--wpt-text-muted);
}

.wpt-nolimit-remaining {
	color: var(--wpt-success);
}

/* =============================================================================
   Submit button
   ============================================================================= */

.wpt-section--submit {
	border: none;
	background: none;
	padding: 0;
}

.wpt-submit-btn {
	width: 100%;
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

/* =============================================================================
   Notices
   ============================================================================= */

.wpt-form-messages {
	margin-bottom: 1rem;
}

.wpt-notice {
	padding: 0.85rem 1rem;
	border-radius: var(--wpt-radius);
	font-size: 0.9rem;
	line-height: 1.5;
}

.wpt-notice--error {
	background: #fce8e8;
	border: 1px solid var(--wpt-error);
	color: #7a1a1a;
}

.wpt-notice--success {
	background: #edfaef;
	border: 1px solid var(--wpt-success);
	color: #0a4a18;
}

.wpt-notice ul {
	margin: 0;
	padding-left: 1.25rem;
}

.wpt-notice li + li {
	margin-top: 0.25rem;
}

/* =============================================================================
   Summary panel (right column)
   ============================================================================= */

.wpt-summary {
	background: var(--wpt-bg-summary);
	border: 1px solid var(--wpt-border);
	border-radius: var(--wpt-radius);
	padding: 1.25rem;
	min-height: 120px;
}

.wpt-summary__empty {
	color: var(--wpt-text-muted);
	font-style: italic;
	margin: 0;
	font-size: 0.9rem;
}

.wpt-summary__inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.wpt-summary__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--wpt-text);
}

.wpt-summary__date {
	margin: 0;
	font-size: 0.85rem;
	color: var(--wpt-text-muted);
	text-transform: capitalize;
}

.wpt-summary__lines {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wpt-border);
	padding-top: 0.75rem;
}

.wpt-summary__lines li + li {
	margin-top: 0.35rem;
}

.wpt-summary__line {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.9rem;
}

.wpt-summary__guardians {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.wpt-summary__line--surcharge {
	font-size: 0.8rem;
	color: var(--wpt-text-muted);
}

.wpt-summary__total {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 1.05rem;
	font-weight: 700;
	border-top: 2px solid var(--wpt-border);
	padding-top: 0.75rem;
	margin-top: 0.25rem;
	color: var(--wpt-text);
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 767px) {
	.wpt-booking-wrapper {
		grid-template-columns: 1fr;
	}

	.wpt-booking-sidebar {
		position: static;
		order: -1; /* summary above form on mobile */
	}

	.wpt-slot-grid {
		grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
	}
}
