/* ==========================================================================
   Alpine Pooch — booking page
   Services, calendar, basket, questionnaire, summary, payment, about-us gallery.
   Depends on base.css for tokens and shared chrome.
   ========================================================================== */

/* ------------------------------------------------------------- sections -- */

.section {
	width: 100%;
	max-width: var(--content);
}

#description-text {
	width: min(70ch, 100%);
	margin: var(--sp-5) auto var(--sp-7);
	font-family: var(--font-body);
	font-size: var(--fs-lg);
	line-height: 1.6;
	color: var(--darkgold);
}

.section-title,
#select-a-service,
#select-calendar,
#booking-summary-title,
#payment-details-title,
#contact-us {
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	font-weight: 700;
	color: var(--gold);
	line-height: 1.2;
	padding: var(--sp-3) 0;
}

#select-calendar {
	color: var(--darkgold);
}

#availability {
	font-size: 0.6em;
	color: var(--gold);
}

/* Panels share one look: white card, gold border, soft glow. */
.panel,
form,
#selected-time-option,
.questionnaire-container,
.summary-container,
#payment-section.active {
	width: 100%;
	max-width: var(--content);
	margin: var(--sp-5) auto;
	padding: clamp(1rem, 3vw, 2rem);
	background: var(--surface);
	border: 3px solid var(--darkgold);
	border-radius: var(--radius);
	box-shadow: var(--ring);
	text-align: center;
}

form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-4);
}

/* ------------------------------------------------------------- services -- */

#services-and-prices {
	width: 100%;
	max-width: var(--content);
	display: grid;
	/* 155px keeps all six service cards on one row at desktop width and steps
	   down to 4 / 3 / 2 as the viewport narrows. */
	grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr));
	gap: clamp(0.6rem, 1.5vw, 1.25rem);
	align-items: stretch;
	padding: var(--sp-2);
}

.services-and-prices-entry {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 220px;
	padding: var(--sp-3);
	background-color: #f0e5cc;
	background-repeat: no-repeat;
	background-position: center 18%;
	background-size: 55%;
	background-blend-mode: lighten;
	border: 3px solid var(--gold);
	border-radius: var(--radius);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.services-and-prices-entry:hover {
	transform: translateY(-4px);
	box-shadow: 0 0 12px var(--gold);
}

.services-and-prices-entry.active {
	border-color: var(--darkgold);
	box-shadow: 0 0 0 3px var(--cream), 0 0 16px var(--gold);
	transform: translateY(-4px) scale(1.03);
	z-index: 2;
}

.service-content-wrapper {
	margin-top: auto;
}

.sap-title {
	font-family: var(--font-body);
	font-size: var(--fs-md);
	font-weight: 700;
	color: var(--darkgold);
}

.sap-description {
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	font-weight: 700;
	font-style: italic;
	color: var(--gold);
}

/* ------------------------------------------------- selected service card -- */

#selected-time-option:empty {
	display: none;
}

.sap {
	display: flex;
	gap: var(--sp-5);
	align-items: center;
	text-align: left;
}

.service-image {
	flex: 0 0 34%;
	display: flex;
	justify-content: center;
}

.service-image img {
	width: 100%;
	max-width: 260px;
	object-fit: contain;
	border-radius: var(--radius);
}

.image-and-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}

.sap-time-price {
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-weight: 700;
	color: var(--darkgold);
}

.sap-time-price:empty {
	display: none;
}

.sap-text {
	font-family: var(--font-body);
	font-size: var(--fs-md);
	color: var(--gold);
	line-height: 1.6;
}

.sap-includes {
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-style: italic;
	color: var(--gold);
}

/* ------------------------------------------------------------- booking -- */

.booking {
	width: 100%;
	max-width: var(--content);
	margin: 0 auto;
}

.step-label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--sp-3);
}

.step-label h2 {
	margin: 0;
}

.step-num {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2.2rem;
	height: 2.2rem;
	font-family: var(--font-body);
	font-size: var(--fs-md);
	font-weight: 700;
	color: var(--white);
	background: var(--gold);
	border-radius: 50%;
}

#booking-form {
	align-items: stretch;
}

