/**
 * AGS Appointments — canonical public booking form presentation.
 *
 * Every selector is scoped to the plugin shell.  The layout intentionally
 * inherits the host theme's typography while keeping the prototype's three
 * rail structure, native controls, and responsive accordion deterministic.
 *
 * @package AGS_Appointments
 */

.ags-appointment-form {
	--ags-form-line: #e6e6e8;
	--ags-form-muted: #6d6d70;
	--ags-form-soft: #f3f3f4;
	box-sizing: border-box;
	max-width: 1300px;
	margin: clamp(1rem, 4vw, 3.5rem) auto;
	border: 1px solid #e3e3e6;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 60px -40px rgba(20, 20, 24, .35);
	color: #1a1a1a;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.5;
	overflow: hidden;
}

.ags-appointment-form *,
.ags-appointment-form *::before,
.ags-appointment-form *::after { box-sizing: border-box; }
.ags-appointment-form [hidden] { display: none; }
.ags-appointment-form__content { padding: 0; }
.ags-appointment-form__layout {
	display: grid;
	grid-template-columns: minmax(210px, 280px) minmax(0, 1fr) minmax(210px, 280px);
	align-items: stretch;
}
.ags-appointment-form[data-show-left-panel="0"] .ags-appointment-form__layout { grid-template-columns: minmax(0, 1fr) minmax(210px, 280px); }
.ags-appointment-form[data-show-wishlist-panel="0"] .ags-appointment-form__layout { grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); }
.ags-appointment-form[data-show-left-panel="0"][data-show-wishlist-panel="0"] .ags-appointment-form__layout { grid-template-columns: minmax(0, 1fr); }

