/*
 * PWD Pro Bookings: front end.
 * Everything is scoped under .pwd-pb so theme and Elementor styles cannot leak
 * in, and colours are CSS variables a theme can override on .pwd-pb.
 */

.pwd-pb {
	--pwd-pb-primary: #2563eb;
	--pwd-pb-primary-contrast: #ffffff;
	--pwd-pb-text: #1f2937;
	--pwd-pb-muted: #6b7280;
	--pwd-pb-border: #e5e7eb;
	--pwd-pb-surface: #ffffff;
	--pwd-pb-soft: #f3f4f6;
	--pwd-pb-radius: 10px;

	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	color: var(--pwd-pb-text);
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.pwd-pb *,
.pwd-pb *::before,
.pwd-pb *::after {
	box-sizing: border-box;
}

/* ── Notices (login gate, placeholder) ─────────────────────────────── */

.pwd-pb .pwd-pb-notice {
	background: var(--pwd-pb-surface);
	border: 1px solid var(--pwd-pb-border);
	border-radius: var(--pwd-pb-radius);
	padding: 24px;
	text-align: center;
}

.pwd-pb .pwd-pb-notice--login {
	border-top: 4px solid var(--pwd-pb-primary);
}

.pwd-pb .pwd-pb-notice__text,
.pwd-pb .pwd-pb-notice__text p {
	margin: 0 0 8px;
	color: var(--pwd-pb-text);
	font-size: 16px;
}

.pwd-pb .pwd-pb-notice__text p:last-child {
	margin-bottom: 0;
}

.pwd-pb .pwd-pb-notice__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
}

/* ── Buttons (explicit, so theme / Elementor link styles do not win) ── */

.pwd-pb a.pwd-pb-btn,
.pwd-pb button.pwd-pb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 2px solid var(--pwd-pb-primary);
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pwd-pb a.pwd-pb-btn--primary,
.pwd-pb button.pwd-pb-btn--primary {
	background: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
}

.pwd-pb a.pwd-pb-btn--primary:hover,
.pwd-pb a.pwd-pb-btn--primary:focus {
	background: transparent;
	color: var(--pwd-pb-primary);
}

.pwd-pb a.pwd-pb-btn--secondary,
.pwd-pb button.pwd-pb-btn--secondary {
	background: transparent;
	color: var(--pwd-pb-primary);
}

.pwd-pb a.pwd-pb-btn--secondary:hover,
.pwd-pb a.pwd-pb-btn--secondary:focus {
	background: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
}

.pwd-pb a.pwd-pb-btn:focus-visible,
.pwd-pb button.pwd-pb-btn:focus-visible {
	outline: 3px solid var(--pwd-pb-primary);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.pwd-pb .pwd-pb-notice {
		padding: 18px 16px;
	}

	.pwd-pb .pwd-pb-notice__actions {
		flex-direction: column;
	}

	.pwd-pb a.pwd-pb-btn {
		width: 100%;
	}
}

/* =====================================================================
 * Booking form (0.9.0)
 * ===================================================================== */

.pwd-pb-app {
	position: relative;
	background: var(--pwd-pb-surface);
	border: 1px solid var(--pwd-pb-border);
	border-radius: var(--pwd-pb-radius);
	padding: 20px;
}

.pwd-pb .pwd-pb-muted {
	color: var(--pwd-pb-muted);
	margin: 8px 0;
}

/* Loading */
.pwd-pb .pwd-pb-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px 0;
	color: var(--pwd-pb-muted);
}

.pwd-pb .pwd-pb-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--pwd-pb-border);
	border-top-color: var(--pwd-pb-primary);
	border-radius: 50%;
	animation: pwd-pb-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.pwd-pb .pwd-pb-spinner { animation-duration: 2.4s; }
}

/* Progress */
.pwd-pb .pwd-pb-progress {
	display: flex;
	gap: 4px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.pwd-pb .pwd-pb-progress li {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	color: var(--pwd-pb-muted);
	font-size: 12px;
	text-align: center;
	list-style: none;
}

.pwd-pb .pwd-pb-progress li::before {
	content: none;
}

.pwd-pb .pwd-pb-progress__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--pwd-pb-soft);
	color: var(--pwd-pb-muted);
	font-weight: 700;
	font-size: 12px;
}

