/* Talstaff Vacancies – uses Avada's global colour variables so it follows the theme. */
.tsv {
	--tsv-brand: var(--awb-color7, #264375);
	--tsv-accent: var(--awb-color5, #3269ff);
	--tsv-ink: var(--awb-color8, #040922);
	--tsv-muted: #4a5068;
	--tsv-line: #d9d9da;
	--tsv-bg: #ffffff;
	--tsv-soft: #f4f6fb;
	--tsv-error: #b42318;
	--tsv-radius: 16px;
	color: var(--tsv-ink);
	font-size: 16px;
	line-height: 1.55;
}
.tsv *, .tsv *::before, .tsv *::after { box-sizing: border-box; }

/* Buttons – Avada-style rounded outline */
.tsv .tsv-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 48px; padding: 10px 26px;
	border: 2px solid var(--tsv-brand); border-radius: 60px;
	background: transparent; color: var(--tsv-brand);
	font: inherit; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: 15px;
	text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.tsv .tsv-btn:hover, .tsv .tsv-btn:focus-visible { background: var(--tsv-brand); color: #fff; }
.tsv .tsv-btn--solid { background: var(--tsv-brand); color: #fff; }
.tsv .tsv-btn--solid:hover, .tsv .tsv-btn--solid:focus-visible { background: var(--tsv-ink); border-color: var(--tsv-ink); color: #fff; }
.tsv .tsv-btn--block { width: 100%; }
.tsv a:focus-visible, .tsv button:focus-visible, .tsv input:focus-visible, .tsv select:focus-visible, .tsv textarea:focus-visible, .tsv summary:focus-visible {
	outline: 3px solid var(--tsv-accent); outline-offset: 2px;
}

/* Fields */
.tsv .tsv-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tsv label, .tsv legend { font-weight: 600; color: var(--tsv-ink); font-size: 15px; }
.tsv input[type=text], .tsv input[type=search], .tsv input[type=email], .tsv input[type=tel], .tsv select, .tsv textarea {
	width: 100%; min-height: 50px; padding: 10px 14px;
	font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
	color: var(--tsv-ink); background: var(--tsv-bg);
	border: 2px solid var(--tsv-line); border-radius: 12px; box-shadow: none;
}
.tsv textarea { min-height: 110px; resize: vertical; }
.tsv input:focus, .tsv select:focus, .tsv textarea:focus { border-color: var(--tsv-brand); }
.tsv input[type=file] { font: inherit; font-size: 15px; padding: 10px; border: 2px dashed var(--tsv-line); border-radius: 12px; width: 100%; background: var(--tsv-soft); }
.tsv [aria-invalid=true] { border-color: var(--tsv-error) !important; }

/* Search bar */
.tsv-search { background: var(--tsv-soft); border: 2px solid var(--tsv-brand); border-radius: var(--tsv-radius); padding: 20px; margin-bottom: 20px; }
.tsv-search__row { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tsv-field--button { justify-content: flex-end; }
.tsv-field--button .tsv-btn { width: 100%; }
@media (min-width: 900px) {
	.tsv-search__row { grid-template-columns: 1.5fr 1fr 1fr auto; align-items: end; }
	.tsv-filters .tsv-search__row { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 600px) and (max-width: 899px) {
	.tsv-search__row { grid-template-columns: 1fr 1fr; }
	.tsv-field--grow { grid-column: 1 / -1; }
}
.tsv-filters { margin-top: 14px; }
.tsv-filters summary { cursor: pointer; font-weight: 700; color: var(--tsv-brand); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.tsv-filters[open] summary { margin-bottom: 8px; }

.tsv-count { color: var(--tsv-muted); margin: 0 0 14px; }
.tsv-count a { color: var(--tsv-brand); font-weight: 600; }
.tsv-notice { background: #fff8e6; border-left: 4px solid #d99a00; padding: 12px 16px; border-radius: 8px; }
.tsv-notice--closed { background: #fdecea; border-color: var(--tsv-error); }

/* Cards */
.tsv-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) { .tsv-cards { grid-template-columns: 1fr 1fr; } }
.tsv-cards > li { margin: 0; padding: 0; }
.tsv-cards > li::before { display: none; }
.tsv-card {
	position: relative; display: flex; flex-direction: column; height: 100%;
	padding: 20px 22px; border: 2px solid var(--tsv-brand); border-radius: var(--tsv-radius);
	background: var(--tsv-bg); color: var(--tsv-ink); text-decoration: none;
	transition: box-shadow .15s, transform .15s;
}
.tsv-card:hover, .tsv-card:focus-visible { box-shadow: 0 8px 24px rgba(4, 9, 34, .12); transform: translateY(-2px); color: var(--tsv-ink); }
.tsv-card__ref { position: absolute; top: 18px; right: 20px; font-size: 13px; color: var(--tsv-muted); }
.tsv .tsv-card__title { margin: 0 70px 6px 0; font-size: 20px; line-height: 1.3; color: var(--tsv-brand); }
.tsv-card__pay { margin: 0 0 8px; font-weight: 700; font-size: 17px; }
.tsv-card__meta { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.tsv-card__meta li { margin: 0; padding: 3px 12px; border-radius: 60px; background: var(--tsv-soft); font-size: 14px; }
.tsv-card__meta li::before { display: none; }
.tsv-card__distance { color: var(--tsv-muted); }
.tsv-card__summary {
	margin: 0 0 12px; color: var(--tsv-muted);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tsv-card__cta { margin-top: auto; font-weight: 700; color: var(--tsv-brand); }

.tsv-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; }
.tsv-pagination__info { color: var(--tsv-muted); }
.tsv-empty { padding: 24px; border: 2px dashed var(--tsv-line); border-radius: var(--tsv-radius); text-align: center; }
.tsv-empty a { color: var(--tsv-brand); font-weight: 700; }

/* Single vacancy */
.tsv-summary-box { border: 2px solid var(--tsv-brand); border-radius: var(--tsv-radius); padding: 20px 22px; margin-bottom: 28px; background: var(--tsv-soft); }
.tsv-summary-box__pay { font-size: 22px; font-weight: 800; color: var(--tsv-brand); margin: 0 0 12px; }
.tsv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 0 0 18px; }
.tsv-facts dt { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--tsv-muted); margin: 0; }
.tsv-facts dd { margin: 2px 0 0; font-weight: 600; }
.tsv-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tsv-section { margin: 0 0 28px; }
.tsv .tsv-section h2, .tsv .tsv-apply h2 { font-size: 24px; margin: 0 0 12px; color: var(--tsv-brand); }
.tsv-list { margin: 0 0 0 1.2em; padding: 0; }
.tsv-list li { margin: 4px 0; }
.tsv-list--ticks { list-style: none; margin-left: 0; }
.tsv-list--ticks li { position: relative; padding-left: 28px; }
.tsv-list--ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--tsv-brand); font-weight: 800; }

/* Application form */
.tsv-apply { border: 2px solid var(--tsv-brand); border-radius: var(--tsv-radius); padding: 22px; margin: 32px 0; background: var(--tsv-bg); scroll-margin-top: 120px; }
.tsv-apply__ref { margin: -6px 0 6px; color: var(--tsv-muted); font-size: 14px; }
.tsv-apply__intro { margin: 0 0 18px; }
.tsv-form { display: flex; flex-direction: column; gap: 18px; }
.tsv-form__grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .tsv-form__grid { grid-template-columns: 1fr 1fr; } }
.tsv-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tsv-fieldset legend { padding: 0; margin-bottom: 8px; }
.tsv-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.tsv .tsv-choice { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; border: 2px solid var(--tsv-line); border-radius: 12px; font-weight: 500; cursor: pointer; background: var(--tsv-bg); }
.tsv .tsv-choice:has(input:checked) { border-color: var(--tsv-brand); background: var(--tsv-soft); }
.tsv .tsv-choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--tsv-brand); flex: none; }
.tsv-field--consent .tsv-choice { align-items: flex-start; border: 0; padding: 4px 0; }
.tsv-field--consent a { color: var(--tsv-brand); font-weight: 700; text-decoration: underline; }
.tsv-req { color: var(--tsv-error); }
.tsv-optional, .tsv-hint { color: var(--tsv-muted); font-weight: 400; font-size: 14px; margin: 0; }
.tsv-error { color: var(--tsv-error); font-weight: 600; font-size: 14px; margin: 0; }
.tsv-error-summary { border-left: 4px solid var(--tsv-error); background: #fdecea; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.tsv-error-summary p { margin: 0; }
.tsv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tsv-thanks { text-align: center; padding: 10px 0; }
.tsv-thanks a:not(.tsv-btn) { color: var(--tsv-brand); font-weight: 700; }
.tsv-form button[disabled] { opacity: .7; cursor: progress; }

/* Sticky mobile "Apply now" */
.tsv-sticky-apply { display: none; }
@media (max-width: 799px) {
	.tsv .tsv-sticky-apply {
		display: flex; position: fixed; z-index: 9990; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 6px 20px rgba(4, 9, 34, .25); transition: transform .2s, opacity .2s;
	}
	.tsv .tsv-sticky-apply.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
	.tsv-single { padding-bottom: 80px; }
	.tsv-apply { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.tsv-card, .tsv .tsv-btn, .tsv .tsv-sticky-apply { transition: none; }
}
