/**
 * TruFind forms and owner area. Uses the theme's design tokens when present,
 * with fallbacks so the forms still work after a theme change.
 */
.tf-form, .tf-owner, .tf-success {
	--f-navy: var(--tf-navy-800, #0B2A5B);
	--f-navy-dark: var(--tf-navy-900, #071F45);
	--f-navy-light: var(--tf-navy-600, #1E4A8C);
	--f-gold: var(--tf-gold-500, #F7B500);
	--f-gold-dark: var(--tf-gold-600, #E0A200);
	--f-red: var(--tf-red-600, #C62828);
	--f-green: var(--tf-green-700, #1F7A3A);
	--f-border: var(--tf-border, #D9DEE7);
	--f-bg: var(--tf-bg, #F4F6FA);
	--f-text: var(--tf-text, #1A2433);
	--f-muted: var(--tf-text-muted, #5B6676);
	--f-radius: var(--tf-radius-control, 8px);
	--f-card: var(--tf-radius-card, 12px);
	color: var(--f-text);
}

/* Buttons (zero specificity, so the theme's button styles win when present) */
:where(.tf-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 2px solid transparent; border-radius: 8px; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; }
:where(.tf-btn--primary) { background: #0B2A5B; color: #fff; }
:where(.tf-btn--cta) { background: #F7B500; color: #0B2A5B; }
.tf-btn--ghost { background: #fff; color: var(--f-navy, #0B2A5B); border: 2px solid var(--f-border, #D9DEE7); }
.tf-btn--ghost:hover { border-color: var(--f-navy, #0B2A5B); color: var(--f-navy, #0B2A5B); }
.tf-btn--block { width: 100%; }
.tf-btn--sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.tf-btn[disabled], .tf-btn[aria-disabled="true"] { opacity: .65; cursor: progress; }

/* Card */
.tf-form {
	background: #fff; border: 1px solid var(--f-border); border-radius: var(--f-card);
	box-shadow: var(--tf-shadow-card, 0 6px 20px rgba(7, 31, 69, .10)); overflow: hidden;
}
.tf-form > *:not(.tf-form__head):not(.tf-progress):not(.tf-hp):not(input) { margin-left: clamp(16px, 4vw, 32px); margin-right: clamp(16px, 4vw, 32px); }
.tf-form--narrow { max-width: 560px; margin-inline: auto; }
.tf-form__head { display: flex; gap: 14px; align-items: flex-start; padding: 18px clamp(16px, 4vw, 32px); background: var(--f-navy); color: #fff; }
.tf-form__head-icon { display: inline-flex; flex: none; color: #fff; }
.tf-form__head-icon svg { width: 36px; height: 36px; }
.tf-form__title { margin: 0 0 4px; color: #fff; font-size: clamp(20px, 2.4vw, 24px); }
.tf-form__intro { margin: 0; color: rgba(255, 255, 255, .88); font-size: 15px; }
.tf-required-note { font-size: 14px; color: var(--f-muted); margin-top: 16px; }

/* Progress (concept: "Step 1 of 2: …" with a navy bar), full width with numbered step names */
.tf-progress { padding: 18px clamp(16px, 4vw, 32px) 16px; background: var(--f-bg); border-bottom: 1px solid var(--f-border); }
.tf-progress__label { margin: 0 0 10px; font-family: var(--tf-font-heading, inherit); font-weight: 600; font-size: 16px; color: var(--f-navy); }
.tf-progress__bar { height: 10px; border-radius: 999px; background: #DCE3EE; overflow: hidden; }
.tf-progress__bar span { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--f-navy), var(--f-navy-light)); border-radius: 999px; transition: width .3s ease; }
.tf-progress__steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; padding: 0; }
.tf-progress__step { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--f-muted); }
.tf-progress__num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border: 2px solid var(--f-border); border-radius: 50%; background: #fff; color: var(--f-muted); font-family: var(--tf-font-heading, inherit); font-size: 13px; font-weight: 700; line-height: 1; }
.tf-progress__step.is-current { color: var(--f-navy); font-weight: 600; }
.tf-progress__step.is-current .tf-progress__num { border-color: var(--f-navy); background: var(--f-navy); color: #fff; }
.tf-progress__step.is-done .tf-progress__num { border-color: var(--f-green); background: var(--f-green); color: #fff; }

/* Steps and sections */
.tf-form-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.tf-form-step__legend { font-weight: 700; font-size: 16px; color: var(--f-navy); padding: 18px 0 0; }
.js .tf-form--steps .tf-form-step__legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tf-form-section { padding: 16px 0 4px; border-bottom: 1px solid #EDF0F5; }
.tf-form-section:last-of-type { border-bottom: 0; }
.tf-form-section__title { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--f-muted); margin: 0 0 12px; }
.tf-form-step__nav { display: flex; gap: 12px; padding: 20px 0 28px; }
.tf-form-step__nav [data-tf-prev] { flex: 0 0 auto; }

/* Grid and fields */
.tf-grid { display: grid; grid-template-columns: 1fr; gap: 14px 20px; }
@media (min-width: 640px) {
	.tf-grid { grid-template-columns: 1fr 1fr; }
	.tf-field--full { grid-column: 1 / -1; }
}
.tf-field { min-width: 0; }
.tf-field[hidden] { display: none; }
.tf-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--f-text); }
.tf-req { color: var(--f-red); font-weight: 700; }
.tf-form input[type="text"], .tf-form input[type="email"], .tf-form input[type="tel"], .tf-form input[type="number"],
.tf-form input[type="date"], .tf-form input[type="password"], .tf-form select, .tf-form textarea {
	width: 100%; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--f-text);
	background: #fff; border: 1px solid #B9C2D0; border-radius: var(--f-radius);
}
.tf-form textarea { min-height: 110px; resize: vertical; }
.tf-form input[readonly] { background: var(--f-bg); color: var(--f-muted); }
.tf-form input:focus-visible, .tf-form select:focus-visible, .tf-form textarea:focus-visible { outline: 3px solid var(--f-navy-light); outline-offset: 1px; border-color: var(--f-navy-light); }
.tf-input-wrap--prefix { position: relative; }
.tf-input-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--f-muted); font-weight: 600; }
.tf-input-wrap--prefix input { padding-left: 26px !important; }
.tf-help { margin: 6px 0 0; font-size: 13px; color: var(--f-muted); }
.tf-error { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--f-red); }
.tf-error[hidden] { display: none; }
.has-error input, .has-error select, .has-error textarea, .has-error .tf-dropzone { border-color: var(--f-red) !important; }
.tf-choice-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.tf-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.tf-choices--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
.tf-choice { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 15px; cursor: pointer; line-height: 1.4; }
.tf-choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--f-navy); }
.tf-choice--single { font-weight: 500; }
.tf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tf-turnstile { margin-top: 12px; }

/* Error summary and notices */
.tf-error-summary { margin-top: 18px; padding: 14px 18px; border: 2px solid var(--f-red); border-radius: var(--f-radius); background: #FDF2F2; }
.tf-error-summary:focus { outline: 3px solid var(--f-navy-light); outline-offset: 2px; }
.tf-error-summary h2 { margin: 0 0 6px; font-size: 16px; color: var(--f-red); }
.tf-error-summary ul { margin: 0; padding-left: 20px; }
.tf-error-summary a { color: var(--f-red); font-weight: 600; }
.tf-notice { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--f-radius, 8px); border-left: 4px solid #1E4A8C; background: #E8EEF8; }
.tf-notice--success { border-color: var(--f-green, #1F7A3A); background: #E3F4E8; }
.tf-notice--error { border-color: var(--f-red, #C62828); background: #FDF2F2; }

/* Uploader */
.tf-dropzone {
	display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; text-align: center; cursor: pointer;
	border: 2px dashed #A9B4C5; border-radius: var(--f-card); background: var(--f-bg); color: var(--f-text);
}
.tf-dropzone__icon svg { width: 36px; height: 36px; color: var(--f-navy); }
.tf-dropzone strong { color: var(--f-navy); }
.tf-dropzone span { font-size: 13px; color: var(--f-muted); }
.tf-dropzone.is-dragover { border-color: var(--f-navy); background: #E8EEF8; }
.js .tf-dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.js .tf-dropzone__input:focus-visible + .tf-thumbs, .tf-dropzone:focus-within { outline: 3px solid var(--f-navy-light); outline-offset: 2px; }
.no-js .tf-dropzone__input { margin-top: 10px; }
.tf-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tf-thumb { position: relative; border-radius: var(--f-radius); overflow: hidden; border: 1px solid var(--f-border); background: var(--f-bg); aspect-ratio: 3 / 2; }
.tf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-thumb.is-uploading img { opacity: .45; }
.tf-thumb.is-dragging { opacity: .4; }
.tf-thumb:first-child::before { content: attr(data-cover-label); position: absolute; left: 6px; top: 6px; z-index: 1; padding: 2px 8px; border-radius: 999px; background: var(--f-gold); color: var(--f-navy); font-size: 11px; font-weight: 700; }
.tf-thumb__bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--f-navy); width: 0; transition: width .2s; }
.tf-thumb__tools { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.tf-thumb__tools button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: rgba(7, 31, 69, .85); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.tf-thumb__tools button:focus-visible { outline: 3px solid var(--f-gold); outline-offset: 1px; }
.tf-thumb__error { position: absolute; inset: auto 0 0 0; padding: 4px 6px; background: rgba(198, 40, 40, .92); color: #fff; font-size: 12px; }
.tf-upload-count { margin: 8px 0 0; font-size: 14px; color: var(--f-muted); }

/* Success */
.tf-success { max-width: 720px; margin-inline: auto; padding: clamp(24px, 4vw, 40px); text-align: center; background: #fff; border: 1px solid var(--f-border); border-radius: var(--f-card); box-shadow: var(--tf-shadow-card, 0 6px 20px rgba(7, 31, 69, .10)); }
.tf-success:focus { outline: none; }
.tf-success__icon svg { width: 56px; height: 56px; color: var(--f-green); }
.tf-success__title { color: var(--f-navy); font-size: clamp(22px, 3vw, 28px); margin: 10px 0 12px; }
.tf-success__ref strong { font-size: 20px; letter-spacing: .02em; color: var(--f-navy); }
.tf-success .tf-btn-row { justify-content: center; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Owner area */
.tf-auth { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .tf-auth { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .tf-auth .tf-form--narrow { margin: 0; max-width: none; } }
.tf-auth__aside { padding: 24px; border-radius: var(--f-card, 12px); background: var(--f-navy, #0B2A5B); color: #fff; }
.tf-auth__aside h2 { color: #fff; font-size: 20px; }
.tf-auth__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; padding-bottom: 24px; }
.tf-form .tf-btn--block[type="submit"] { margin-top: 18px; }
.tf-owner__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.tf-owner__title { margin: 0; font-size: 26px; }
.tf-owner__hello { margin: 4px 0 0; color: var(--f-muted); }
.tf-owner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tf-owner-card { display: grid; grid-template-columns: 120px 1fr; gap: 14px 18px; padding: 14px; background: #fff; border: 1px solid var(--f-border); border-radius: var(--f-card); box-shadow: 0 4px 14px rgba(7, 31, 69, .06); }
.tf-owner-card__media { border-radius: var(--f-radius); overflow: hidden; background: var(--f-bg); aspect-ratio: 3 / 2; }
.tf-owner-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-owner-card__meta { margin: 0; font-size: 13px; color: var(--f-muted); }
.tf-owner-card__title { margin: 2px 0 6px; font-size: 18px; }
.tf-owner-card__body p { margin: 0 0 6px; }
.tf-owner-card__message { padding: 8px 10px; border-radius: 6px; background: #FFF4D6; font-size: 14px; }
.tf-owner-card__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.tf-owner-card__actions form { margin: 0; }
@media (min-width: 768px) {
	.tf-owner-card { grid-template-columns: 160px 1fr auto; align-items: center; }
	.tf-owner-card__actions { grid-column: auto; flex-direction: column; align-items: stretch; }
}
.tf-empty-state { padding: 28px; text-align: center; border: 2px dashed var(--f-border); border-radius: var(--f-card); }
.tf-back { font-weight: 600; text-decoration: none; }

/* Pills (shared with admin colours) */
.tf-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #EEF1F6; color: #3D4A5C; }
.tf-pill--property-publish { background: #E3F4E8; color: #1F7A3A; }
.tf-pill--property-pending { background: #FFF4D6; color: #7A5600; }
.tf-pill--property-tf_changes { background: #E2F0FD; color: #135FA3; }
.tf-pill--property-tf_rented { background: #EFE9FB; color: #5B3BA8; }
.tf-pill--property-tf_rejected { background: #FDECEC; color: #B4232A; }
.tf-pill--property-tf_unverified { background: #EEF1F6; color: #3D4A5C; }

@media (prefers-reduced-motion: reduce) { .tf-progress__bar span, .tf-thumb__bar { transition: none; } }

/* Submit area and consent line */
.tf-submit-wrap { width: 100%; }
.tf-consent-line { margin: 10px 0 0; font-size: 13px; color: var(--f-muted, #5B6676); }
.tf-form--compact .tf-form__head { padding-block: 14px; }
.tf-form--compact .tf-required-note { display: none; }

/* Requested property summary */
.tf-property-summary { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding: 12px; border: 1px solid var(--f-border); border-radius: var(--f-card); background: var(--f-bg); }
.tf-property-summary__media { border-radius: var(--f-radius); overflow: hidden; aspect-ratio: 3 / 2; background: #fff; }
.tf-property-summary__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-property-summary p { margin: 0; }
.tf-property-summary__eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--f-muted); }
.tf-property-summary__title a { font-weight: 700; font-size: 17px; color: var(--f-navy); text-decoration: none; }
.tf-property-summary__meta { font-size: 14px; color: var(--f-muted); }
.tf-property-summary__avail { display: inline-block; margin-top: 4px !important; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #FFF4D6; color: #7A5600; }
.tf-property-summary__avail.is-now { background: var(--f-green); color: #fff; }
.tf-property-summary__change { grid-column: 1 / -1; font-size: 13px; justify-self: end; }
@media (min-width: 640px) { .tf-property-summary { grid-template-columns: 140px 1fr auto; } .tf-property-summary__change { grid-column: auto; align-self: start; } }

/* Household rows */
.tf-households fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tf-households__rows { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.tf-households__row { display: grid; grid-template-columns: 32px 1fr 1fr 40px; gap: 10px; align-items: end; padding: 10px; border: 1px solid var(--f-border); border-radius: var(--f-radius); background: var(--f-bg); }
.tf-households__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 8px; border-radius: 50%; background: var(--f-navy); color: #fff; font-weight: 700; font-size: 13px; }
.tf-households__row label span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.tf-households__remove { width: 40px; height: 44px; border: 1px solid var(--f-border); border-radius: var(--f-radius); background: #fff; color: var(--f-red); cursor: pointer; }
.tf-households__remove[hidden] { visibility: hidden; display: block; }

/* What happens next */
.tf-next-steps { text-align: left; max-width: 480px; margin: 16px auto 0; padding-left: 22px; }
.tf-next-steps li { margin-bottom: 8px; }
.tf-success__hint { margin: 12px 0 0; font-size: 14px; color: var(--f-muted, #5B6676); }

/* Owner area: listing activity */
.tf-owner-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 6px; padding: 0; }
.tf-owner-stats li { margin: 0; padding: 4px 10px; border-radius: 999px; background: var(--f-bg); font-size: 13px; color: var(--f-text); }
.tf-owner-stats strong { color: var(--f-navy); }
.tf-owner-stats span { color: var(--f-muted); }