.pwd-pb .pwd-pb-progress li.is-current { color: var(--pwd-pb-text); font-weight: 600; }
.pwd-pb .pwd-pb-progress li.is-current .pwd-pb-progress__num { background: var(--pwd-pb-primary); color: var(--pwd-pb-primary-contrast); }
.pwd-pb .pwd-pb-progress li.is-done .pwd-pb-progress__num { background: var(--pwd-pb-soft); color: var(--pwd-pb-primary); box-shadow: inset 0 0 0 2px var(--pwd-pb-primary); }

@media (max-width: 520px) {
	.pwd-pb .pwd-pb-progress__label { display: none; }
	.pwd-pb .pwd-pb-progress li.is-current .pwd-pb-progress__label { display: block; }
}

/* Step shell */
.pwd-pb .pwd-pb-step__title {
	margin: 0 0 14px;
	padding: 0;
	font-size: 20px;
	line-height: 1.3;
	color: var(--pwd-pb-text);
	outline: none;
}

.pwd-pb .pwd-pb-step__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--pwd-pb-border);
}

.pwd-pb .pwd-pb-step__footer .pwd-pb-btn--primary {
	margin-left: auto;
}

.pwd-pb .pwd-pb-step__summary {
	color: var(--pwd-pb-muted);
	font-size: 14px;
}

.pwd-pb .pwd-pb-alert {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 15px;
}

.pwd-pb .pwd-pb-alert--ok {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
}

/* Buttons (extends the base button rules above) */
.pwd-pb button.pwd-pb-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.pwd-pb a.pwd-pb-btn--ghost,
.pwd-pb button.pwd-pb-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: var(--pwd-pb-muted);
	padding-left: 8px;
	padding-right: 8px;
}

.pwd-pb button.pwd-pb-btn--ghost:hover {
	color: var(--pwd-pb-text);
	background: var(--pwd-pb-soft);
}

.pwd-pb button.pwd-pb-btn--primary:hover:not(:disabled) {
	filter: brightness(0.92);
	background: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
}

.pwd-pb a.pwd-pb-btn--danger,
.pwd-pb button.pwd-pb-btn--danger {
	background: transparent;
	border-color: #dc2626;
	color: #dc2626;
}

.pwd-pb button.pwd-pb-btn--danger:hover:not(:disabled) {
	background: #dc2626;
	color: #fff;
}

.pwd-pb button.pwd-pb-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--pwd-pb-primary);
	text-decoration: underline;
	font: inherit;
	cursor: pointer;
}

.pwd-pb .pwd-pb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}

/* Category chips */
.pwd-pb .pwd-pb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.pwd-pb button.pwd-pb-chip {
	padding: 7px 14px;
	border: 1px solid var(--pwd-pb-border);
	border-radius: 999px;
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
}

.pwd-pb button.pwd-pb-chip.is-active {
	background: var(--pwd-pb-primary);
	border-color: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
}

/* Cards (services, staff) */
.pwd-pb .pwd-pb-cards {
	display: grid;
	gap: 10px;
}

.pwd-pb button.pwd-pb-card {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--pwd-pb-border);
	border-radius: var(--pwd-pb-radius);
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pwd-pb button.pwd-pb-card:hover {
	border-color: var(--pwd-pb-primary);
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
}

.pwd-pb button.pwd-pb-card:focus-visible {
	outline: 3px solid var(--pwd-pb-primary);
	outline-offset: 2px;
}

.pwd-pb button.pwd-pb-card.is-selected {
	border-color: var(--pwd-pb-primary);
	box-shadow: 0 0 0 1px var(--pwd-pb-primary) inset;
}

.pwd-pb .pwd-pb-card__img {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	object-fit: cover;
}

.pwd-pb .pwd-pb-card__dot {
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--pwd-pb-primary);
}

.pwd-pb .pwd-pb-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pwd-pb .pwd-pb-card__title {
	font-weight: 600;
	font-size: 16px;
}

.pwd-pb .pwd-pb-card__meta {
	color: var(--pwd-pb-muted);
	font-size: 14px;
}

.pwd-pb .pwd-pb-card__desc {
	color: var(--pwd-pb-muted);
	font-size: 13px;
	line-height: 1.45;
}

.pwd-pb .pwd-pb-card__arrow {
	flex: none;
	color: var(--pwd-pb-muted);
	font-size: 22px;
	line-height: 1;
}

.pwd-pb .pwd-pb-card__check {
	flex: none;
	width: 22px;
	height: 22px;
	border: 2px solid var(--pwd-pb-border);
	border-radius: 6px;
}

