/**
 * Adventure Mae Salong Bookings — public widget styles.
 * Everything is scoped under .ams-widget so it stays isolated from the theme.
 */

.ams-widget {
	--ams-brand: #0f5132;
	--ams-brand-dark: #0b3d26;
	--ams-accent: #c79a3a;
	--ams-bg: #ffffff;
	--ams-muted: #6b7280;
	--ams-border: #e5e7eb;
	--ams-soft: #f3f4f6;
	--ams-danger: #b91c1c;
	box-sizing: border-box;
	max-width: 720px;
	margin: 0 auto;
	padding: 24px;
	background: var(--ams-bg);
	border: 1px solid var(--ams-border);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(15, 81, 50, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1f2937;
	line-height: 1.5;
}

.ams-widget *,
.ams-widget *::before,
.ams-widget *::after {
	box-sizing: border-box;
}

.ams-widget__head {
	text-align: center;
	margin-bottom: 20px;
}

.ams-widget__title {
	margin: 0;
	font-size: 26px;
	color: var(--ams-brand);
	font-weight: 700;
}

.ams-widget__subtitle {
	margin: 4px 0 0;
	color: var(--ams-muted);
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Warning banner (hotel widget) */
.ams-warning {
	background: #fef3c7;
	border: 1px solid #f59e0b;
	color: #92400e;
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 14px;
}

.ams-warning strong {
	display: inline;
}

/* Progress bar */
.ams-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	counter-reset: ams-step;
}

.ams-progress__item {
	flex: 1 1 0;
	min-width: 70px;
	text-align: center;
	font-size: 12px;
	color: var(--ams-muted);
	padding: 8px 4px 0;
	border-top: 3px solid var(--ams-border);
	counter-increment: ams-step;
}

.ams-progress__item::before {
	content: counter(ams-step);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--ams-border);
	color: #fff;
	font-size: 11px;
	margin-bottom: 4px;
}

.ams-progress__item.is-active {
	color: var(--ams-brand);
	border-top-color: var(--ams-brand);
	font-weight: 600;
}

.ams-progress__item.is-active::before,
.ams-progress__item.is-done::before {
	background: var(--ams-brand);
}

.ams-progress__item.is-done {
	border-top-color: var(--ams-brand);
}

/* Steps */
.ams-step {
	display: none;
	animation: ams-fade 0.2s ease;
}

.ams-step.is-active {
	display: block;
}

@keyframes ams-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.ams-step__title {
	margin: 0 0 16px;
	font-size: 18px;
	color: var(--ams-brand-dark);
}

/* Product cards */
.ams-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.ams-product-card {
	display: flex;
	flex-direction: column;
	text-align: left;
	gap: 4px;
	padding: 18px;
	border: 2px solid var(--ams-border);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
	width: 100%;
}

.ams-product-card:hover {
	border-color: var(--ams-brand);
	box-shadow: 0 6px 18px rgba(15, 81, 50, 0.12);
}

.ams-product-card:active {
	transform: scale(0.995);
}

.ams-product-card.is-selected {
	border-color: var(--ams-brand);
	background: #f0f7f3;
}

.ams-product-card__title {
	font-size: 17px;
	font-weight: 700;
	color: var(--ams-brand-dark);
}

.ams-product-card__tagline {
	font-size: 13px;
	color: var(--ams-muted);
}

.ams-product-card__price {
	margin-top: 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--ams-accent);
}

/* Fields */
.ams-field {
	display: block;
	margin-bottom: 16px;
}

.ams-field__label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.ams-input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--ams-border);
	border-radius: 9px;
	font-size: 15px;
	background: #fff;
	color: #1f2937;
}

.ams-input:focus {
	outline: none;
	border-color: var(--ams-brand);
	box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.12);
}

/* Availability note */
.ams-availability {
	font-size: 14px;
	margin: 4px 0 8px;
	min-height: 20px;
}

.ams-availability.is-soldout {
	color: var(--ams-danger);
	font-weight: 600;
}

.ams-availability.is-available {
	color: var(--ams-brand);
	font-weight: 600;
}

/* Time slots */
.ams-slots {
	margin: 12px 0;
}

.ams-slots__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-top: 6px;
}

.ams-slot {
	padding: 10px 4px;
	border: 1px solid var(--ams-border);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	cursor: pointer;
	text-align: center;
}

.ams-slot:hover:not(:disabled) {
	border-color: var(--ams-brand);
}

.ams-slot.is-selected {
	background: var(--ams-brand);
	color: #fff;
	border-color: var(--ams-brand);
}

.ams-slot:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* Riders / pillions */
.ams-rider-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--ams-border);
	border-radius: 10px;
	margin-bottom: 10px;
}

.ams-rider-row__label {
	font-weight: 600;
	font-size: 15px;
}

.ams-counter {
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.ams-counter__btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--ams-brand);
	background: #fff;
	color: var(--ams-brand);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ams-counter__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ams-counter__value {
	min-width: 24px;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
}

.ams-pillion-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--ams-muted);
}

/* Checkbox */
.ams-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 15px;
	cursor: pointer;
}