.ags-appointment-form__guidance,
.ags-appointment-form__wishlist-rail {
	min-width: 0;
	padding: 2.2rem 1.6rem;
	background: #fff;
}
.ags-appointment-form__guidance { border-right: 1px solid var(--ags-form-line); }
.ags-appointment-form__wishlist-rail { border-left: 1px solid var(--ags-form-line); }
.ags-appointment-form__guidance-title { margin: 0; font-size: 1.55rem; font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
.ags-appointment-form__guidance-intro { margin: 1rem 0 0; color: #55555b; font-size: .9rem; line-height: 1.65; }
.ags-appointment-form__rule { height: 1px; margin: 1.45rem 0; border: 0; background: #e2e2e5; }
.ags-appointment-form__guidance-highlights { display: flex; flex-direction: column; gap: .72rem; margin: 0; padding: 0; list-style: none; color: #36363a; font-size: .86rem; }
.ags-appointment-form__guidance-highlights li { display: flex; gap: .55rem; align-items: baseline; }
.ags-appointment-form__guidance-highlights li::before { content: "✓"; color: var(--ags-form-muted); font-size: .72rem; }
.ags-appointment-form__questions-label { display: block; margin-bottom: .45rem; color: #94949a; font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.ags-appointment-form__questions { color: #55555b; font-size: .84rem; line-height: 1.55; }
.ags-appointment-form__questions-rows { display: grid; gap: .4rem; }
.ags-appointment-form__questions-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .55rem; }
.ags-appointment-form__questions-row > span:first-child { color: var(--ags-form-muted); font-size: .72rem; }
.ags-appointment-form__questions-row a { color: inherit; overflow-wrap: anywhere; }

.ags-appointment-form__main { min-width: 0; padding: 1.1rem 2.2rem 2.5rem; }
.ags-appointment-form__step { min-width: 0; border-bottom: 1px solid var(--ags-form-line); }
.ags-appointment-form__step-header {
	display: flex;
	width: 100%;
	min-height: 4.2rem;
	align-items: center;
	gap: .8rem;
	margin: 0;
	padding: 1.1rem .1rem;
	border: 0;
	background: transparent;
	color: #1a1a1a;
	cursor: pointer;
	text-align: left;
}
.ags-appointment-form__step-header:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.ags-appointment-form__step-header[disabled] { color: #9a9a9e; cursor: not-allowed; }
.ags-appointment-form__step-num { width: auto; height: auto; color: var(--ags-form-muted); font-size: .7rem; font-weight: 600; letter-spacing: .18em; }
.ags-appointment-form__step-title { margin: 0; font-size: 1.15rem; font-weight: 400; }
.ags-appointment-form__step-summary { max-width: 48%; margin-left: auto; overflow: hidden; color: var(--ags-form-muted); font-size: .8rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.ags-appointment-form__step-body { padding: .2rem .1rem 1.7rem; }
.ags-appointment-form__step:not(.ags-appointment-form__step--open) .ags-appointment-form__step-body { display: none; }
.ags-appointment-form__step--done .ags-appointment-form__step-num { font-size: 0; }
.ags-appointment-form__step--done .ags-appointment-form__step-num::before { content: "✓"; font-size: .8rem; letter-spacing: 0; }
.ags-appointment-form__step--locked .ags-appointment-form__step-summary { color: #a6a6aa; }

.ags-appointment-form__types { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.ags-appointment-form__type-card { position: relative; display: flex; min-height: 7rem; flex-direction: column; justify-content: center; gap: .35rem; padding: 1rem; border: 1px solid var(--ags-form-line); border-radius: 4px; background: #fff; cursor: pointer; }
.ags-appointment-form__type-card:hover,
.ags-appointment-form__type-card--focused { border-color: #77777c; }
.ags-appointment-form__type-card--selected { border-color: #1a1a1a; box-shadow: 0 0 0 1px #1a1a1a; }
.ags-appointment-form__type-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.ags-appointment-form__type-name { font-size: .94rem; font-weight: 600; }
.ags-appointment-form__type-dur { color: var(--ags-form-muted); font-size: .78rem; }
.ags-appointment-form__type-duration { color: var(--ags-form-muted); font-size: .78rem; }
.ags-appointment-form__type-desc { margin-top: 1rem; color: #55555b; font-size: .88rem; }

.ags-appointment-form__datetime { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(190px, .9fr); gap: 1.5rem; }
.ags-appointment-form__cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.ags-appointment-form__cal-month { font-size: .95rem; font-weight: 600; }
.ags-appointment-form__cal-nav { min-width: 2.1rem; min-height: 2.1rem; border: 1px solid var(--ags-form-line); border-radius: 3px; background: #fff; cursor: pointer; }
.ags-appointment-form__cal-dow,
.ags-appointment-form__cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; }
.ags-appointment-form__cal-dow { margin-bottom: .25rem; color: var(--ags-form-muted); font-size: .68rem; text-align: center; }
.ags-appointment-form__day { min-width: 0; min-height: 2.25rem; border: 1px solid transparent; border-radius: 3px; background: #fff; color: inherit; cursor: pointer; }
.ags-appointment-form__day-blank { min-height: 2.25rem; }
.ags-appointment-form__day:hover,
.ags-appointment-form__day:focus-visible { border-color: #77777c; outline: none; }
.ags-appointment-form__day--selected { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.ags-appointment-form__day:disabled { color: #bbbcc0; cursor: not-allowed; }
.ags-appointment-form__cal-loading,
.ags-appointment-form__cal-empty,
.ags-appointment-form__slots-empty { color: var(--ags-form-muted); font-size: .84rem; }
.ags-appointment-form__cal-error,
.ags-appointment-form__error,
.ags-appointment-form__identity-error,
.ags-appointment-form__policy-error { padding: .85rem 1rem; border: 1px solid #d9bebe; border-radius: 4px; background: #fff8f8; color: #7c2f2f; }
.ags-appointment-form__slots-title { margin: 0 0 .7rem; font-size: .92rem; font-weight: 600; }
.ags-appointment-form__slots-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.ags-appointment-form__slot-card { display: flex; align-items: center; gap: .45rem; padding: .65rem .7rem; border: 1px solid var(--ags-form-line); border-radius: 3px; cursor: pointer; font-size: .82rem; }
.ags-appointment-form__slot-card--selected { border-color: #1a1a1a; box-shadow: 0 0 0 1px #1a1a1a; }
.ags-appointment-form__slot-input { margin: 0; }

.ags-appointment-form__fields { display: grid; gap: .9rem; }
.ags-appointment-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.ags-appointment-form__field { display: grid; gap: .35rem; color: #46464b; font-size: .78rem; }
.ags-appointment-form__field input,
.ags-appointment-form__field select { width: 100%; min-height: 2.5rem; padding: .55rem .65rem; border: 1px solid #cfcfd3; border-radius: 3px; background: #fff; color: #1a1a1a; font: inherit; }
.ags-appointment-form__field input:focus,
.ags-appointment-form__field select:focus { border-color: #55555b; outline: 2px solid rgba(40, 40, 45, .25); outline-offset: 1px; }
.ags-appointment-form__phone-help { display: block; color: var(--ags-form-muted); font-size: .72rem; }
.ags-appointment-form__phone-field .iti {
	width: 100%;
	--iti-path-flags-1x: url('../../vendor/intl-tel-input/img/flags.webp');
	--iti-path-flags-2x: url('../../vendor/intl-tel-input/img/flags@2x.webp');
}
.ags-appointment-form__phone-field .iti .iti__search-input {
	box-sizing: border-box;
	padding-left: calc(var(--iti-spacer-horizontal, 10px) + var(--iti-globe-icon-size, 17px) + var(--iti-spacer-horizontal, 10px));
	padding-right: calc(var(--iti-spacer-horizontal, 10px) + var(--iti-clear-icon-size, 15px) + var(--iti-spacer-horizontal, 10px));
}
.iti--detached-country-selector {
	--iti-path-flags-1x: url('../../vendor/intl-tel-input/img/flags.webp');
	--iti-path-flags-2x: url('../../vendor/intl-tel-input/img/flags@2x.webp');
}
.iti--detached-country-selector .iti__search-input {
	box-sizing: border-box;
	padding-left: calc(var(--iti-spacer-horizontal, 10px) + var(--iti-globe-icon-size, 17px) + var(--iti-spacer-horizontal, 10px));
	padding-right: calc(var(--iti-spacer-horizontal, 10px) + var(--iti-clear-icon-size, 15px) + var(--iti-spacer-horizontal, 10px));
}
.iti--detached-country-selector .iti__flag {
	background-image: url('../../vendor/intl-tel-input/img/flags.webp');
	background-image: image-set(url('../../vendor/intl-tel-input/img/flags.webp') 1x, url('../../vendor/intl-tel-input/img/flags@2x.webp') 2x);
}
.ags-appointment-form__consent-fields { display: grid; gap: .85rem; }
.ags-appointment-form__cancellation-notice { margin: 0 0 .9rem; padding: .75rem .85rem; border-left: 3px solid var(--ags-form-muted); background: var(--ags-form-soft); color: #46464b; font-size: .8rem; line-height: 1.5; }
.ags-appointment-form__consent-row { color: #46464b; font-size: .83rem; }
.ags-appointment-form__checkbox-label { display: flex; gap: .55rem; align-items: flex-start; }
.ags-appointment-form__consent-hint { margin: .4rem 0 0 1.4rem; color: var(--ags-form-muted); font-size: .75rem; }
.ags-appointment-form__hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }

.ags-appointment-form__submit-section { display: grid; gap: .65rem; margin-top: 1.5rem; }
.ags-appointment-form__btn-submit,
.ags-appointment-form__btn-retry { min-height: 2.7rem; padding: .65rem 1rem; border: 1px solid #1a1a1a; border-radius: 3px; background: #1a1a1a; color: #fff; cursor: pointer; font: inherit; }
.ags-appointment-form__btn-submit:disabled,
.ags-appointment-form__btn-retry:disabled { opacity: .55; cursor: not-allowed; }
.ags-appointment-form__submit-status { min-height: 1.3rem; color: var(--ags-form-muted); font-size: .82rem; }
.ags-appointment-form__submit-countdown { color: var(--ags-form-muted); font-size: .8rem; }
.ags-appointment-form__submit-error { padding: .7rem .8rem; border: 1px solid #d9bebe; border-radius: 3px; background: #fff8f8; color: #7c2f2f; font-size: .82rem; }
.ags-appointment-form__completion-panel { padding: 3rem 2rem; text-align: center; }
.ags-appointment-form__completion-panel h3 { margin: 0 0 .8rem; font-size: 1.5rem; font-weight: 500; }
.ags-appointment-form__completion-panel p { margin: .35rem 0; }
.ags-appointment-form__wishlist-title { margin: 0; font-size: 1.35rem; font-weight: 400; }
.ags-appointment-form__wishlist-intro { margin: .55rem 0 0; color: var(--ags-form-muted); font-size: .8rem; }
.ags-appointment-form__wishlist-section { margin-top: 1.1rem; }
.ags-appointment-form__wishlist-section h4 { margin: 0; font-size: .86rem; font-weight: 600; }
.ags-appointment-form__wishlist-section p { margin: .3rem 0 0; color: var(--ags-form-muted); font-size: .75rem; }
.ags-appointment-form__wishlist-list { display: flex; flex-direction: column; gap: .7rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.ags-appointment-form__wishlist-link { display: flex; gap: .65rem; align-items: center; color: inherit; text-decoration: none; }
.ags-appointment-form__wishlist-img { width: 3.1rem; height: 3.8rem; flex: none; object-fit: cover; background: var(--ags-form-soft); }
.ags-appointment-form__wishlist-name { font-size: .8rem; line-height: 1.3; }
.ags-appointment-form__wishlist-empty,
.ags-appointment-form__wishlist-more { margin-top: 1rem; color: var(--ags-form-muted); font-size: .82rem; }
.ags-appointment-form__status { min-height: 1px; }
.ags-appointment-form__noscript { margin: 1rem; padding: 1rem; border: 1px solid #d9bebe; background: #fff8f8; }
.ags-appointment-form__visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

@media (max-width: 900px) {
	.ags-appointment-form__layout,
	.ags-appointment-form[data-show-left-panel="0"] .ags-appointment-form__layout,
	.ags-appointment-form[data-show-wishlist-panel="0"] .ags-appointment-form__layout { grid-template-columns: minmax(0, 1fr); }
	.ags-appointment-form__guidance,
	.ags-appointment-form__wishlist-rail { border: 0; border-bottom: 1px solid var(--ags-form-line); }
	.ags-appointment-form__main { padding-right: 1.25rem; padding-left: 1.25rem; }
}

@media (max-width: 600px) {
	.ags-appointment-form { margin: 0; border-right: 0; border-left: 0; border-radius: 0; }
	.ags-appointment-form__guidance,
	.ags-appointment-form__wishlist-rail { padding: 1.5rem 1.1rem; }
	.ags-appointment-form__main { padding: .65rem .9rem 1.5rem; }
	.ags-appointment-form__datetime,
	.ags-appointment-form__row { grid-template-columns: minmax(0, 1fr); }
	.ags-appointment-form__cal-grid { max-width: 100%; overflow: hidden; }
	.ags-appointment-form__step-summary { max-width: 45%; }
}

@media (max-width: 380px) {
	.ags-appointment-form__main { padding-right: .65rem; padding-left: .65rem; }
	.ags-appointment-form__step-title { font-size: 1rem; }
	.ags-appointment-form__step-summary { max-width: 38%; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ags-appointment-form *,
	.ags-appointment-form *::before,
	.ags-appointment-form *::after { scroll-behavior: auto; transition-duration: .01ms; }
}
