/**
 * Flyn Forms - front-end styles.
 *
 * Every visual value is a CSS custom property so the Elementor Style tab can
 * override it per widget without a single !important and without specificity
 * fights against Astra or Elementor. Defaults below match the current
 * flynglobal.com dark form treatment.
 */

.flyn-form-wrap {
	/* ------------------------------------------------------------------
	   Default palette = "Flyn Blue", sampled directly from the live
	   SureForms treatment on flynglobal.com so a migrated form is visually
	   indistinguishable from the one it replaces.
	   ------------------------------------------------------------------ */
	--ff-max-width: 720px;
	--ff-col-gap: 24px;
	--ff-row-gap: 20px;

	--ff-form-bg: #eaf2fa;
	--ff-form-padding-y: 32px;
	--ff-form-padding-x: 32px;
	--ff-form-radius: 8px;

	--ff-title-color: #000000;
	--ff-title-size: 36px;
	--ff-title-weight: 600;
	--ff-title-font: "Adobe Caslon", "Adobe Caslon Pro Regular", Georgia, "Times New Roman", serif;
	--ff-title-align: left;
	--ff-title-margin: 0 0 24px;

	--ff-label-color: #1e1e1e;
	--ff-label-size: 16px;
	--ff-label-weight: 500;
	--ff-req-color: #dc2626;

	--ff-help-color: rgba(30, 30, 30, 0.65);
	--ff-help-size: 14px;

	--ff-input-bg: rgba(30, 30, 30, 0.02);
	--ff-input-color: #1e1e1e;
	--ff-input-placeholder: rgba(30, 30, 30, 0.45);
	--ff-input-border: rgba(30, 30, 30, 0.25);
	--ff-input-border-width: 1px;
	--ff-input-radius: 6px;
	--ff-input-padding-y: 10px;
	--ff-input-padding-x: 14px;
	--ff-input-size: 16px;

	--ff-input-hover-border: rgba(30, 30, 30, 0.45);
	--ff-input-focus-border: #8f0019;
	--ff-input-focus-shadow: 0 0 0 3px rgba(143, 0, 25, 0.14);

	--ff-error-color: #dc2626;
	--ff-error-size: 14px;

	--ff-choice-accent: #8f0019;

	/* Slot picker uses the Flyn navy from the Astra palette, kept separate from
	   the burgundy submit button so the two can be tuned independently. */
	--ff-slot-accent: #001e41;
	--ff-slot-accent-hover: #004e89;
	--ff-slot-on-accent: #ffffff;
	--ff-choice-size: 18px;
	--ff-choice-gap: 9px;
	--ff-choice-cols: 2;
	--ff-choice-bg: rgba(255, 255, 255, 0.6);
	--ff-choice-border: rgba(30, 30, 30, 0.25);

	--ff-btn-bg: #8f0019;
	--ff-btn-color: #ffffff;
	--ff-btn-hover-bg: #6f0014;
	--ff-btn-hover-color: #ffffff;
	--ff-btn-radius: 6px;
	--ff-btn-padding-y: 10px;
	--ff-btn-padding-x: 28px;
	--ff-btn-size: 16px;
	--ff-btn-weight: 500;
	--ff-btn-width: auto;

	--ff-progress-bg: rgba(30, 30, 30, 0.12);
	--ff-progress-fill: #8f0019;

	--ff-success-color: #1e1e1e;

	max-width: var(--ff-max-width);
	width: 100%;
	background: var(--ff-form-bg);
	padding: var(--ff-form-padding-y) var(--ff-form-padding-x);
	border-radius: var(--ff-form-radius);
	box-sizing: border-box;
}