.booking-layout {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	gap: clamp(1rem, 2.5vw, 2rem);
	align-items: start;
	text-align: left;
}

/* ------------------------------------------------------------- calendar -- */

.cal-card {
	min-width: 0;
	user-select: none;
	-webkit-user-select: none;
}

.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-3);
	margin-bottom: var(--sp-2);
}

.cal-title {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: 700;
	color: var(--darkgold);
	text-transform: capitalize;
	text-align: center;
}

.cal-nav {
	width: 2.75rem;
	min-height: 2.75rem;
	padding: 0;
	border-radius: 50%;
	background: var(--white);
	color: var(--darkgold);
}

.cal-nav:hover {
	background: var(--darkgold);
	color: var(--white);
}

.cal-tools {
	display: flex;
	justify-content: flex-end;
	margin-bottom: var(--sp-2);
}

.cal-range-btn {
	min-height: 2.25rem;
	padding: 0.35rem 0.9rem;
	font-size: var(--fs-xs);
	background: var(--white);
	color: var(--darkgold);
	border-radius: 999px;
}

.cal-range-btn.active {
	background: var(--darkgold);
	color: var(--white);
	animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
	50% {
		box-shadow: 0 0 0 6px rgba(178, 138, 57, 0.18);
	}
}

.cal-weekdays,
.cal-week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: clamp(3px, 0.6vw, 6px);
}

.cal-weekdays {
	margin-bottom: var(--sp-1);
	font-size: var(--fs-xs);
	font-weight: 600;
	color: var(--muted);
	text-align: center;
	text-transform: capitalize;
}

.cal-grid {
	display: grid;
	gap: clamp(3px, 0.6vw, 6px);
	touch-action: pan-y;
}

/* Day cells are buttons; undo the global button look first. */
.cal-day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 2px;
	min-height: clamp(52px, 8vw, 74px);
	min-width: 0;
	padding: 6px 2px 5px;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	color: var(--ink);
	background: var(--white);
	border: 1.5px solid var(--line);
	border-radius: 10px;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.cal-pad {
	min-height: 0;
	border: none;
	background: transparent;
	pointer-events: none;
}

.cal-num {
	font-size: var(--fs-sm);
	font-weight: 600;
	line-height: 1;
}

.cal-sub {
	font-size: 0.72rem;
	line-height: 1.1;
	color: var(--darkgold);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.cal-day.is-available {
	cursor: pointer;
}

.cal-day.is-available:hover,
.cal-day.is-preview {
	background: #fbf3e2;
	border-color: var(--gold);
	color: var(--ink);
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}

.cal-day.is-selected {
	background: var(--darkgold);
	border-color: var(--darkgold);
	color: var(--white);
}

.cal-day.is-selected .cal-sub {
	color: var(--white);
}

.cal-day.is-selected:hover {
	background: #7d6125;
	color: var(--white);
}

.cal-check {
	display: inline-grid;
	place-items: center;
	width: 1.2rem;
	height: 1.2rem;
	font-size: 0.65rem;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 50%;
}

.cal-day.is-peak:not(.is-selected) {
	border-color: #d9a441;
	background: #fff8e8;
}

.cal-peak {
	position: absolute;
	top: 3px;
	right: 4px;
	font-size: 0.6rem;
	font-weight: 700;
	color: #b4741a;
}

.cal-day.is-booked,
.cal-day.is-clash,
.cal-day.is-booked:hover,
.cal-day.is-clash:hover {
	color: #9a948a;
	background: repeating-linear-gradient(-45deg, #f3f0ea, #f3f0ea 5px, #ebe6dc 5px, #ebe6dc 10px);
	border-color: transparent;
	cursor: not-allowed;
}

.cal-tag {
	font-size: 0.62rem;
	color: #9a948a;
}

/* Taken days: the greyed-out paw from the old calendar. */
.cal-paw {
	display: block;
	width: 26px;
	height: 26px;
	background: url('../images/paws.png') center / contain no-repeat;
	filter: grayscale(1);
	opacity: 0.4;
}

.legend-swatch.legend-booked {
	width: 18px;
	height: 18px;
	background: url('../images/paws.png') center / 13px no-repeat, #ebe6dc;
	border-color: transparent;
	filter: grayscale(1);
	opacity: 0.75;
}


.cal-day.is-contact {
	color: #31617a;
	background: #e9f3f7;
	border: 1.5px dashed #7fb1c8;
	cursor: pointer;
}

.cal-day.is-contact .cal-sub {
	color: #31617a;
}

.cal-day.is-contact:hover {
	background: #d8ebf3;
	color: #31617a;
}

.cal-day.is-closed,
.cal-day.is-past,
.cal-day:disabled,
.cal-day:disabled:hover {
	color: #c4bdb0;
	background: transparent;
	border-color: transparent;
	cursor: default;
}

.cal-day.is-today .cal-num {
	text-decoration: underline 2px var(--gold);
	text-underline-offset: 3px;
}

.cal-day.is-anchor {
	outline: 3px solid var(--gold);
	outline-offset: 1px;
}

.cal-picked {
	position: absolute;
	top: 3px;
	left: 4px;
	font-size: 0.6rem;
	color: var(--gold);
}

.cal-day.nudge {
	animation: nudge 0.35s ease;
}

@keyframes nudge {
	25% {
		transform: translateX(-3px);
	}
	75% {
		transform: translateX(3px);
	}
}

.cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2) var(--sp-4);
	margin-top: var(--sp-4);
	font-size: var(--fs-xs);
	color: var(--muted);
}

.legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.legend-swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 4px;
	border: 1.5px solid var(--line);
	background: var(--white);
}

.legend-picked {
	background: var(--darkgold);
	border-color: var(--darkgold);
}

.legend-booked {
	border-color: transparent;
}

.legend-peak {
	background: #fff8e8;
	border-color: #d9a441;
}

.legend-contact {
	background: #e9f3f7;
	border: 1.5px dashed #7fb1c8;
}

.legend-closed {
	background: transparent;
	border-style: dotted;
}

.cal-hint {
	margin: var(--sp-3) 0 0;
	font-size: var(--fs-xs);
	color: var(--muted);
}

/* --------------------------------------------------------------- basket -- */

.basket {
	position: sticky;
	top: var(--sp-4);
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
	padding: var(--sp-4);
	background: var(--surface-alt);
	border: 2px solid var(--line);
	border-radius: var(--radius);
}

.basket h3 {
	margin: 0;
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	text-align: left;
}

#selected-info {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}

.basket-empty {
	margin: 0;
	font-size: var(--fs-sm);
	color: var(--muted);
}

.basket-list {
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
	max-height: 360px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.basket-date {
	font-size: var(--fs-xs);
	font-weight: 700;
	color: var(--muted);
	text-transform: capitalize;
}

.basket-line {
	display: grid;
	grid-template-columns: 1.4rem 1fr auto auto;
	align-items: center;
	gap: var(--sp-2);
	padding: 4px 0;
	font-size: var(--fs-sm);
}

.basket-icon {
	color: var(--gold);
}

.basket-price {
	font-variant-numeric: tabular-nums;
}

.basket-remove {
	width: 1.8rem;
	min-height: 1.8rem;
	padding: 0;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--muted);
	background: transparent;
	border: none;
	border-radius: 50%;
}

.basket-remove:hover {
	color: #b3261e;
	background: #fbe9e7;
}

.basket-totals {
	padding-top: var(--sp-3);
	border-top: 1.5px dashed var(--line);
}

.basket-row {
	display: flex;
	justify-content: space-between;
	gap: var(--sp-2);
	font-size: var(--fs-sm);
}

.basket-row.total-line {
	margin-top: var(--sp-2);
	font-size: var(--fs-md);
	color: var(--darkgold);
}

.total-old {
	text-decoration: line-through;
	color: var(--muted);
}

.basket-discount {
	color: #3b6e4f;
}

.btn-link,
.basket-clear {
	align-self: flex-start;
	min-height: 0;
	padding: 0;
	font-size: var(--fs-xs);
	color: var(--muted);
	background: transparent;
	border: none;
	text-decoration: underline;
}

.btn-link:hover,
.basket-clear:hover {
	background: transparent;
	color: var(--darkgold);
}

#book-selection-button {
	width: 100%;
	font-size: var(--fs-md);
}

