/* ==========================================================================
   CS Booking Upgrades — Upgrade Form Styles
   Design tokens matched to cs-enhanced-booking-calendar (booking-calendar.css):
     Backgrounds  : #f9f9f9 / #fff
     Borders      : 1px solid #e0e0e0  |  radius: 4px
     Text         : #333 (primary), #666 (secondary), #888 (muted)
     Accent       : #5EC1A0 (Cabinscape teal) — used where EBC uses #0073aa
   ========================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
#cs-bu-wrapper {
	max-width: 600px;   /* matches .cs-ebc-cost-breakdown max-width */
	margin: 0 auto;
	clear: both;
	overflow: hidden;
}

/* ── My Account–style login / register panel (Step 1) ───────────────────── */
.cs-bu-account-panel {
	margin-bottom: 1.75rem;
	padding: 1.25rem 1.5rem;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.cs-bu-account-panel--logged-in {
	background: #f0f6fc;
	border-color: #c3d9ed;
}

.cs-bu-account-panel-intro {
	margin: 0 0 1.25rem;
	color: #666;
	font-size: 14px;
	line-height: 1.5;
}

.cs-bu-account-columns {
	margin-bottom: 0;
}

/* After lookup: register column hidden because email already has an account */
.cs-bu-account-columns.cs-bu-account-single-col .u-column1 {
	width: 100%;
	float: none;
}

.cs-bu-account-col h2 {
	margin: 0 0 0.5rem;
	font-size: 1.25em;
	font-weight: 600;
}

.cs-bu-account-col-desc {
	margin: 0 0 1rem;
	color: #666;
	font-size: 14px;
	line-height: 1.45;
}

.cs-bu-account-col .button {
	display: inline-block;
}

.cs-bu-lost-password {
	margin: 1rem 0 0;
	font-size: 14px;
}

.cs-bu-account-logout {
	margin-left: 0.5rem;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.cs-bu-account-columns .u-column1,
	.cs-bu-account-columns .u-column2 {
		width: 100%;
		float: none;
		margin-bottom: 1.5rem;
	}
	.cs-bu-account-columns .u-column2 {
		margin-bottom: 0;
	}
}

/* ── Functional: hide steps until JS activates them ─────────────────────── */
#cs-bu-step-2,
#cs-bu-step-3 {
	display: none;
}

/* ── Inline AJAX error notices ───────────────────────────────────────────── */
.cs-bu-inline-error {
	margin: 10px 0 0;
	padding: 12px 14px;
	background: #fcf2f2;
	border: 1px solid #d63638;
	border-radius: 4px;
	color: #1d2327;
	font-size: 14px;
	line-height: 1.45;
}

/* ── Section headings — matches .cs-ebc-cost-breakdown h4 ────────────────── */
.cs-bu-section-title {
	margin: 20px 0 10px;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.cs-bu-section-desc {
	margin-top: 0;
	margin-bottom: 15px;
	color: #666;
	font-size: 14px;
}

/* ── Booking summary card ────────────────────────────────────────────────── */
/* Kept dark for visual hierarchy, but border/radius now matches EBC */
.cs-bu-booking-summary {
	margin: 0 0 20px;
	padding: 20px;
	background: #333;
	color: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	clear: both;
	overflow: hidden;
}

.cs-bu-booking-summary h3 {
	margin: 0 0 15px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #5EC1A0;
}

/* Rows match .cs-ebc-cost-line */
.cs-bu-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cs-bu-summary-row:last-child {
	border-bottom: none;
}

.cs-bu-summary-label {
	flex: 1;
	color: #aaa;
	font-size: 14px;
}

.cs-bu-summary-value {
	flex: 0 0 auto;
	font-weight: 600;
	color: #fff;
	text-align: right;
	font-size: 14px;
}

/* ── Upgrade option cards ────────────────────────────────────────────────── */
/* Matches .cs-ebc-calendar-wrapper white-card style */
.cs-bu-option {
	padding: 10px 15px;
	margin-bottom: 8px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	transition: border-color 0.2s ease;
}

.cs-bu-option:hover {
	border-color: #5EC1A0;
}

.cs-bu-option-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	width: 100%;
	margin: 0;
}

.cs-bu-option-label input[type="checkbox"],
.cs-bu-option-label input[type="radio"] {
	width: 16px;
	height: 16px;
	accent-color: #5EC1A0;
	flex-shrink: 0;
	margin: 0;
}

.cs-bu-option-text {
	flex: 1;
}

.cs-bu-option-text strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.cs-bu-date,
.cs-bu-description {
	display: block;
	font-size: 13px;
	color: #666;
	margin-top: 3px;
}

.cs-bu-current {
	display: block;
	font-size: 13px;
	color: #5EC1A0;
	font-weight: 600;
	margin-top: 3px;
}

.cs-bu-option-price {
	flex: 0 0 auto;
	font-weight: 600;
	font-size: 14px;
	color: #333;
	text-align: right;
	white-space: nowrap;
}