/* Dark preset - for placing a form over a dark section. */
.flyn-form-wrap.is-dark {
	--ff-form-bg: #10151d;
	--ff-title-color: #f5f7fa;
	--ff-label-color: #f5f7fa;
	--ff-req-color: #e0b978;
	--ff-help-color: #9aa4b2;
	--ff-input-bg: rgba(255, 255, 255, 0.04);
	--ff-input-color: #ffffff;
	--ff-input-placeholder: #7b8494;
	--ff-input-border: rgba(255, 255, 255, 0.16);
	--ff-input-hover-border: rgba(255, 255, 255, 0.3);
	--ff-input-focus-border: #e0b978;
	--ff-input-focus-shadow: 0 0 0 3px rgba(224, 185, 120, 0.18);
	--ff-error-color: #ff8a80;
	--ff-choice-accent: #e0b978;
	--ff-slot-accent: #d8e3f2;
	--ff-slot-accent-hover: #eaf2fa;
	--ff-slot-on-accent: #001e41;
	--ff-choice-bg: rgba(255, 255, 255, 0.03);
	--ff-choice-border: rgba(255, 255, 255, 0.14);
	--ff-btn-bg: #e0b978;
	--ff-btn-color: #10151d;
	--ff-btn-hover-bg: #eccf9b;
	--ff-btn-hover-color: #10151d;
	--ff-progress-bg: rgba(255, 255, 255, 0.1);
	--ff-progress-fill: #e0b978;
	--ff-success-color: #f5f7fa;
}

/* Transparent preset - inherit whatever the Elementor section provides. */
.flyn-form-wrap.is-plain {
	--ff-form-bg: transparent;
	--ff-form-padding-y: 0px;
	--ff-form-padding-x: 0px;
}

/* -------------------------------------------------------------------- title */

.flyn-form__title {
	margin: var(--ff-title-margin);
	color: var(--ff-title-color);
	font-family: var(--ff-title-font);
	font-size: var(--ff-title-size);
	font-weight: var(--ff-title-weight);
	text-align: var(--ff-title-align);
	line-height: 1.2;
}

@media (max-width: 767px) {
	.flyn-form-wrap { --ff-title-size: 28px; --ff-form-padding-x: 20px; --ff-form-padding-y: 24px; }
}

/* ------------------------------------------------------------------- layout */

.flyn-form__grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ff-row-gap) var(--ff-col-gap);
}

.flyn-field {
	flex: 1 1 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* flex-grow must be 0 here, otherwise a half-width field sitting alone on a
   row stretches to full width and the layout silently ignores the setting. */
.flyn-field--w50 { flex: 0 1 calc(50% - (var(--ff-col-gap) / 2)); }
.flyn-field--w33 { flex: 0 1 calc(33.333% - (var(--ff-col-gap) * 2 / 3)); }
.flyn-field--w66 { flex: 0 1 calc(66.666% - (var(--ff-col-gap) / 3)); }

@media (max-width: 767px) {
	.flyn-field--w50,
	.flyn-field--w33,
	.flyn-field--w66 { flex-basis: 100%; }
}

.flyn-field[hidden] { display: none; }

/* ------------------------------------------------------------------- labels */

.flyn-field__label {
	display: block;
	margin: 0 0 6px;
	color: var(--ff-label-color);
	font-size: var(--ff-label-size);
	font-weight: var(--ff-label-weight);
	line-height: 1.4;
}

.flyn-field__req { color: var(--ff-req-color); }

.flyn-field__help {
	margin: 0 0 8px;
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
	line-height: 1.5;
}

.flyn-field__fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.flyn-field__heading {
	margin: 8px 0 0;
	color: var(--ff-label-color);
}

.flyn-field__paragraph {
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
}

.flyn-field__divider {
	border: 0;
	border-top: 1px solid var(--ff-input-border);
	margin: 8px 0;
	width: 100%;
}

/* ------------------------------------------------------------------- inputs */

.flyn-form input[type="text"],
.flyn-form input[type="email"],
.flyn-form input[type="tel"],
.flyn-form input[type="url"],
.flyn-form input[type="number"],
.flyn-form input[type="date"],
.flyn-form select,
.flyn-form textarea {
	width: 100%;
	background: var(--ff-input-bg);
	color: var(--ff-input-color);
	border: var(--ff-input-border-width) solid var(--ff-input-border);
	border-radius: var(--ff-input-radius);
	padding: var(--ff-input-padding-y) var(--ff-input-padding-x);
	font-size: var(--ff-input-size);
	font-family: inherit;
	line-height: 1.5;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	box-sizing: border-box;
}

.flyn-form textarea { resize: vertical; min-height: 120px; }

.flyn-form select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa4b2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
	padding-right: 38px;
}