/* Mobile: slim "continue" bar while the basket is scrolled away. */
#basket-bar {
	position: fixed;
	left: 50%;
	bottom: 12px;
	z-index: 50;
	display: flex;
	gap: var(--sp-3);
	align-items: center;
	width: min(520px, calc(100% - 24px));
	padding: 0.7rem 1.1rem;
	font-family: var(--font-ui);
	border-radius: 999px;
	box-shadow: var(--shadow);
	transform: translate(-50%, 150%);
	transition: transform 0.25s ease;
}

#basket-bar.show {
	transform: translate(-50%, 0);
}

#basket-bar .basket-bar-go {
	margin-left: auto;
}

/* --------------------------------------------------- toasts and sheets -- */

#toast-host {
	position: fixed;
	top: 16px;
	left: 50%;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: min(440px, calc(100% - 32px));
	transform: translateX(-50%);
	pointer-events: none;
}

.toast {
	padding: 0.6rem 1rem;
	font-family: var(--font-ui);
	font-size: var(--fs-sm);
	color: var(--white);
	background: #3d3527;
	border-radius: 999px;
	box-shadow: var(--shadow);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
	opacity: 1;
	transform: none;
}

.toast-ok {
	background: #3b6e4f;
}

.toast-warn {
	background: #8a5a00;
}

body.sheet-open {
	overflow: hidden;
}

.sheet-overlay {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: grid;
	place-items: center;
	padding: var(--sp-4);
	background: rgba(40, 32, 18, 0.45);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.sheet-overlay.open {
	opacity: 1;
}

.sheet-overlay[hidden] {
	display: none;
}

.sheet {
	position: relative;
	width: min(460px, 100%);
	padding: var(--sp-6) var(--sp-5) var(--sp-5);
	background: var(--surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	text-align: center;
	transform: translateY(12px);
	transition: transform 0.2s ease;
}

.sheet-overlay.open .sheet {
	transform: none;
}

.sheet h3 {
	font-family: var(--font-display);
	font-size: var(--fs-xl);
}

.sheet-icon {
	display: inline-grid;
	place-items: center;
	width: 3.2rem;
	height: 3.2rem;
	margin-bottom: var(--sp-3);
	font-size: 1.4rem;
	color: #31617a;
	background: #e9f3f7;
	border-radius: 50%;
}

.sheet-dates {
	margin: 0 0 var(--sp-2);
	font-weight: 600;
	color: var(--darkgold);
	text-transform: capitalize;
}

.sheet-note {
	margin: 0 0 var(--sp-4);
	font-size: var(--fs-sm);
	color: var(--muted);
}

.sheet-email {
	display: inline-block;
	margin-bottom: var(--sp-4);
	font-size: var(--fs-lg);
	font-weight: 700;
	word-break: break-all;
}

.sheet-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--sp-3);
}

.sheet-actions .btn-link {
	align-self: center;
	flex-basis: 100%;
}

.sheet-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 2.4rem;
	min-height: 2.4rem;
	padding: 0;
	font-size: 1.5rem;
	color: var(--muted);
	background: transparent;
	border: none;
	border-radius: 50%;
}

.sheet-close:hover {
	background: var(--cream);
	color: var(--darkgold);
}

/* --------------------------------------------------------- contact form -- */

#contact-form-container {
	width: 100%;
	max-width: var(--content);
	color: var(--darkgold);
	font-family: var(--font-display);
}

#contact-form .field {
	width: min(520px, 100%);
	text-align: left;
}

#contact-form .field > span {
	display: block;
	margin-bottom: var(--sp-1);
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 700;
}

#contact-submit-btn {
	width: auto;
	padding: 0.5rem 1.25rem;
	border-radius: var(--radius);
}

#contact-submit-btn img {
	width: 44px;
	height: 44px;
}

#contact-status {
	font-family: var(--font-body);
	font-size: var(--fs-sm);
}

/* -------------------------------------------------------- questionnaire -- */

.questionnaire-container {
	background: var(--surface-alt);
	text-align: left;
}

.questionnaire-step {
	display: none;
	flex-direction: column;
	gap: var(--sp-4);
}