.pwd-pb .is-selected .pwd-pb-card__check {
	border-color: var(--pwd-pb-primary);
	background: var(--pwd-pb-primary);
	box-shadow: inset 0 0 0 3px var(--pwd-pb-surface);
}

.pwd-pb .pwd-pb-avatar {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--pwd-pb-primary);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	object-fit: cover;
}

.pwd-pb .pwd-pb-avatar--any {
	background: var(--pwd-pb-soft);
	color: var(--pwd-pb-primary);
}

/* Date and time: stacked by default, side by side when the FORM (not the
   screen) is wide enough, so it also behaves in narrow Elementor columns. */
.pwd-pb-app {
	container-type: inline-size;
}

.pwd-pb .pwd-pb-when {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.pwd-pb .pwd-pb-cal {
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
}

@container (min-width: 620px) {
	.pwd-pb .pwd-pb-when { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
	.pwd-pb .pwd-pb-cal { margin: 0; }
}

.pwd-pb .pwd-pb-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.pwd-pb .pwd-pb-cal__month {
	font-weight: 600;
	text-transform: capitalize;
}

.pwd-pb button.pwd-pb-cal__nav {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--pwd-pb-border);
	border-radius: 50%;
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.pwd-pb button.pwd-pb-cal__nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.pwd-pb .pwd-pb-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.pwd-pb .pwd-pb-cal__wd {
	padding: 4px 0;
	color: var(--pwd-pb-muted);
	font-size: 12px;
	text-align: center;
	text-transform: capitalize;
}

.pwd-pb button.pwd-pb-cal__day {
	aspect-ratio: 1 / 1;
	width: 100%;
	min-height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: #c0c4cc;
	font: inherit;
	font-size: 15px;
	cursor: default;
}

.pwd-pb button.pwd-pb-cal__day.is-free {
	background: var(--pwd-pb-soft);
	color: var(--pwd-pb-text);
	font-weight: 600;
	cursor: pointer;
	box-shadow: inset 0 -3px 0 var(--pwd-pb-primary);
}

.pwd-pb button.pwd-pb-cal__day.is-free:hover {
	border-color: var(--pwd-pb-primary);
}

.pwd-pb button.pwd-pb-cal__day.is-selected {
	background: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
	box-shadow: none;
}

.pwd-pb .pwd-pb-times__date {
	margin: 0 0 10px;
	font-weight: 600;
}

.pwd-pb .pwd-pb-times__group {
	margin-bottom: 12px;
}

.pwd-pb .pwd-pb-times__label {
	display: block;
	margin-bottom: 6px;
	color: var(--pwd-pb-muted);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pwd-pb .pwd-pb-times__row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 8px;
}

.pwd-pb button.pwd-pb-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 6px;
	border: 1px solid var(--pwd-pb-border);
	border-radius: 8px;
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
}

.pwd-pb button.pwd-pb-slot small {
	color: var(--pwd-pb-muted);
	font-weight: 400;
	font-size: 11px;
}

.pwd-pb button.pwd-pb-slot:hover {
	border-color: var(--pwd-pb-primary);
	color: var(--pwd-pb-text);
	background: var(--pwd-pb-surface);
}

.pwd-pb button.pwd-pb-slot.is-selected {
	background: var(--pwd-pb-primary);
	border-color: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
}

.pwd-pb button.pwd-pb-slot.is-selected small {
	color: var(--pwd-pb-primary-contrast);
}

/* Details form */
.pwd-pb .pwd-pb-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.pwd-pb .pwd-pb-field--inline {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}

.pwd-pb .pwd-pb-field label,
.pwd-pb .pwd-pb-field legend {
	margin: 0;
	padding: 0;
	color: var(--pwd-pb-text);
	font-weight: 600;
	font-size: 15px;
}

.pwd-pb .pwd-pb-optional {
	color: var(--pwd-pb-muted);
	font-weight: 400;
}

.pwd-pb .pwd-pb-field input,
.pwd-pb .pwd-pb-field select,
.pwd-pb .pwd-pb-field textarea {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: var(--pwd-pb-text);
	font: inherit;
	font-size: 16px; /* 16px stops iOS from zooming into the field */
	box-shadow: none;
}

.pwd-pb .pwd-pb-field--inline select {
	width: auto;
}

.pwd-pb .pwd-pb-field input:focus,
.pwd-pb .pwd-pb-field select:focus,
.pwd-pb .pwd-pb-field textarea:focus {
	border-color: var(--pwd-pb-primary);
	outline: 2px solid var(--pwd-pb-primary);
	outline-offset: 0;
}

.pwd-pb .pwd-pb-help {
	color: var(--pwd-pb-muted);
	font-size: 13px;
}

.pwd-pb .pwd-pb-choices {
	gap: 6px;
}

.pwd-pb .pwd-pb-field label.pwd-pb-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.pwd-pb .pwd-pb-field .pwd-pb-choice input {
	width: 18px;
	min-height: 0;
	height: 18px;
	margin: 0;
	padding: 0;
	accent-color: var(--pwd-pb-primary);
}

.pwd-pb .pwd-pb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Summary list */
.pwd-pb .pwd-pb-summary {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 8px 16px;
	margin: 0;
	padding: 14px 16px;
	border-radius: var(--pwd-pb-radius);
	background: var(--pwd-pb-soft);
}

.pwd-pb .pwd-pb-summary dt {
	margin: 0;
	color: var(--pwd-pb-muted);
	font-weight: 400;
}

.pwd-pb .pwd-pb-summary dd {
	margin: 0;
	color: var(--pwd-pb-text);
	font-weight: 600;
	overflow-wrap: anywhere;
}

@media (max-width: 420px) {
	.pwd-pb .pwd-pb-summary { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.pwd-pb .pwd-pb-summary dd { margin-bottom: 8px; }
}

/* Done */
.pwd-pb .pwd-pb-done {
	text-align: center;
}

.pwd-pb .pwd-pb-done .pwd-pb-summary {
	text-align: left;
}

.pwd-pb .pwd-pb-done .pwd-pb-actions {
	justify-content: center;
}

.pwd-pb .pwd-pb-done__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--pwd-pb-primary);
	color: var(--pwd-pb-primary-contrast);
	font-size: 28px;
	font-weight: 700;
}

