/*
 * Talent Release Form styles.
 * Palette: #1B331B (dark green) #5FAB5F (green) #BCDCBC (light green)
 *          #467FF7 (blue) #C8D5DC (gray-blue)
 */

/* Hide the theme's page title on pages that contain the release form
   (this stylesheet only loads on those pages). */
h1.entry-title,
h1.page-title,
.page .entry-title,
.page .page-title {
	display: none !important;
}

.trf-wrap {
	--trf-dark: #1b331b;
	--trf-green: #5fab5f;
	--trf-light: #bcdcbc;
	--trf-blue: #467ff7;
	--trf-gray: #c8d5dc;
	--trf-bg: #f7faf7;
	max-width: 860px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.6;
	color: var(--trf-dark);
}

.trf-wrap *,
.trf-wrap *::before,
.trf-wrap *::after {
	box-sizing: border-box;
}

.trf-card {
	background: #fff;
	border: 1px solid var(--trf-gray);
	border-radius: 12px;
	overflow: hidden;
	margin: 0 0 28px;
	box-shadow: 0 2px 10px rgba(27, 51, 27, 0.06);
}

.trf-band {
	height: 6px;
	background: linear-gradient(90deg, var(--trf-green), var(--trf-light));
}

.trf-card-inner {
	padding: 28px 32px 32px;
}

.trf-title {
	margin: 0 0 4px;
	font-size: 1.7em;
	line-height: 1.25;
	color: var(--trf-dark);
}

.trf-subtitle {
	margin: 0 0 20px;
	color: var(--trf-green);
	font-weight: 600;
}

/* Scrollable agreement */
.trf-agreement {
	max-height: 420px;
	overflow-y: auto;
	border: 1px solid var(--trf-gray);
	border-radius: 8px;
	background: var(--trf-bg);
	padding: 20px 24px;
	font-size: 0.95em;
}

.trf-agreement h3.trf-doc-title {
	color: var(--trf-dark);
	border-bottom: 2px solid var(--trf-green);
	padding-bottom: 6px;
	margin: 28px 0 14px;
	font-size: 1.15em;
	letter-spacing: 0.02em;
}

.trf-agreement h4 {
	color: var(--trf-dark);
	margin: 20px 0 8px;
	font-size: 1em;
}

.trf-agreement ul {
	margin: 0 0 14px;
	padding-left: 22px;
}

.trf-agreement li {
	margin-bottom: 8px;
}

.trf-agreement li::marker {
	color: var(--trf-green);
}

.trf-agreement p {
	margin: 0 0 12px;
}

/* Form */
.trf-section-head {
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--trf-green);
	color: var(--trf-dark);
	font-size: 1.25em;
}

.trf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
	margin-bottom: 20px;
}

.trf-col-2 {
	grid-column: 1 / -1;
}

@media (max-width: 600px) {
	.trf-grid {
		grid-template-columns: 1fr;
	}
	.trf-col-2 {
		grid-column: auto;
	}
	.trf-card-inner {
		padding: 20px 18px 24px;
	}
}

.trf-field label {
	display: block;
	font-weight: 600;
	font-size: 0.88em;
	margin-bottom: 5px;
	color: var(--trf-dark);
}

.trf-req {
	color: var(--trf-blue);
}

.trf-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--trf-gray);
	border-radius: 8px;
	background: #fff;
	color: var(--trf-dark);
	font-size: 1em;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.trf-field input:focus {
	outline: none;
	border-color: var(--trf-blue);
	box-shadow: 0 0 0 3px rgba(70, 127, 247, 0.18);
}

.trf-field input[readonly] {
	background: var(--trf-bg);
	color: #4a5a4a;
}

.trf-field input.trf-invalid {
	border-color: #c0392b;
}

.trf-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Minor question */
.trf-minor-question {
	border: 1.5px solid var(--trf-light);
	background: var(--trf-bg);
	border-radius: 10px;
	padding: 14px 18px 16px;
	margin: 0 0 22px;
}

.trf-minor-question legend {
	font-weight: 700;
	font-size: 0.95em;
	padding: 0 6px;
	color: var(--trf-dark);
}