.questionnaire-step.active {
	display: flex;
	animation: fadeIn 0.3s ease;
}

.questionnaire-step h2 {
	font-family: var(--font-body);
	font-size: var(--fs-xl);
	font-weight: 700;
	color: var(--darkgold);
}

.questionnaire-container label {
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--darkgold);
	overflow-wrap: break-word;
}

.questionnaire-container input:not([type='checkbox']),
.questionnaire-container select,
.questionnaire-container textarea {
	width: 100%;
}

.input-container {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--sp-3);
}

/* Checkbox rows read as one line: label then box. */
.checkbox-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-3);
	padding: var(--sp-2) 0;
}

.checkbox-row label {
	flex: 1;
	margin: 0;
	cursor: pointer;
}

.field-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--sp-4);
}

.nav-buttons {
	display: flex;
	justify-content: center;
	gap: var(--sp-4);
	margin-top: var(--sp-4);
	flex-wrap: wrap;
}

.nav-buttons button {
	min-width: 8rem;
}

/* Address autocomplete */
.autocomplete-list {
	position: absolute;
	z-index: 999;
	top: 100%;
	left: 0;
	right: 0;
	margin: 0;
	padding: var(--sp-1);
	list-style: none;
	background: var(--white);
	border: 2px solid var(--gold);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	max-height: 16rem;
	overflow-y: auto;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	text-align: left;
}

.autocomplete-list li {
	padding: var(--sp-2);
	border-radius: 4px;
	cursor: pointer;
}

.autocomplete-list li:hover {
	background: var(--cream);
}

.autocomplete-list li.is-empty {
	color: var(--muted);
	cursor: default;
}

#pickup-map,
#dropoff-map {
	width: 100%;
	height: clamp(14rem, 45vw, 22rem);
	border: 2px solid var(--gold);
	border-radius: var(--radius-sm);
}

.leaflet-popup {
	display: none;
}

#outside-lg,
#pay-outside-lg {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-1);
	width: fit-content;
	max-width: 100%;
	margin: var(--sp-4) auto 0;
	padding: var(--sp-2) var(--sp-5);
	font-family: var(--font-display);
	font-size: var(--fs-md);
	color: var(--white);
	background: var(--darkgold);
	border-radius: var(--radius);
}

#outside-lg:not(.active),
#pay-outside-lg:not(.active) {
	display: none;
}

/* -------------------------------------------------------------- summary -- */

.summary-container {
	gap: var(--sp-4);
	display: flex;
	flex-direction: column;
	align-items: center;
	font-family: var(--font-body);
}

#summary-content {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-4);
}

.summary-division {
	width: 100%;
	max-width: 720px;
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
	padding: var(--sp-4);
	background: var(--cream);
	border: 2px solid var(--gold);
	border-radius: var(--radius-sm);
}

.summary-division-title {
	font-size: var(--fs-lg);
	font-weight: 700;
	color: var(--gold);
	text-align: left;
}

.summary-line {
	display: flex;
	gap: var(--sp-3);
	padding: var(--sp-2) var(--sp-3);
	background: var(--white);
	border: 2px solid var(--line);
	border-radius: var(--radius-sm);
	text-align: left;
}

.summary-field {
	flex: 0 0 40%;
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--darkgold);
}

.summary-field-value {
	flex: 1;
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	color: var(--darkgold);
	overflow-wrap: anywhere;
}

.summary-buttons {
	display: flex;
	gap: var(--sp-4);
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
}

.summary-buttons button {
	min-width: 10rem;
}

/* -------------------------------------------------------------- payment -- */

#payment-section {
	width: 100%;
	max-width: var(--content);
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: opacity 0.4s ease;
}

#payment-section.active {
	opacity: 1;
	max-height: none;
	overflow: visible;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-4);
	font-family: var(--font-display);
	animation: fadeIn 0.3s ease;
}

#total-and-discounts {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-2);
}

#total-price {
	font-family: var(--font-body);
	font-size: var(--fs-xl);
	font-weight: 700;
	color: var(--darkgold);
}

#card-element {
	width: min(520px, 100%);
	padding: var(--sp-4);
	background: var(--white);
	border: 2px solid var(--line);
	border-radius: var(--radius-sm);
}