/* Booking summary on the WooCommerce payment and thank-you pages */
.pwd-pb.pwd-pb-order-summary {
	margin: 0 0 24px;
	padding: 16px 18px;
	border: 1px solid var(--pwd-pb-border);
	border-radius: var(--pwd-pb-radius);
	max-width: none;
}

.pwd-pb .pwd-pb-order-summary__title {
	margin: 0 0 8px;
	font-size: 18px;
}

.pwd-pb .pwd-pb-order-summary__hold {
	margin: 8px 0 0;
	color: #92400e;
}

@media (max-width: 480px) {
	.pwd-pb-app { padding: 14px; }
	.pwd-pb .pwd-pb-step__footer .pwd-pb-btn--primary { width: 100%; }
}

/* "Create an account" on the details step (0.9.2) */
.pwd-pb .pwd-pb-account {
	margin: 4px 0 14px;
	padding: 14px 16px;
	border: 1px solid var(--pwd-pb-border);
	border-radius: var(--pwd-pb-radius);
	background: var(--pwd-pb-soft);
}

.pwd-pb .pwd-pb-account.is-open {
	background: var(--pwd-pb-surface);
	border-color: var(--pwd-pb-primary);
}

.pwd-pb .pwd-pb-account__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	cursor: pointer;
}

.pwd-pb .pwd-pb-account__toggle input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--pwd-pb-primary);
}

.pwd-pb .pwd-pb-account__title {
	font-weight: 600;
	font-size: 16px;
	color: var(--pwd-pb-text);
}

.pwd-pb .pwd-pb-account__hint {
	display: block;
	margin: 4px 0 0 30px;
}

.pwd-pb .pwd-pb-account.is-open .pwd-pb-account__hint {
	margin-bottom: 14px;
}

.pwd-pb .pwd-pb-account__email {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.pwd-pb .pwd-pb-account__email input[type="email"] {
	flex: 1 1 220px;
	width: auto;
}

.pwd-pb .pwd-pb-account__email input[type="email"]:disabled {
	background: var(--pwd-pb-soft);
	color: var(--pwd-pb-muted);
}

.pwd-pb .pwd-pb-field label.pwd-pb-account__same {
	flex: 0 0 auto;
	font-size: 14px;
	white-space: nowrap;
}

.pwd-pb .pwd-pb-account__pass {
	display: flex;
	gap: 8px;
}

.pwd-pb .pwd-pb-account__pass input {
	flex: 1;
	width: auto;
}

.pwd-pb button.pwd-pb-account__show {
	flex: none;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	text-transform: none;
}

.pwd-pb button.pwd-pb-account__show:hover {
	border-color: var(--pwd-pb-primary);
	background: var(--pwd-pb-surface);
	color: var(--pwd-pb-text);
}