.ams-check input {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

/* Summary on payment step */
.ams-summary {
	background: var(--ams-soft);
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 16px;
	font-size: 14px;
}

.ams-summary__row {
	display: flex;
	justify-content: space-between;
	padding: 3px 0;
}

.ams-summary__row--total {
	border-top: 1px solid var(--ams-border);
	margin-top: 6px;
	padding-top: 8px;
	font-weight: 700;
	font-size: 16px;
	color: var(--ams-brand-dark);
}

/* Stripe card element */
.ams-card {
	padding: 12px;
	border: 1px solid var(--ams-border);
	border-radius: 9px;
	background: #fff;
}

.ams-card-error {
	color: var(--ams-danger);
	font-size: 13px;
	min-height: 18px;
	margin: 6px 0;
}

/* Buttons */
.ams-step__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
}

.ams-btn {
	appearance: none;
	border: none;
	background: var(--ams-brand);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.ams-btn:hover:not(:disabled) {
	background: var(--ams-brand-dark);
}

.ams-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ams-btn--ghost {
	background: transparent;
	color: var(--ams-muted);
	border: 1px solid var(--ams-border);
}

.ams-btn--ghost:hover:not(:disabled) {
	background: var(--ams-soft);
	color: #374151;
}

.ams-btn--pay {
	background: var(--ams-accent);
	min-width: 150px;
}

.ams-btn--pay:hover:not(:disabled) {
	background: #b2882f;
}

.ams-btn.is-loading {
	position: relative;
	color: transparent;
}

.ams-btn.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ams-spin 0.7s linear infinite;
}

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

/* Alerts */
.ams-alert {
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 14px;
}

.ams-alert--error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: var(--ams-danger);
}

/* Total bar */
.ams-totalbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 2px dashed var(--ams-border);
}

.ams-totalbar__label {
	font-size: 14px;
	color: var(--ams-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ams-totalbar__value {
	font-size: 24px;
	font-weight: 800;
	color: var(--ams-brand-dark);
}

/* Confirmation */
.ams-confirm {
	text-align: center;
	padding: 20px 0;
}

.ams-confirm__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--ams-brand);
	color: #fff;
	font-size: 34px;
	line-height: 64px;
}

.ams-confirm__title {
	color: var(--ams-brand);
	font-size: 22px;
	margin: 0 0 8px;
}

.ams-confirm__ref {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.05em;
	margin: 0 0 16px;
}

.ams-confirm__details {
	display: inline-block;
	text-align: left;
	background: var(--ams-soft);
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 14px;
	margin-bottom: 16px;
}

.ams-confirm__details div {
	padding: 2px 0;
}

.ams-confirm__note {
	color: var(--ams-muted);
	font-size: 14px;
}

/* Sessions */
.ams-session-list {
	display: grid;
	gap: 10px;
	margin-bottom: 4px;
}

.ams-session {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 10px;
	text-align: left;
	padding: 14px 16px;
	border: 2px solid var(--ams-border);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	width: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ams-session:hover {
	border-color: var(--ams-brand);
	box-shadow: 0 4px 14px rgba(15, 81, 50, 0.10);
}

.ams-session.is-selected {
	border-color: var(--ams-brand);
	background: #f0f7f3;
}

.ams-session__date {
	font-weight: 700;
	color: var(--ams-brand-dark);
}

.ams-session__time {
	font-weight: 600;
	color: var(--ams-accent);
}

.ams-session__seats {
	font-size: 13px;
	color: var(--ams-muted);
	white-space: nowrap;
}

@media (max-width: 480px) {
	.ams-session {
		grid-template-columns: 1fr auto;
	}
	.ams-session__seats {
		grid-column: 1 / -1;
	}
}

/* Week strip */
.ams-week-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.ams-week-nav__range {
	font-weight: 600;
	color: var(--ams-brand-dark);
}

.ams-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
}

.ams-day {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	padding: 10px 4px;
	border: 2px solid var(--ams-border);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	text-align: center;
}

.ams-day:hover:not(:disabled) {
	border-color: var(--ams-brand);
}

.ams-day.is-selected {
	border-color: var(--ams-brand);
	background: #f0f7f3;
}

.ams-day:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ams-day__weekday {
	font-size: 12px;
	color: var(--ams-muted);
	text-transform: uppercase;
}

.ams-day__date {
	font-weight: 700;
	color: var(--ams-brand-dark);
	font-size: 14px;
}

.ams-day__status {
	font-size: 11px;
	color: var(--ams-muted);
}

.ams-day.is-closed .ams-day__status,
.ams-day.is-full .ams-day__status {
	color: var(--ams-danger);
}

@media (max-width: 560px) {
	.ams-week { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
	.ams-week { grid-template-columns: repeat(3, 1fr); }
}

/* Responsive */
@media (min-width: 560px) {
	.ams-products {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.ams-widget {
		padding: 16px;
		border-radius: 10px;
	}

	.ams-slots__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.ams-widget__title {
		font-size: 22px;
	}

	.ams-totalbar__value {
		font-size: 20px;
	}
}