#card-errors {
	min-height: 1.25rem;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	color: #c0392b;
}

#terms-agreement {
	display: flex;
	align-items: flex-start;
	gap: var(--sp-3);
	width: min(520px, 100%);
	text-align: left;
}

#terms-label {
	display: inline;
	font-family: var(--font-body);
	font-size: var(--fs-sm);
	color: var(--darkgold);
	cursor: pointer;
}

#terms-label .policy-link {
	display: inline;
}

#confirm-payment-btn {
	width: min(340px, 100%);
	font-size: var(--fs-md);
}

#payment-loading {
	position: absolute;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.85);
}

.loading-overlay {
	position: relative;
	display: grid;
	place-items: center;
}

/* --------------------------------------------------------- confirmation -- */

.confirmation {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gutter);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
}

.confirmation-box {
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	padding: var(--sp-6);
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	text-align: center;
}

.confirmation-box hr,
.dividing-rule {
	width: 60%;
	margin: var(--sp-4) auto;
	border: none;
	border-top: 2px solid var(--gold);
}

#booking-confirmed-title {
	margin-bottom: var(--sp-4);
	font-family: var(--font-body);
	font-size: var(--fs-xl);
	color: var(--darkgold);
}

#confirmation-summary {
	font-family: var(--font-display);
	font-size: var(--fs-md);
	color: var(--gold);
}

.confirmation-summary-entry {
	display: flex;
	justify-content: center;
	gap: var(--sp-2);
	margin-bottom: var(--sp-3);
	color: var(--gold);
}

#confirm-paid {
	margin: var(--sp-5) 0;
	font-family: var(--font-body);
	font-size: var(--fs-lg);
	font-weight: 700;
	color: var(--white);
	background: var(--gold);
	padding: var(--sp-3) var(--sp-5);
	border-radius: var(--radius-sm);
}

#confirmation-ok-btn {
	width: min(280px, 100%);
	margin-top: var(--sp-5);
}

/* ------------------------------------------------------------- about us -- */

#about-us {
	width: 100%;
	max-width: var(--content);
	margin-top: var(--sp-8);
}

.about-header {
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	color: var(--darkgold);
}

.about-body {
	font-family: var(--font-body);
	font-size: var(--fs-lg);
	color: var(--gold);
}


/* Enquiry form inside the book-by-email pop-up. */
.sheet {
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
}

.sheet-enquiry {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--sp-3);
	margin: 0;
	padding: 0;
	text-align: left;
	background: none;
	border: none;
	box-shadow: none;
	max-width: none;
}

.sheet-enquiry label {
	font-size: var(--fs-sm);
}

.sheet-captcha:empty {
	display: none;
}

.sheet-captcha {
	display: flex;
	justify-content: center;
	min-height: 78px;
}

.sheet-error {
	margin: 0;
	font-size: var(--fs-sm);
	color: #b3261e;
}

.sheet-error:empty {
	display: none;
}

.sheet-send {
	width: 100%;
}

.sheet-direct {
	margin: var(--sp-4) 0 0;
	font-size: var(--fs-sm);
	color: var(--muted);
}

.sheet-direct .sheet-email {
	display: inline;
	margin: 0;
	font-size: inherit;
}

.sheet-sent-icon {
	display: inline-grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin: var(--sp-2) 0;
	font-size: 1.3rem;
	color: #fff;
	background: #3b6e4f;
	border-radius: 50%;
}

.sheet-sent[hidden],
.sheet-enquiry[hidden] {
	display: none;
}

/* -------------------------------------------------------------- gallery -- */

/* Photos scattered on a wooden table — see PRINT_SIZES / PRINT_LOOKS in
   gallery.js for how each print gets its size, style and tilt. */
.gallery {
	margin: var(--sp-6) auto var(--sp-4);
	padding: clamp(18px, 3.5vw, 44px);
	background:
		radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
		repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.035) 0 2px, transparent 2px 9px),
		repeating-linear-gradient(88deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 23px),
		linear-gradient(180deg, #c49a6c, #b0835a 55%, #a57650);
	border-radius: var(--radius-lg);
	box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.25), var(--shadow);
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: clamp(60px, 8.5vw, 105px);
	grid-auto-flow: dense;
	gap: clamp(10px, 1.6vw, 22px);
}