.trf-age-buttons {
	display: inline-flex;
	border: 1.5px solid var(--trf-gray);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.trf-age-btn {
	cursor: pointer;
	margin: 0;
}

.trf-age-btn + .trf-age-btn {
	border-left: 1.5px solid var(--trf-gray);
}

.trf-age-btn input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.trf-age-btn span {
	display: inline-block;
	padding: 10px 28px;
	font-weight: 600;
	color: var(--trf-dark);
	transition: background 0.15s, color 0.15s;
	user-select: none;
}

.trf-age-btn:hover span {
	background: var(--trf-bg);
}

.trf-age-btn input:checked + span {
	background: var(--trf-blue);
	color: #fff;
}

.trf-age-btn input:focus-visible + span {
	outline: 2px solid var(--trf-blue);
	outline-offset: -2px;
}

/* Signatures */
.trf-sig-block {
	margin: 0 0 24px;
}

.trf-sig-title {
	margin: 0 0 10px;
	font-size: 1em;
	color: var(--trf-dark);
}

.trf-sig-tabs {
	display: inline-flex;
	border: 1.5px solid var(--trf-gray);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 10px;
}

.trf-tab {
	border: 0;
	background: #fff;
	color: var(--trf-dark);
	padding: 7px 22px;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.trf-tab + .trf-tab {
	border-left: 1.5px solid var(--trf-gray);
}

.trf-tab.is-active {
	background: var(--trf-blue);
	color: #fff;
}

.trf-tab:not(.is-active):hover {
	background: var(--trf-bg);
}

.trf-canvas-frame {
	position: relative;
	border: 1.5px dashed var(--trf-green);
	border-radius: 10px;
	background: #fff;
	height: 180px;
	overflow: hidden;
}

.trf-canvas {
	width: 100%;
	height: 100%;
	display: block;
	touch-action: none;
	cursor: crosshair;
}

.trf-canvas-hint {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	text-align: center;
	color: var(--trf-gray);
	font-size: 0.85em;
	pointer-events: none;
	user-select: none;
}

.trf-canvas-frame.has-ink .trf-canvas-hint {
	display: none;
}

.trf-clear {
	margin-top: 8px;
	background: #fff;
	border: 1.5px solid var(--trf-gray);
	color: var(--trf-dark);
	border-radius: 8px;
	padding: 6px 16px;
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.trf-clear:hover {
	border-color: var(--trf-green);
	color: var(--trf-green);
}

.trf-typed-input {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--trf-gray);
	border-radius: 8px;
	font-size: 1em;
	margin-bottom: 10px;
}

.trf-typed-input:focus {
	outline: none;
	border-color: var(--trf-blue);
	box-shadow: 0 0 0 3px rgba(70, 127, 247, 0.18);
}

.trf-typed-preview {
	border: 1.5px dashed var(--trf-green);
	border-radius: 10px;
	background: #fff;
	min-height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Dancing Script", "Brush Script MT", "Segoe Script", cursive;
	font-size: 2.3em;
	color: var(--trf-dark);
	padding: 10px 16px;
	overflow: hidden;
	white-space: nowrap;
}

.trf-typed-preview:empty::before {
	content: "Your signature will appear here";
	font-family: inherit;
	font-size: 0.45em;
	color: var(--trf-gray);
}

.trf-id-input {
	width: 100%;
	padding: 9px 10px;
	border: 1.5px dashed var(--trf-green);
	border-radius: 8px;
	background: var(--trf-bg);
	font-size: 0.92em;
	cursor: pointer;
}

.trf-id-input::file-selector-button {
	background: var(--trf-blue);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 7px 14px;
	margin-right: 12px;
	font-weight: 600;
	cursor: pointer;
}

.trf-field-hint {
	margin: 6px 0 0;
	font-size: 0.8em;
	color: #557055;
	line-height: 1.5;
}

.trf-id-error,
.trf-sig-error,
.trf-form-error {
	color: #c0392b;
	font-weight: 600;
	font-size: 0.9em;
	margin: 8px 0 0;
}

/* Guardian */
.trf-guardian {
	border-top: 2px solid var(--trf-light);
	margin-top: 8px;
	padding-top: 22px;
}

.trf-guardian-text {
	background: var(--trf-bg);
	border-left: 4px solid var(--trf-green);
	border-radius: 0 8px 8px 0;
	padding: 12px 16px;
	font-size: 0.92em;
	margin: 0 0 18px;
}

/* Consent + submit */
.trf-consent {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: var(--trf-bg);
	border: 1.5px solid var(--trf-light);
	border-radius: 10px;
	padding: 14px 16px;
	margin: 4px 0 20px;
	cursor: pointer;
	font-size: 0.92em;
}

.trf-consent input {
	margin-top: 4px;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	accent-color: var(--trf-blue);
}

.trf-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
}

.trf-submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--trf-blue);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 14px 34px;
	font-size: 1.05em;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.trf-submit:hover:not(:disabled) {
	background: #3568d8;
}

.trf-submit:active:not(:disabled) {
	transform: translateY(1px);
}

.trf-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.trf-submit-spinner {
	width: 16px;
	height: 16px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: trf-spin 0.7s linear infinite;
}

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

.trf-fineprint {
	margin: 14px 0 0;
	font-size: 0.85em;
	color: #557055;
}

/* Success */
.trf-success .trf-card-inner {
	text-align: center;
	padding: 44px 32px;
}

.trf-success-check {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--trf-light);
	color: var(--trf-dark);
	font-size: 34px;
	line-height: 64px;
	font-weight: 700;
}

.trf-success h3 {
	margin: 0 0 10px;
	color: var(--trf-dark);
}
