/* FDTC Forms: the wait-list form and the "Email the office" pop-up. Colours follow the fdtc theme. */
.fdtc-forms,
.fdtc-forms-dialog {
	--fm-blue: var(--wp--preset--color--brand-blue, #283090);
	--fm-blue-dark: var(--wp--preset--color--brand-blue-dark, #1c2268);
	--fm-red: var(--wp--preset--color--brand-red-dark, #b8121a);
	--fm-ink: var(--wp--preset--color--contrast, #1b1d3a);
	--fm-muted: var(--wp--preset--color--muted, #4a4e6b);
	--fm-line: var(--wp--preset--color--line, #d9dcea);
	--fm-panel: var(--wp--preset--color--panel, #eef0f8);
	color: var(--fm-ink);
	font-size: .95rem;
}

.fdtc-forms p { margin: 0 0 .8rem; }
.fdtc-forms-intro { color: var(--fm-muted); }
.fdtc-forms-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0 1rem;
}
.fdtc-forms-field { display: flex; flex-direction: column; gap: .25rem; }
.fdtc-forms-field label,
.fdtc-forms-checks legend { font-weight: 600; font-size: .9rem; }
.fdtc-forms-req { color: var(--fm-red); }
.fdtc-forms-help { color: var(--fm-muted); font-size: .8rem; }
.fdtc-forms input[type="text"],
.fdtc-forms input[type="email"],
.fdtc-forms input[type="tel"],
.fdtc-forms textarea {
	width: 100%;
	box-sizing: border-box;
	padding: .45rem .6rem;
	border: 1px solid #8a8fb0;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
}
.fdtc-forms :is(input, textarea, button):focus-visible {
	outline: 3px solid var(--fm-blue);
	outline-offset: 1px;
}
.fdtc-forms-checks {
	margin: 0 0 .9rem;
	padding: .5rem 1rem .8rem;
	border: 1px solid var(--fm-line);
	border-radius: 8px;
}
.fdtc-forms-checks legend { padding: 0 .35rem; }
.fdtc-forms-checks-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: .35rem 1rem;
	margin-bottom: .3rem;
}
.fdtc-forms-checks label { display: flex; gap: .5rem; align-items: flex-start; }
.fdtc-forms-checks input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--fm-blue); flex: none; }
.fdtc-forms-hp { position: absolute !important; left: -9999px; }

.fdtc-forms-btn {
	display: inline-block;
	padding: .55rem 1.2rem;
	border: 2px solid var(--fm-blue);
	border-radius: 999px;
	background: var(--fm-blue);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}
.fdtc-forms-btn:hover { background: var(--fm-blue-dark); border-color: var(--fm-blue-dark); }
.fdtc-forms-btn:disabled { opacity: .6; cursor: default; }
.fdtc-forms-btn--quiet { background: transparent; color: var(--fm-blue); }
.fdtc-forms-btn--quiet:hover { color: #fff; }
.fdtc-forms-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.fdtc-forms-notice {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border-left: 4px solid var(--fm-blue, #283090);
	border-radius: 4px;
	background: #eef0f8;
}
.fdtc-forms-notice p { margin: 0; }
.fdtc-forms-notice--ok { border-color: #1e7a3c; background: #e8f5ec; }
.fdtc-forms-notice--error { border-color: #b8121a; background: #fdecec; }
.fdtc-forms-status { min-height: 1.2em; color: var(--fm-muted); }
.fdtc-forms-status.is-error { color: var(--fm-red); }

/* Pop-up */
.fdtc-forms-dialog {
	width: min(36rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	padding: 1.25rem 1.5rem 1rem;
	border: 0;
	border-top: 5px solid var(--wp--preset--color--brand-red, #e81820);
	border-radius: 10px;
	box-shadow: 0 16px 48px rgba(27, 29, 58, .35);
	font-family: inherit;
}
.fdtc-forms-dialog::backdrop { background: rgba(27, 29, 58, .55); }
.fdtc-forms-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fdtc-forms-dialog h2 { margin: 0; color: var(--fm-blue); font-size: 1.35rem; }
.fdtc-forms-x {
	width: 2.2rem;
	height: 2.2rem;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--fm-muted);
	font-size: 1.1rem;
	cursor: pointer;
}
.fdtc-forms-x:hover { background: var(--fm-panel); }
.fdtc-forms-sub { margin: .25rem 0 1rem; color: var(--fm-muted); font-size: .9rem; }
.fdtc-forms-done p { margin: 0 0 1rem; }

@media (max-width: 600px) {
	.fdtc-forms-dialog { padding: 1rem; }
	.fdtc-forms input,
	.fdtc-forms textarea { font-size: 16px; } /* Stops iOS zooming in. */
}

.fdtc-forms-status:empty { display: none; }
.fdtc-forms .fdtc-forms-hp { margin: 0; }

/* ------------------------------------------------------------------
   Private lesson questionnaire
   ------------------------------------------------------------------ */
.fdtc-pl-step { margin: 0 0 1.5rem; }
.fdtc-pl.is-wizard .fdtc-pl-step { margin: 0; }
.fdtc-pl-title { margin: 0 0 .5rem; color: var(--fm-blue); font-size: 1.35rem; }
.fdtc-pl-title:focus { outline: none; }
.fdtc-pl-group { margin: 1rem 0 .4rem; font-size: 1rem; color: var(--fm-ink); }
.fdtc-pl-grid { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.fdtc-pl-wide { grid-column: 1 / -1; }
.fdtc-pl select {
	width: 100%;
	padding: .4rem .5rem;
	border: 1px solid #8a8fb0;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
}
.fdtc-pl input[type="date"] {
	width: 100%;
	box-sizing: border-box;
	padding: .4rem .5rem;
	border: 1px solid #8a8fb0;
	border-radius: 6px;
	font: inherit;
}
.fdtc-pl-progress { height: 6px; margin: 0 0 .4rem; border-radius: 3px; background: var(--fm-panel); overflow: hidden; }
.fdtc-pl-progress-bar { height: 100%; width: 0; background: var(--wp--preset--color--brand-red, #e81820); transition: width .25s; }
.fdtc-pl-stepcount { margin: 0 0 1rem !important; color: var(--fm-muted); font-size: .85rem; }
.fdtc-pl-nav, .fdtc-pl-submit { display: flex; gap: .6rem; margin-top: 1rem !important; }
.fdtc-pl.is-wizard .fdtc-pl-nav [data-nav="next"] { margin-left: auto; }
.fdtc-pl.is-wizard .fdtc-pl-submit { justify-content: flex-end; }

.fdtc-pl-kinds { margin: 0; padding: 0; border: 0; }
.fdtc-pl-kinds legend { margin-bottom: .5rem; font-weight: 600; }
.fdtc-pl-kind {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	margin: 0 0 .6rem;
	padding: .8rem 1rem;
	border: 1.5px solid var(--fm-line);
	border-radius: 8px;
	cursor: pointer;
}
.fdtc-pl-kind:has(input:checked) { border-color: var(--fm-blue); background: var(--fm-panel); }
.fdtc-pl-kind input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--fm-blue); flex: none; }

.fdtc-pl-dog {
	margin: 0 0 .9rem;
	padding: .5rem 1rem .4rem;
	border: 1px solid var(--fm-line);
	border-radius: 8px;
}
.fdtc-pl-dog legend { padding: 0 .35rem; font-weight: 700; }
.fdtc-pl-pick { display: flex; flex-flow: row wrap; justify-content: flex-start; align-items: center; gap: .5rem; text-align: left; }
.fdtc-pl-pick label { margin: 0; }
.fdtc-pl-pick select { width: auto; max-width: 100%; }
.fdtc-pl-dogadd label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }

.fdtc-pl-reason { margin: 0 0 .45rem; }
.fdtc-pl-reason { padding: .5rem .75rem .35rem; border: 1px solid var(--fm-line); border-radius: 8px; background: #fff; }
.fdtc-pl-reason > label { display: block; font-weight: 400; margin: 0 0 .2rem; }

/* 1–5 ranking slider: grey and "not rated" until it's moved. */
.fdtc-rank { display: block; max-width: 26rem; }
.fdtc-rank-range { display: block; width: 100%; margin: .3rem 0 0; accent-color: var(--fm-blue); cursor: pointer; }
.fdtc-rank-scale { display: flex; justify-content: space-between; font-size: .75rem; line-height: 1.15; color: var(--fm-muted); }
.fdtc-rank-scale button { width: 3.2rem; padding: .15rem 0; border: 0; background: none; font: inherit; color: inherit; text-align: center; cursor: pointer; border-radius: 4px; }
.fdtc-rank-scale button:hover { color: var(--fm-blue); background: rgba(0, 0, 0, .04); }
.fdtc-rank-scale button:first-child { text-align: left; }
.fdtc-rank-scale button:last-child { text-align: right; }
.fdtc-rank-out { display: inline-block; margin-top: .25rem; font-size: .9rem; font-weight: 600; }
.fdtc-rank-clear { margin-left: .5rem; padding: 0; border: 0; background: none; color: var(--fm-blue); font-size: .8rem; text-decoration: underline; cursor: pointer; }
.fdtc-rank.is-unset .fdtc-rank-range { accent-color: #b9bcc8; opacity: .65; }
.fdtc-rank.is-unset .fdtc-rank-out { font-weight: 400; color: var(--fm-muted); font-style: italic; }

.fdtc-pl-reason.is-ranked > label span { font-weight: 600; }

.fdtc-pl-terms {
	max-height: 18rem;
	overflow-y: auto;
	margin: .5rem 0 .9rem;
	padding: .75rem 1rem;
	border: 1px solid var(--fm-line);
	border-radius: 8px;
	background: #fff;
	font-size: .9rem;
}
.fdtc-pl-terms p { margin: 0 0 .6rem; }
.fdtc-pl-agreement { padding-top: .4rem; border-top: 1px solid var(--fm-line); }
.fdtc-pl-agree label { display: flex; gap: .5rem; align-items: flex-start; font-weight: 600; }
.fdtc-pl-agree input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--fm-blue); flex: none; }
.fdtc-pl-thinking { color: var(--fm-muted); font-style: italic; }

@media (max-width: 600px) {
	.fdtc-pl select, .fdtc-pl input[type="date"] { font-size: 16px; }
}

/* Hidden parts stay hidden even where a display rule is set above. */
.fdtc-forms [hidden] { display: none !important; }

.fdtc-pl-rated { font-weight: 400; color: var(--fm-muted); font-size: .85rem; }

/* Forms → Documents: an agreement to read and sign (checkout, questionnaires, the account). */
.fdtc-doc-box { max-height: 16rem; overflow-y: auto; padding: .75rem 1rem; margin: 0 0 1rem; border: 1px solid currentColor; border-radius: 6px; font-size: .95em; }
.fdtc-doc-box p:last-child { margin-bottom: 0; }
.fdtc-doc-box h3 { font-size: 1em; margin: 1em 0 .4em; }
.fdtc-doc-box hr { margin: .75rem 0; }
.fdtc-doc-agree { margin: 0 0 1rem; }
.fdtc-doc-agree input[type="checkbox"] { margin-right: .5rem; vertical-align: -2px; }
.fdtc-doc-name { max-width: 22rem; width: 100%; }
.fdtc-doc-onfile { margin: 0 0 1rem; }
.fdtc-doc-notice form p { margin: 0 0 .75rem; }
.fdtc-doc-table { border-collapse: collapse; margin: 0 0 1rem; }
.fdtc-doc-table th, .fdtc-doc-table td { border: 1px solid var(--wp--preset--color--line, #d9dcea); padding: .35rem .6rem; text-align: left; vertical-align: top; }
.fdtc-doc-table th { background: var(--wp--preset--color--panel, #eef0f8); }
/* Videos, photos and links in class handouts. */
.fdtc-doc-media { margin: 1rem 0 1.25rem; }
.fdtc-doc-media img, .fdtc-doc-media video { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.fdtc-doc-media audio { width: 100%; max-width: 30rem; }
.fdtc-doc-media--embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.fdtc-doc-media figcaption { margin-top: .35rem; font-size: .9em; color: var(--wp--preset--color--muted, #4a4e6b); }
.fdtc-doc-media-link { margin: .5rem 0 1rem; padding: .5rem .75rem; border-left: 3px solid var(--wp--preset--color--brand-blue, #283090); background: var(--wp--preset--color--panel, #eef0f8); }
.fdtc-doc-media-link a { font-weight: 600; }