.gallery-item,
.gallery-item:hover {
	position: relative;
	display: block;
	min-height: 0;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	cursor: zoom-in;
}

.size-s {
	grid-column: span 2;
	grid-row: span 2;
}
.size-m {
	grid-column: span 2;
	grid-row: span 3;
}
.size-t {
	grid-column: span 2;
	grid-row: span 3;
}
.size-w {
	grid-column: span 3;
	grid-row: span 2;
}
.size-l {
	grid-column: span 3;
	grid-row: span 3;
}

/* The print itself: tilted, nudged off the grid, lifted on hover. */
.print {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: #fdfbf6;
	box-shadow: 0 3px 6px rgba(40, 25, 10, 0.25), 0 10px 22px rgba(40, 25, 10, 0.18);
	transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0deg));
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2), box-shadow 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
	z-index: 5;
}

.gallery-item:hover .print,
.gallery-item:focus-visible .print {
	transform: translate(0, -6px) rotate(0deg) scale(1.06);
	box-shadow: 0 8px 14px rgba(40, 25, 10, 0.28), 0 24px 40px rgba(40, 25, 10, 0.25);
}

.print img {
	flex: 1;
	width: 100%;
	min-height: 0;
	object-fit: cover;
	background: #e9e1d2;
}

/* Plain print: a thin white border. */
.look-plain .print,
.look-tape .print,
.look-pin .print {
	padding: clamp(5px, 0.7vw, 9px);
}

/* Polaroid: thick white bottom with a handwritten caption. */
.look-polaroid .print {
	padding: clamp(6px, 0.8vw, 10px) clamp(6px, 0.8vw, 10px) 0;
}

.print-caption {
	display: block;
	min-height: clamp(26px, 3.4vw, 42px);
	padding: 4px 2px;
	overflow: hidden;
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	line-height: 1.2;
	color: #5a4a2a;
	text-align: center;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Tape: a strip of masking tape across the top. */
.look-tape .print::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 50%;
	z-index: 2;
	width: 38%;
	max-width: 90px;
	height: 22px;
	background: rgba(246, 236, 200, 0.82);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	transform: translateX(-50%) rotate(-4deg);
}

/* Pin: a round drawing pin. */
.look-pin .print::before {
	content: "";
	position: absolute;
	top: -7px;
	left: 50%;
	z-index: 2;
	width: 16px;
	height: 16px;
	background: radial-gradient(circle at 35% 35%, #f2c76b, var(--gold) 55%, #6e5420);
	border-radius: 50%;
	box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.35);
	transform: translateX(-50%);
}

/* Frame: dark wood with a cream mount. */
.look-frame .print {
	padding: clamp(8px, 1.1vw, 14px);
	background: linear-gradient(135deg, #5b3e22, #3e2914 45%, #6a4828 70%, #3a2612);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 4px 8px rgba(40, 25, 10, 0.35), 0 14px 28px rgba(40, 25, 10, 0.25);
}

.look-frame .print img {
	border: clamp(4px, 0.6vw, 8px) solid #f4ecd9;
	box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

/* ---- captions ---- */

/* Scribbled across the photo in white marker. */
.print-marker {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 10%;
	z-index: 2;
	font-family: var(--font-display);
	font-size: clamp(0.95rem, 0.7rem + 0.9vw, 1.45rem);
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 10px rgba(0, 0, 0, 0.45);
	transform: rotate(var(--note-rot, -4deg));
	pointer-events: none;
}

/* A sticky note stuck to a corner, hanging off the edge. */
.print-sticky {
	position: absolute;
	bottom: -14px;
	z-index: 3;
	display: -webkit-box;
	width: clamp(84px, 9vw, 120px);
	min-height: clamp(64px, 7vw, 92px);
	padding: 10px 9px 8px;
	overflow: hidden;
	font-family: var(--font-display);
	font-size: clamp(0.85rem, 0.7rem + 0.4vw, 1.05rem);
	font-weight: 700;
	line-height: 1.15;
	color: #4a3c1c;
	text-align: left;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	box-shadow: 0 4px 8px rgba(40, 25, 10, 0.25);
	transform: rotate(var(--note-rot, 5deg));
	pointer-events: none;
}

.print-sticky::after {
	/* the curled-up bottom corner */
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 16px;
	height: 16px;
	background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.12) 50%);
}

