/**
 * Ryan's Goslings–styled booking portal.
 * Optimized for desktop, tablet, and mobile.
 */

.rdo-portal {
	--rdo-portal-accent: #fbb500;
	--rdo-portal-accent-dark: #e2a300;
	--rdo-portal-dark: #1f1b2d;
	--rdo-portal-muted: #666276;
	--rdo-portal-border: #e9e6ed;
	--rdo-portal-surface: #ffffff;
	--rdo-portal-soft: #f8f7fb;
	--rdo-portal-radius: 0.75rem;
	--rdo-portal-shadow: 0 0.125rem 0.5rem -0.25rem rgba(31, 27, 45, 0.12),
		0 0.25rem 1rem rgba(31, 27, 45, 0.08);
	--rdo-portal-gutter: clamp(1rem, 3vw, 1.5rem);
	--rdo-portal-touch: 2.75rem;
	box-sizing: border-box;
	width: 100%;
	max-width: min(1080px, calc(100vw - var(--rdo-portal-gutter) * 2));
	margin: 0 auto clamp(2rem, 5vw, 3.5rem);
	padding: 0;
	color: var(--rdo-portal-muted);
	font-family: Nunito, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.rdo-portal *,
.rdo-portal *::before,
.rdo-portal *::after {
	box-sizing: border-box;
}

/* Theme page integration — hide page title/hero band, keep site navigation */
body.rdo-portal-page header.site-header + .wp-block-template-part,
body.rdo-portal-page .page-header,
body.rdo-portal-page .bs-page-header {
	display: none !important;
}

body.rdo-portal-page .wp-block-post-title,
body.rdo-portal-page .entry-title,
body.rdo-portal-page .page-title,
body.rdo-portal-page .wp-block-post-content > h1:first-child {
	display: none !important;
}

body.rdo-portal-page .entry-content,
body.rdo-portal-page .wp-block-post-content {
	max-width: none;
}

body.rdo-portal-page .entry-content:has(.rdo-portal),
body.rdo-portal-page .wp-block-post-content:has(.rdo-portal) {
	padding-top: clamp(4.75rem, 8vw, 5.5rem);
	margin-top: 0;
}

body.rdo-portal-page .alignwide.rdo-portal,
body.rdo-portal-page .alignfull.rdo-portal {
	max-width: min(1080px, calc(100vw - var(--rdo-portal-gutter) * 2));
	margin-left: auto;
	margin-right: auto;
}

/* Hero */
.rdo-portal-hero {
	margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
	padding: clamp(1.35rem, 4vw, 2.25rem) clamp(1.15rem, 3vw, 2rem);
	border-radius: var(--rdo-portal-radius);
	background: linear-gradient(135deg, #454056 0%, #1f1b2d 100%);
	color: #fff;
	box-shadow: var(--rdo-portal-shadow);
}

.rdo-portal-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rdo-portal-accent);
}

.rdo-portal-title {
	margin: 0 0 0.65rem;
	font-size: clamp(1.5rem, 3.2vw, 2.35rem);
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
}

.rdo-portal-intro {
	margin: 0;
	max-width: 40rem;
	font-size: clamp(0.975rem, 2vw, 1.05rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

/* Notices */
.rdo-portal-notices {
	margin-bottom: 1rem;
}

.rdo-portal-notices .woocommerce-message,
.rdo-portal-notices .woocommerce-error,
.rdo-portal-notices .woocommerce-info {
	margin: 0 0 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	list-style: none;
}

.rdo-portal-notices .woocommerce-error {
	background: #fef2f2;
	color: #991b1b;
}

.rdo-portal-notices .woocommerce-message {
	background: #f0fdf4;
	color: #166534;
}

.rdo-portal-notices .woocommerce-info {
	background: #fff9e8;
	color: #7a5a00;
}

/* Steps — horizontal on desktop/tablet, scroll on small screens */
.rdo-portal-steps {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.65rem;
	margin: 0 0 clamp(1.15rem, 3vw, 1.5rem);
	padding: 0.15rem 0 0.35rem;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
}

.rdo-portal-steps::-webkit-scrollbar {
	height: 4px;
}

.rdo-portal-steps::-webkit-scrollbar-thumb {
	background: rgba(31, 27, 45, 0.18);
	border-radius: 999px;
}

.rdo-portal-step {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	gap: 0.65rem;
	min-width: 9.5rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--rdo-portal-border);
	border-radius: var(--rdo-portal-radius);
	background: var(--rdo-portal-surface);
	box-shadow: var(--rdo-portal-shadow);
	scroll-snap-align: start;
}

.rdo-portal-step.is-active {
	border-color: rgba(251, 181, 0, 0.45);
	background: #fff9e8;
}

.rdo-portal-step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	background: var(--rdo-portal-dark);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
	flex: 0 0 auto;
}

