/**
 * SP WhatsApp Booking Frontend Styles
 */

/* Container and trigger button */
.spwb-button-container {
	margin: 25px 0;
	display: block;
	clear: both;
}

.spwb-book-now-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: #D4AF37;
	color: #12304A !important;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 28px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.1s ease;
	box-shadow: 0 4px 10px rgba(212, 175, 55, 0.35);
}

.spwb-book-now-btn:hover {
	background-color: #B8912E;
	color: #12304A !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(212, 175, 55, 0.45);
}

.spwb-book-now-btn:active {
	transform: translateY(0);
}

.spwb-btn-icon {
	flex-shrink: 0;
}

/* Modal Overlay */
.spwb-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.spwb-modal-overlay.spwb-show {
	opacity: 1;
}

/* Modal Dialog */
.spwb-modal-dialog {
	background: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e293b;
}

/* Modal Header */
.spwb-modal-header {
	padding: 18px 20px;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #f8fafc;
}

.spwb-modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
	padding-right: 15px;
}

.spwb-modal-close {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	padding: 0 4px;
	transition: color 0.15s ease;
}

.spwb-modal-close:hover {
	color: #0f172a;
}

/* Modal Body */
.spwb-modal-body {
	padding: 20px;
	overflow-y: auto;
	box-sizing: border-box;
}

/* Form Groups */
.spwb-form-group {
	margin-bottom: 16px;
}

.spwb-form-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #334155;
}

.spwb-required {
	color: #ef4444;
}

.spwb-optional {
	font-size: 12px;
	color: #94a3b8;
	font-weight: normal;
}

.spwb-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	color: #1e293b;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.spwb-input:focus {
	border-color: #D4AF37;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.spwb-input.spwb-has-error {
	border-color: #ef4444;
	background-color: #fef2f2;
}

.spwb-error-msg {
	display: none;
	color: #ef4444;
	font-size: 12px;
	margin-top: 4px;
}

.spwb-has-error + .spwb-error-msg {
	display: block;
}

/* Stepper Rows */
.spwb-stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #f1f5f9;
}

.spwb-stepper-row:last-child {
	border-bottom: none;
}

.spwb-stepper-label {
	display: flex;
	flex-direction: column;
	max-width: 65%;
}

.spwb-stepper-label strong {
	font-size: 14px;
	color: #1e293b;
}

.spwb-subtext {
	font-size: 12px;
	color: #64748b;
	margin-top: 2px;
}

.spwb-muted {
	color: #94a3b8;
	font-style: italic;
}

.spwb-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	overflow: hidden;
	background: #ffffff;
}

.spwb-step-btn {
	background: #f8fafc;
	border: none;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	user-select: none;
	transition: background 0.1s ease;
}

.spwb-step-btn:hover {
	background: #e2e8f0;
}

.spwb-step-btn:active {
	background: #cbd5e1;
}

.spwb-step-input {
	width: 44px;
	height: 34px;
	border: none;
	border-left: 1px solid #cbd5e1;
	border-right: 1px solid #cbd5e1;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	background: #ffffff;
	pointer-events: none;
	padding: 0;
	margin: 0;
}

/* Group info banner */
.spwb-group-info-box {
	background-color: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 12px;
}

/* Addons Section */
.spwb-form-section {
	margin-top: 15px;
	padding-top: 12px;
	border-top: 1px solid #e2e8f0;
}

.spwb-section-title {
	font-size: 14px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 8px;
}

/* Breakdown Card */
.spwb-breakdown-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 14px;
	margin-top: 18px;
}

.spwb-breakdown-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #64748b;
	margin-bottom: 10px;
}

.spwb-breakdown-lines {
	font-size: 13px;
	color: #334155;
	line-height: 1.6;
}

.spwb-breakdown-line {
	display: flex;
	justify-content: space-between;
	padding: 3px 0;
}

.spwb-breakdown-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid #cbd5e1;
	margin-top: 8px;
	padding-top: 8px;
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}

/* Modal Actions */
.spwb-modal-actions {
	margin-top: 20px;
}