.sticky-right {
	right: -16px;
}

.sticky-left {
	left: -16px;
}

.sticky-yellow {
	background: #fff3a3;
}
.sticky-pink {
	background: #ffd1dc;
}
.sticky-mint {
	background: #c9f0d6;
}
.sticky-blue {
	background: #cde6fb;
}

/* Prints wearing a sticky note sit above their neighbours so it isn't hidden. */
.gallery-item.has-sticky {
	z-index: 2;
}

.gallery-item.has-sticky:hover {
	z-index: 6;
}

/* A small brass plaque on the frame. */
.print-plaque {
	position: absolute;
	left: 50%;
	bottom: clamp(-2px, 0.2vw, 2px);
	z-index: 2;
	max-width: 80%;
	padding: 2px 10px;
	overflow: hidden;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(0.6rem, 0.5rem + 0.3vw, 0.75rem);
	font-variant: small-caps;
	letter-spacing: 0.04em;
	color: #3a2a10;
	white-space: nowrap;
	text-overflow: ellipsis;
	background: linear-gradient(180deg, #f3dc9a, #c9a24c 55%, #a8832f);
	border-radius: 2px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
	transform: translateX(-50%);
	pointer-events: none;
}

.look-frame .print {
	padding-bottom: clamp(16px, 1.8vw, 22px);
}

/* First nine only until "Show all" — by position, so a tile dropped for a
   missing file is replaced by the next one. */
.gallery-grid:not(.expanded) .gallery-item:nth-child(n + 10) {
	display: none;
}

.gallery-more {
	margin-top: var(--sp-5);
}

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

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	padding: var(--sp-4);
	background: rgba(20, 16, 10, 0.92);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.lightbox.open {
	opacity: 1;
}

.lightbox[hidden] {
	display: none;
}

.lb-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--sp-3);
	height: 100%;
	margin: 0;
	min-width: 0;
}

.lb-img {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	object-fit: contain;
	border-radius: var(--radius-sm);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.lb-img.ready {
	opacity: 1;
}

.lb-caption {
	font-family: var(--font-body);
	font-size: var(--fs-md);
	color: #f2ead8;
}

.lb-caption:empty {
	display: none;
}

.lb-nav,
.lb-close {
	width: 3rem;
	min-height: 3rem;
	padding: 0;
	font-size: 1.2rem;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	border-radius: 50%;
}

.lb-nav:hover,
.lb-close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.25);
}

.lb-close {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 1.8rem;
}

.lb-count {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	font-size: var(--fs-xs);
	color: #d8cfbd;
}

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 900px) {
	.sap {
		flex-direction: column;
		text-align: center;
	}

	.service-image {
		flex: none;
		width: 60%;
	}

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

	.basket {
		position: static;
	}

	.gallery-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows: clamp(60px, 13vw, 105px);
	}

	.size-w,
	.size-l {
		grid-column: span 2;
	}
}

@media (max-width: 700px) {
	#services-and-prices {
		grid-template-columns: repeat(auto-fit, minmax(min(120px, 45%), 1fr));
	}

	.services-and-prices-entry {
		min-height: 165px;
		background-size: 48%;
	}

	.summary-line {
		flex-direction: column;
		gap: var(--sp-1);
	}

	.summary-field {
		flex: none;
	}

	.cal-sub {
		font-size: 0.62rem;
	}

	.cal-peak,
	.cal-picked {
		font-size: 0.52rem;
	}

	.gallery-grid {
		grid-auto-rows: 64px;
		gap: 12px;
	}

	.print-caption {
		font-size: 0.8rem;
	}

	.lightbox {
		grid-template-columns: 1fr;
		padding: var(--sp-2);
	}

	.lb-nav {
		position: absolute;
		bottom: 10px;
	}

	.lb-prev {
		left: 16px;
	}

	.lb-next {
		right: 16px;
	}

	.nav-buttons button {
		flex: 1;
	}
}