.rdo-portal-step.is-active .rdo-portal-step__number {
	background: var(--rdo-portal-accent);
	color: var(--rdo-portal-dark);
}

.rdo-portal-step__label {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--rdo-portal-dark);
}

/* Layout */
.rdo-portal-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
	gap: clamp(1rem, 2.5vw, 1.5rem);
	align-items: start;
}

.rdo-portal-card {
	padding: clamp(1.15rem, 3vw, 1.5rem);
	border: 1px solid var(--rdo-portal-border);
	border-radius: var(--rdo-portal-radius);
	background: var(--rdo-portal-surface);
	box-shadow: var(--rdo-portal-shadow);
}

.rdo-portal-card--summary {
	position: sticky;
	top: clamp(1rem, 3vw, 1.5rem);
}

.rdo-portal-card-heading,
.rdo-portal-summary-title {
	margin: 0 0 1rem;
	font-size: clamp(1rem, 2vw, 1.125rem);
	font-weight: 700;
	line-height: 1.3;
	color: var(--rdo-portal-dark);
}

.rdo-portal-card--notice {
	border-color: #fecaca;
	background: #fff7f7;
	color: #991b1b;
}

.rdo-portal-form {
	margin: 0;
}

/* Booking fields inside portal */
.rdo-portal .rdo-booking-panel,
.rdo-portal .rdo-booking-panel--portal {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.rdo-portal .rdo-booking-field {
	margin-bottom: clamp(1rem, 2.5vw, 1.25rem);
}

.rdo-portal .rdo-booking-field label,
.rdo-portal .rdo-booking-section-label {
	color: var(--rdo-portal-dark);
	font-size: 0.9375rem;
}

.rdo-portal .rdo-booking-grid {
	gap: clamp(0.75rem, 2vw, 1rem);
	margin-top: 0.65rem;
}

	.rdo-portal .rdo-booking-date-input,
	.rdo-portal .rdo-booking-date-display,
.rdo-portal .rdo-booking-time-select,
.rdo-portal .rdo-booking-breed-input {
	width: 100%;
	min-height: var(--rdo-portal-touch);
	padding: 0.75rem 1rem;
	border: 1px solid var(--rdo-portal-border);
	border-radius: 0.5rem;
	background: #fff;
	color: var(--rdo-portal-dark);
	font-size: 1rem;
	line-height: 1.4;
}

	.rdo-portal .rdo-booking-date-input:hover,
	.rdo-portal .rdo-booking-date-input:focus,
	.rdo-portal .rdo-booking-date-display:hover,
	.rdo-portal .rdo-booking-date-display:focus,
.rdo-portal .rdo-booking-time-select:focus,
.rdo-portal .rdo-booking-breed-input:focus {
	border-color: var(--rdo-portal-accent);
	box-shadow: 0 0 0 3px rgba(251, 181, 0, 0.18);
	outline: none;
}

.rdo-portal .rdo-booking-time-select {
	padding-right: 2.75rem;
	font-weight: 600;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23fbb500' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	cursor: pointer;
}

.rdo-portal .rdo-booking-time-select:disabled {
	background-color: var(--rdo-portal-soft);
	color: #9490a3;
	cursor: not-allowed;
}

.rdo-portal .rdo-booking-field-hint {
	margin-top: 0.4rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #9490a3;
}

.rdo-portal .rdo-booking-selected-summary {
	margin-top: 0.85rem;
	padding: 0.8rem 0.95rem;
	border-radius: 0.5rem;
	background: #fff9e8;
	color: #7a5a00;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.45;
}

.rdo-portal .rdo-booking-agreement-list {
	gap: 0.65rem;
}

.rdo-portal .rdo-booking-agreement-option {
	min-height: var(--rdo-portal-touch);
	padding: 0.75rem 0.95rem;
	border-color: var(--rdo-portal-border);
}

.rdo-portal .rdo-booking-agreement-input {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.15rem;
	flex: 0 0 auto;
}

.rdo-portal .rdo-booking-agreement-option:has(.rdo-booking-agreement-input:checked) {
	border-color: rgba(251, 181, 0, 0.55);
	background: #fff9e8;
}

/* Calendar */
.rdo-portal .flatpickr-calendar.rdo-picker-calendar {
	border-color: var(--rdo-portal-accent);
}

.rdo-portal .flatpickr-calendar.rdo-picker-calendar--portal,
.rdo-portal .flatpickr-calendar.rdo-calendar--portal {
	box-shadow: var(--rdo-portal-shadow);
}

.rdo-portal .rdo-booking-date-field {
	overflow: visible;
}

.rdo-portal .rdo-booking-date-field .flatpickr-calendar.inline {
	margin-top: 0.5rem;
}

.rdo-portal .rdo-picker-calendar .flatpickr-months {
	background: var(--rdo-portal-dark);
}

.rdo-portal .rdo-picker-calendar .flatpickr-day {
	min-height: 2.25rem;
	line-height: 2.25rem;
}

.rdo-portal .rdo-picker-calendar .flatpickr-day.selected,
.rdo-portal .rdo-picker-calendar .flatpickr-day.startRange,
.rdo-portal .rdo-picker-calendar .flatpickr-day.endRange {
	background: var(--rdo-portal-accent);
	border-color: var(--rdo-portal-accent);
	color: var(--rdo-portal-dark);
	font-weight: 700;
}

.rdo-portal .rdo-picker-calendar .flatpickr-day.today {
	border-color: var(--rdo-portal-accent);
}

.rdo-portal-step.is-complete {
	border-color: rgba(251, 181, 0, 0.45);
	background: #fffdf5;
}

.rdo-portal-step.is-complete .rdo-portal-step__number {
	background: var(--rdo-portal-accent);
	color: var(--rdo-portal-dark);
}

.rdo-portal-step-panel[hidden] {
	display: none !important;
}

.rdo-portal-panel-title {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-panel-intro {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--rdo-portal-muted);
}

.rdo-portal-info-content {
	max-height: min(28rem, 55vh);
	margin: 0 0 1.25rem;
	padding: clamp(0.85rem, 2.5vw, 1.15rem) clamp(1rem, 2.5vw, 1.25rem);
	overflow: auto;
	border: 1px solid var(--rdo-portal-border);
	border-radius: calc(var(--rdo-portal-radius) - 0.125rem);
	background: var(--rdo-portal-soft);
	color: var(--rdo-portal-dark);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.rdo-portal-info-content > :first-child {
	margin-top: 0;
}

.rdo-portal-info-content > :last-child {
	margin-bottom: 0;
}

.rdo-portal-info-content h3 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-info-content ul,
.rdo-portal-info-content ol {
	margin: 0.5rem 0 0.85rem;
	padding-left: 1.25rem;
}

.rdo-portal-info-content li + li {
	margin-top: 0.35rem;
}

.rdo-portal-info-content a {
	color: #8a6a00;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.rdo-portal-info-content a:hover,
.rdo-portal-info-content a:focus {
	color: var(--rdo-portal-accent-dark);
}

.rdo-portal-step-error {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border-radius: 0.5rem;
	background: #fef2f2;
	color: #991b1b;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.rdo-portal-step-error[hidden] {
	display: none !important;
}

.rdo-portal-review-card {
	display: grid;
	gap: 0.85rem;
	margin-bottom: 0.5rem;
	padding: 1rem;
	border: 1px solid var(--rdo-portal-border);
	border-radius: 0.65rem;
	background: var(--rdo-portal-soft);
}

.rdo-portal-review-row {
	display: grid;
	gap: 0.25rem;
}

.rdo-portal-review-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-review-value {
	font-size: 0.975rem;
	line-height: 1.5;
	color: var(--rdo-portal-muted);
}

.rdo-portal-actions--split {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.rdo-portal-actions--split .rdo-portal-button {
	flex: 1 1 180px;
}

.rdo-portal-button--secondary {
	background: transparent;
	color: var(--rdo-portal-dark);
	border: 1px solid var(--rdo-portal-border);
	box-shadow: none;
}

.rdo-portal-button--secondary:hover,
.rdo-portal-button--secondary:focus-visible {
	background: var(--rdo-portal-soft);
	color: var(--rdo-portal-dark);
}

/* Submit */
.rdo-portal-actions {
	margin-top: clamp(1rem, 2.5vw, 1.35rem);
	padding-top: clamp(1rem, 2.5vw, 1.25rem);
	border-top: 1px solid var(--rdo-portal-border);
}

.rdo-portal-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--rdo-portal-touch);
	padding: 0.85rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--rdo-portal-accent);
	color: var(--rdo-portal-dark);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 0.25rem 0.25rem 0.125rem rgba(251, 181, 0, 0.1),
		0 0.375rem 0.75rem -0.125rem rgba(251, 181, 0, 0.35);
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.rdo-portal-button:hover,
.rdo-portal-button:focus-visible {
	background: var(--rdo-portal-accent-dark);
	color: var(--rdo-portal-dark);
	transform: translateY(-1px);
	outline: none;
}

.rdo-portal-button:active {
	transform: translateY(0);
}

.rdo-portal-button[aria-busy='true'] {
	opacity: 0.85;
	cursor: wait;
	pointer-events: none;
}

.rdo-portal-button[aria-busy='true']::after {
	content: '';
	display: inline-block;
	width: 1rem;
	height: 1rem;
	margin-left: 0.55rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: rdo-portal-spin 0.65s linear infinite;
	vertical-align: -0.15em;
}

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

/* Summary sidebar */
.rdo-portal-summary-list {
	margin: 0 0 1.15rem;
	padding-left: 1.15rem;
	font-size: 0.9375rem;
	line-height: 1.55;
}

.rdo-portal-summary-list li + li {
	margin-top: 0.45rem;
}

.rdo-portal-price {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: 0.5rem;
	background: var(--rdo-portal-soft);
}

.rdo-portal-price__label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-price__value {
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-service-name {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--rdo-portal-dark);
}

.rdo-portal-manage-link {
	margin: 0;
	padding-top: 0.85rem;
	border-top: 1px solid var(--rdo-portal-border);
	font-size: 0.9rem;
	line-height: 1.45;
}

.rdo-portal-manage-link a {
	display: inline-block;
	padding: 0.35rem 0;
	color: #3993d5;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rdo-portal-manage-link a:hover {
	color: #2b7ab8;
}

/* Tablet */
@media (min-width: 768px) {
	.rdo-portal-step {
		min-width: 0;
	}

	.rdo-portal .rdo-booking-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.rdo-portal-button {
		width: auto;
		min-width: 240px;
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.rdo-portal-hero {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 0.35rem;
	}

	.rdo-portal-layout {
		grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
	}
}

/* Mobile */
@media (max-width: 767px) {
	body.rdo-portal-page {
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.rdo-portal {
		max-width: none;
		width: 100%;
		margin-bottom: clamp(2rem, 5vw, 3.5rem);
	}

	.rdo-portal-layout {
		grid-template-columns: 1fr;
	}

	.rdo-portal-card--summary {
		position: static;
		padding: 1rem 1.05rem;
	}

	.rdo-portal-card--summary .rdo-portal-summary-list {
		margin-bottom: 0.75rem;
	}

	.rdo-portal-card--summary .rdo-portal-summary-list li {
		font-size: 0.875rem;
	}

	.rdo-portal-card--form {
		padding-bottom: 0.5rem;
	}

	.rdo-portal .rdo-booking-grid {
		grid-template-columns: 1fr;
	}

	.rdo-portal .rdo-booking-field-hint {
		font-size: 0.78rem;
	}

	.rdo-portal-actions {
		position: static;
		margin: 1.25rem 0 0;
		padding: 1rem 0 0;
		border-top: 1px solid var(--rdo-portal-border);
		background: transparent;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.rdo-portal-button {
		width: 100%;
		min-width: 0;
		font-size: 1.0625rem;
	}

	.rdo-portal .rdo-picker-calendar .flatpickr-day {
		min-height: 0;
		line-height: 1;
	}
}

@media (max-width: 479px) {
	.rdo-portal-step {
		min-width: 8.5rem;
		padding: 0.65rem 0.75rem;
	}

	.rdo-portal-step__label {
		font-size: 0.8125rem;
	}

	.rdo-portal-hero {
		border-radius: 0.65rem;
	}

	.rdo-portal-card {
		border-radius: 0.65rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rdo-portal-button {
		transition: none;
	}

	.rdo-portal-button:hover,
	.rdo-portal-button:focus-visible {
		transform: none;
	}
}

/* Nevermore Farms theme integration (sweet-flower-shop) */
body.nevermore-farms.rdo-portal-page .sfs-main {
	padding-top: 0;
}

body.nevermore-farms .rdo-portal {
	--rdo-portal-accent: #b794f6;
	--rdo-portal-accent-dark: #9f7aea;
	--rdo-portal-dark: #08050f;
	--rdo-portal-muted: #9d8fb8;
	--rdo-portal-border: #2d1f42;
	--rdo-portal-surface: #120a1c;
	--rdo-portal-soft: #1a1028;
	color: #c4b5d8;
	font-family: "Crimson Pro", Georgia, serif;
}

body.nevermore-farms .rdo-portal-hero {
	background: linear-gradient(135deg, #2d1f42 0%, #08050f 100%);
}

body.nevermore-farms .rdo-portal-title,
body.nevermore-farms .rdo-portal-kicker,
body.nevermore-farms .rdo-portal-panel-title,
body.nevermore-farms .rdo-portal-step__label {
	color: #e8dff5;
}

body.nevermore-farms .rdo-portal-card {
	background: var(--rdo-portal-surface);
	border-color: var(--rdo-portal-border);
}

body.nevermore-farms .rdo-portal-button--primary {
	background: var(--rdo-portal-accent);
	color: #08050f;
}

body.nevermore-farms .rdo-portal-button--primary:hover,
body.nevermore-farms .rdo-portal-button--primary:focus-visible {
	background: var(--rdo-portal-accent-dark);
	color: #08050f;
}

body.nevermore-farms .rdo-portal-info-content a {
	color: #b794f6;
}