.flyn-form ::placeholder { color: var(--ff-input-placeholder); opacity: 1; }

.flyn-form input:hover,
.flyn-form select:hover,
.flyn-form textarea:hover { border-color: var(--ff-input-hover-border); }

.flyn-form input:focus,
.flyn-form select:focus,
.flyn-form textarea:focus {
	outline: none;
	border-color: var(--ff-input-focus-border);
	box-shadow: var(--ff-input-focus-shadow);
}

.flyn-field.has-error input,
.flyn-field.has-error select,
.flyn-field.has-error textarea { border-color: var(--ff-error-color); }

.flyn-field__error {
	margin: 6px 0 0;
	color: var(--ff-error-color);
	font-size: var(--ff-error-size);
}

/* ------------------------------------------------------------------ choices */

/* Two cards per row by default: a single column made long option lists
   dominate the form. --ff-choice-cols is exposed in the Elementor Style tab. */
.flyn-field__choices {
	display: grid;
	grid-template-columns: repeat(var(--ff-choice-cols, 2), minmax(0, 1fr));
	gap: 8px;
}

.flyn-field__choices--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.flyn-field__choices--plain { grid-template-columns: 1fr; }

@media (max-width: 600px) {
	.flyn-field__choices { grid-template-columns: 1fr; }
}

.flyn-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--ff-choice-gap);
	cursor: pointer;
	color: var(--ff-label-color);
	font-size: var(--ff-input-size);
	line-height: 1.45;
	position: relative;
	/* 44px minimum touch target - WCAG 2.1 AA */
	min-height: 24px;
	padding: 6px 0;
}