.spwb-whatsapp-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background-color: #D4AF37;
	color: #12304A;
	border: none;
	border-radius: 8px;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
	transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.spwb-whatsapp-btn:hover:not(:disabled) {
	background-color: #B8912E;
	transform: translateY(-1px);
}

.spwb-whatsapp-btn:disabled {
	background-color: #94a3b8;
	cursor: not-allowed;
	opacity: 0.65;
	box-shadow: none;
}

.spwb-wa-icon {
	flex-shrink: 0;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
	.spwb-modal-dialog {
		max-height: 96vh;
	}
	.spwb-modal-body {
		padding: 15px;
	}
	.spwb-stepper-label {
		max-width: 55%;
	}
}

/* Booking Options (v1.1) */
.spwb-option-card {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 10px;
	cursor: pointer;
	background: #ffffff;
}

.spwb-option-card:hover {
	border-color: #94a3b8;
}

.spwb-option-card.spwb-option-selected {
	border-color: #D4AF37;
	background: #FBF6E3;
}

.spwb-option-card input[type="radio"] {
	margin: 0;
	flex-shrink: 0;
}

.spwb-option-main {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.spwb-option-note {
	font-size: 12px;
	color: #64748b;
}

.spwb-option-price {
	font-weight: 700;
	white-space: nowrap;
}

/* Option cards: one left-to-right row with horizontal scroll (v1.5.2) */
#spwb-inline-options,
#spwb-options-list {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 10px;
	padding-bottom: 8px;
	-webkit-overflow-scrolling: touch;
}

#spwb-inline-options .spwb-option-card,
#spwb-options-list .spwb-option-card {
	flex: 0 0 230px;
	margin-bottom: 0;
	flex-wrap: wrap;
}

@media (max-width: 480px) {
	#spwb-inline-options .spwb-option-card,
	#spwb-options-list .spwb-option-card {
		flex-basis: 72%;
	}
}

/* Card display rate text (v1.1) */
.spwb-display-price {
	font-weight: 700;
	color: #16a34a;
	margin-top: 6px;
}

/* Location map section (v1.2) */
.spwb-map-section {
	margin-top: 30px;
}

.spwb-map-section h3 {
	margin-bottom: 12px;
}

.spwb-map-section iframe {
	border-radius: 10px;
	display: block;
}

/* Header placement next to the trip duration (v1.3) */
.entry-header .spwb-button-container {
	display: inline-block;
	margin: 0 0 0 14px;
	vertical-align: middle;
}

.entry-header .spwb-book-now-btn {
	margin: 0;
}

/* Per-person auto add-on badge (v1.4) */
.spwb-paxsync-badge {
	font-size: 12px;
	font-weight: 700;
	color: #16a34a;
	border: 1px solid #16a34a;
	border-radius: 999px;
	padding: 3px 10px;
	white-space: nowrap;
}

/* Sticky bottom bar + inline booking section (v1.5) */
body.spwb-has-sticky-bar {
	padding-bottom: 76px;
}

.spwb-sticky-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
	box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.12);
	z-index: 999998;
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.spwb-sticky-bar-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.spwb-sticky-price {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.spwb-sticky-from {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
}

.spwb-sticky-suffix {
	font-size: 12px;
	color: #64748b;
}

.spwb-sticky-book-btn {
	margin: 0;
	white-space: nowrap;
}

.spwb-inline-section {
	margin-top: 30px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
}

.spwb-inline-title {
	margin-top: 0;
	margin-bottom: 10px;
}

.spwb-inline-section .spwb-form-group {
	margin-top: 14px;
}

.spwb-inline-section select.spwb-input {
	appearance: auto;
}

.spwb-inline-hint {
	font-size: 13px;
	color: #64748b;
	margin: 12px 0 0;
}

/* Inline-flow summary inside the modal (v1.5) */
.spwb-summary-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	margin-bottom: 16px;
}

.spwb-summary-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 3px 0;
	font-size: 14px;
	color: #334155;
}

.spwb-summary-row strong {
	color: #0f172a;
	text-align: right;
}