/* ── Person type qty stepper ─────────────────────────────────────────────── */
/* Matches EBC's clean control style */
.cs-bu-option-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.cs-bu-person-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.cs-bu-qty-btn {
	width: 30px;
	height: 30px;
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	background: #f5f5f5;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: #333;
	transition: background 0.2s ease, border-color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.cs-bu-qty-btn:hover:not(:disabled) {
	background: #5EC1A0;
	color: #fff;
	border-color: #5EC1A0;
}

.cs-bu-qty-btn:disabled,
.cs-bu-qty-btn.cs-bu-btn-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.cs-bu-qty-display,
.cs-bu-addon-qty {
	min-width: 24px;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

/* ── At-capacity badge ───────────────────────────────────────────────────── */
.cs-bu-at-capacity {
	opacity: 0.7;
}

.cs-bu-capacity-badge {
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	padding: 4px 8px;
	white-space: nowrap;
}

/* ── Product add-on groups ───────────────────────────────────────────────── */
.cs-bu-addon-group {
	margin-bottom: 15px;
}

.cs-bu-addon-group > .cs-bu-addon-name {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	margin-bottom: 6px;
}

.cs-bu-addon-group:has(.cs-bu-addon-checkbox) > .cs-bu-addon-name {
	display: none;
}

.cs-bu-addon-option input[type="checkbox"],
.cs-bu-addon-option input[type="radio"] {
	width: 16px;
	height: 16px;
	accent-color: #5EC1A0;
	flex-shrink: 0;
	margin: 0;
}

/* ── "None available" notice ─────────────────────────────────────────────── */
.cs-bu-none-available {
	font-size: 14px;
	color: #888;
	padding: 5px 0;
}

/* ── Order summary — matches .cs-ebc-cost-breakdown ─────────────────────── */
#cs-bu-summary-section {
	display: none;
	margin: 20px 0 0;
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	clear: both;
	overflow: hidden;
	position: relative;
}

#cs-bu-summary-section h3 {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

/* Line items match .cs-ebc-cost-line */
#cs-bu-line-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cs-bu-line-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
}

.cs-bu-line-item:last-child {
	border-bottom: none;
}

.cs-bu-li-label {
	flex: 1;
	text-align: left;
	color: #333;
}

.cs-bu-li-amount {
	flex: 0 0 auto;
	text-align: right;
	font-weight: 500;
	color: #333;
}

/* Discount line — matches .cs-ebc-discount-line */
.cs-bu-discount-line .cs-bu-li-label,
.cs-bu-discount-line .cs-bu-li-amount {
	color: #5EC1A0;
	font-weight: 600;
}

/* Coupon line */
.cs-bu-coupon-line .cs-bu-li-label,
.cs-bu-coupon-line .cs-bu-li-amount {
	color: #5EC1A0;
	font-weight: 600;
}

/* ── Coupon input section ─────────────────────────────────────────────── */
.cs-bu-coupon-section {
	margin-bottom: 20px;
}

.cs-bu-coupon-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.cs-bu-coupon-input {
	flex: 1;
	min-width: 0;
}

.cs-bu-coupon-success {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 8px;
	padding: 10px 14px;
}

.cs-bu-remove-coupon {
	background: none;
	border: none;
	color: #888;
	cursor: pointer;
	font-size: 13px;
	padding: 0;
	flex-shrink: 0;
	text-decoration: underline;
	line-height: 1;
}

.cs-bu-remove-coupon:hover {
	color: #d63638;
}

@media (max-width: 480px) {
	.cs-bu-coupon-row {
		flex-direction: column;
		align-items: stretch;
	}

	.cs-bu-coupon-success {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Loading state — matches .cs-ebc-cost-breakdown-loading */
.cs-bu-loading {
	color: #666;
	font-style: italic;
	font-size: 14px;
}

/* Total row — matches .cs-ebc-subtotal-line */
.cs-bu-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #e0e0e0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.cs-bu-total-note {
	font-size: 13px;
	color: #888;
	font-style: italic;
	margin-top: 5px;
}

/* ── Step 3: Processing spinner — matches .cs-ebc-spinner ────────────────── */
#cs-bu-step-3 {
	text-align: center;
	padding: 40px 20px;
	min-height: 200px;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.cs-bu-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #5EC1A0;
	border-radius: 50%;
	animation: cs-bu-spin 1s linear infinite;
	margin: 0 auto 15px;
}

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

#cs-bu-step-3 p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* ── Responsive — matches EBC @media (max-width: 768px) ─────────────────── */
@media (max-width: 768px) {
	.cs-bu-booking-summary,
	#cs-bu-summary-section {
		padding: 15px;
	}

	.cs-bu-option-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.cs-bu-person-controls {
		margin-top: 8px;
	}

	.cs-bu-section-title {
		font-size: 16px;
	}
}