.flyn-field__choices--card .flyn-choice {
	background: var(--ff-choice-bg);
	border: 1px solid var(--ff-choice-border);
	border-radius: var(--ff-input-radius);
	padding: 9px 12px;
	font-size: 14px;
	line-height: 1.35;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.flyn-field__choices--card .flyn-choice:hover { border-color: var(--ff-choice-accent); }

.flyn-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.flyn-choice__box {
	flex: 0 0 auto;
	width: var(--ff-choice-size);
	height: var(--ff-choice-size);
	border: 1px solid var(--ff-choice-border);
	border-radius: 4px;
	background: var(--ff-input-bg);
	position: relative;
	transition: background 0.15s ease, border-color 0.15s ease;
	margin-top: 1px;
}

.flyn-choice input[type="radio"] + .flyn-choice__box { border-radius: 50%; }

.flyn-choice input:checked + .flyn-choice__box {
	background: var(--ff-choice-accent);
	border-color: var(--ff-choice-accent);
}

.flyn-choice input[type="checkbox"]:checked + .flyn-choice__box::after {
	content: "";
	position: absolute;
	left: 34%;
	top: 14%;
	width: 26%;
	height: 55%;
	border: solid var(--ff-btn-color);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.flyn-choice input[type="radio"]:checked + .flyn-choice__box::after {
	content: "";
	position: absolute;
	inset: 25%;
	border-radius: 50%;
	background: var(--ff-btn-color);
}

.flyn-choice input:focus-visible + .flyn-choice__box {
	outline: 2px solid var(--ff-input-focus-border);
	outline-offset: 2px;
}

.flyn-choice--consent { align-items: flex-start; }
.flyn-choice--consent .flyn-choice__label { font-size: var(--ff-help-size); color: var(--ff-help-color); }

/* ------------------------------------------------------------------ actions */

.flyn-form__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.flyn-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--ff-btn-bg);
	color: var(--ff-btn-color);
	border: 0;
	border-radius: var(--ff-btn-radius);
	padding: var(--ff-btn-padding-y) var(--ff-btn-padding-x);
	font-size: var(--ff-btn-size);
	font-weight: var(--ff-btn-weight);
	font-family: inherit;
	width: var(--ff-btn-width);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.flyn-form__submit:hover { background: var(--ff-btn-hover-bg); color: var(--ff-btn-hover-color); }
.flyn-form__submit:active { transform: translateY(1px); }
.flyn-form__submit:focus-visible { outline: 2px solid var(--ff-input-focus-border); outline-offset: 3px; }

.flyn-form__back {
	background: transparent;
	color: var(--ff-help-color);
	border: 1px solid var(--ff-input-border);
	border-radius: var(--ff-btn-radius);
	padding: var(--ff-btn-padding-y) 20px;
	font-size: var(--ff-btn-size);
	font-family: inherit;
	cursor: pointer;
}

.flyn-form__spinner { display: none; width: 16px; height: 16px; }

.flyn-form.is-sending .flyn-form__spinner {
	display: block;
	border: 2px solid rgba(0, 0, 0, 0.2);
	border-top-color: var(--ff-btn-color);
	border-radius: 50%;
	animation: flyn-spin 0.7s linear infinite;
}

.flyn-form.is-sending .flyn-form__submit { opacity: 0.75; pointer-events: none; }

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

@media (prefers-reduced-motion: reduce) {
	.flyn-form *, .flyn-form-wrap * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.flyn-form__required-note {
	margin: 12px 0 0;
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
}

.flyn-form__formerror {
	margin-top: 16px;
	padding: 12px 14px;
	border: 1px solid var(--ff-error-color);
	border-radius: var(--ff-input-radius);
	color: var(--ff-error-color);
	font-size: var(--ff-help-size);
}

/* ----------------------------------------------------------------- progress */

.flyn-form__progress { margin-bottom: 24px; }

.flyn-form__progress-bar {
	height: 4px;
	background: var(--ff-progress-bg);
	border-radius: 999px;
	overflow: hidden;
}

.flyn-form__progress-bar span {
	display: block;
	height: 100%;
	background: var(--ff-progress-fill);
	transition: width 0.3s ease;
}

.flyn-form__progress-label {
	margin: 8px 0 0;
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
}

.flyn-form__step-title { margin: 0 0 16px; color: var(--ff-label-color); }

/* ------------------------------------------------------------------ success */

.flyn-form__success { color: var(--ff-success-color); }

.flyn-form__success-msg {
	font-size: 18px;
	line-height: 1.6;
	padding: 20px 0;
}

.flyn-form__booking-title { margin: 8px 0 16px; color: var(--ff-label-color); }

.flyn-form__booking-frame {
	width: 100%;
	min-height: 640px;
	border: 0;
	border-radius: var(--ff-input-radius);
	background: var(--ff-input-bg);
}

.flyn-form__booking-notice {
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
	margin-bottom: 12px;
}

.flyn-form__booking-link {
	display: inline-block;
	margin-top: 12px;
	color: var(--ff-choice-accent);
	font-size: var(--ff-help-size);
}

/* ----------------------------------------------------------------- honeypot */

.flyn-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.flyn-form-notice {
	padding: 12px;
	border: 1px dashed #d1d5db;
	color: #6b7280;
	font-size: 13px;
}

/* ---------------------------------------------------------------- slot picker */

.flyn-slots__hint,
.flyn-slots__loading,
.flyn-slots__empty,
.flyn-slots__tznote {
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
	margin: 0 0 10px;
}

.flyn-slots__tznote { margin: 8px 0 0; }

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

.flyn-cal {
	max-width: 340px;
	margin-bottom: 18px;
	user-select: none;
}

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

.flyn-cal__month {
	font-weight: 600;
	font-size: var(--ff-input-size);
	color: var(--ff-label-color);
	text-transform: capitalize;
}

.flyn-cal__nav {
	/* Astra styles bare <button> with its own padding and min-width, which
	   stretched these into wide empty boxes. Pin every axis explicitly. */
	flex: 0 0 32px;
	width: 32px;
	min-width: 32px;
	max-width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 18px;
	background: var(--ff-choice-bg);
	border: 1px solid var(--ff-choice-border);
	border-radius: var(--ff-input-radius);
	color: var(--ff-label-color);
	cursor: pointer;
	font-family: inherit;
	box-sizing: border-box;
}

.flyn-cal__head .flyn-cal__month { flex: 1 1 auto; text-align: center; }

.flyn-cal__nav:hover:not(:disabled) { border-color: var(--ff-slot-accent); }
.flyn-cal__nav:disabled { opacity: 0.3; cursor: default; }

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

.flyn-cal__dow {
	text-align: center;
	font-size: 11px;
	text-transform: uppercase;
	color: var(--ff-help-color);
	padding-bottom: 4px;
}

.flyn-cal__pad { display: block; }

.flyn-cal__day {
	position: relative;
	aspect-ratio: 1 / 1;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--ff-input-radius);
	font-size: 13px;
	font-family: inherit;
	color: var(--ff-label-color);
	cursor: pointer;
	padding: 0;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.flyn-cal__day.is-available {
	background: var(--ff-choice-bg);
	border-color: var(--ff-choice-border);
	font-weight: 500;
}

.flyn-cal__day.is-available:hover { border-color: var(--ff-slot-accent); }

.flyn-cal__day.is-off {
	color: var(--ff-help-color);
	opacity: 0.45;
	cursor: default;
}

.flyn-cal__day.is-active {
	background: var(--ff-slot-accent);
	border-color: var(--ff-slot-accent);
	color: var(--ff-slot-on-accent);
	font-weight: 600;
}

.flyn-cal__dot {
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--ff-slot-accent);
}

.flyn-cal__day.is-active .flyn-cal__dot { background: var(--ff-slot-on-accent); }

.flyn-cal__day:focus-visible {
	outline: 2px solid var(--ff-input-focus-border);
	outline-offset: 2px;
}

.flyn-slots__panel { margin-top: 4px; }

.flyn-slots__dayname {
	margin: 0 0 10px;
	font-size: var(--ff-help-size);
	font-weight: 600;
	color: var(--ff-label-color);
	text-transform: capitalize;
}

/* --- time pills --------------------------------------------------------- */

.flyn-slots__times {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
	gap: 6px;
}

.flyn-slot {
	padding: 7px 4px;
	background: var(--ff-choice-bg);
	color: var(--ff-label-color);
	border: 1px solid var(--ff-choice-border);
	border-radius: var(--ff-input-radius);
	font-size: 13px;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.flyn-slot:hover { border-color: var(--ff-slot-accent); }

.flyn-slot.is-selected {
	background: var(--ff-slot-accent);
	border-color: var(--ff-slot-accent);
	color: var(--ff-slot-on-accent);
	font-weight: 600;
}

.flyn-slot.is-selected:hover { background: var(--ff-slot-accent-hover); }

/* --- chosen slots ------------------------------------------------------- */

.flyn-slots__picked {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
}

.flyn-slots__pickedlabel {
	font-size: var(--ff-help-size);
	color: var(--ff-help-color);
}

.flyn-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	background: var(--ff-slot-accent);
	color: var(--ff-slot-on-accent);
	border: 0;
	border-radius: 999px;
	font-size: 12px;
	font-family: inherit;
	cursor: pointer;
}

.flyn-chip::after { content: "\00d7"; font-size: 14px; line-height: 1; opacity: 0.8; }
.flyn-chip:hover { background: var(--ff-slot-accent-hover); }
.flyn-chip:hover::after { opacity: 1; }

.flyn-slots__max {
	color: var(--ff-error-color);
	font-size: var(--ff-help-size);
	margin: 8px 0 0;
}

@media (max-width: 600px) {
	.flyn-slots__times { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
	.flyn-daybtn { min-width: 56px; padding: 6px; }
}

.flyn-slots__more {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 7px 10px;
	background: transparent;
	border: 1px dashed var(--ff-choice-border);
	border-radius: var(--ff-input-radius);
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.12s ease, color 0.12s ease;
}

.flyn-slots__more:hover {
	border-color: var(--ff-slot-accent);
	color: var(--ff-slot-accent);
}

.flyn-slots__more:focus-visible {
	outline: 2px solid var(--ff-input-focus-border);
	outline-offset: 2px;
}

.flyn-form__consent {
	margin: 20px 0 0;
	color: var(--ff-help-color);
	font-size: var(--ff-help-size);
	line-height: 1.5;
	max-width: 62ch;
}

.flyn-form__consent + .flyn-form__actions { margin-top: 12px; }
