/* YI Service Forms — matches the You Insurance dark theme.
   Falls back to sensible dark values if theme variables are absent. */
.yisf-form {
	--_bg:      var(--yi-bg-alt, #111726);
	--_surface: var(--yi-surface, #161d2e);
	--_border:  var(--yi-border, #26304a);
	--_text:    var(--yi-text, #e8ecf5);
	--_muted:   var(--yi-text-muted, #97a1b8);
	--_accent:  var(--yi-accent, #6c5ce7);
	--_accent2: var(--yi-accent-2, #00d1b2);
	--_grad:    var(--yi-accent-grad, linear-gradient(135deg, #6c5ce7 0%, #00d1b2 100%));
	--_danger:  var(--yi-danger, #ff6b6b);
	--_radius:  14px;

	max-width: 760px;
	margin: 0 auto;
	color: var(--_text);
	font-family: var(--yi-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.yisf-intro { margin-bottom: 1.6rem; }
.yisf-intro h3 { font-size: 1.5rem; margin: 0 0 .5rem; color: #fff; }
.yisf-intro p { color: var(--_muted); line-height: 1.6; margin: 0; font-size: .95rem; }

.yisf-group {
	border: 1px solid var(--_border);
	border-radius: var(--_radius);
	background: var(--_surface);
	padding: 1.4rem 1.5rem;
	margin: 0 0 1.4rem;
}
.yisf-group legend {
	padding: 0 .6rem;
	font-weight: 700;
	color: var(--_accent2);
	font-size: .82rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.yisf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.yisf-row:has(> .yisf-field:nth-child(3)) { grid-template-columns: 1fr 1fr 1fr; }

.yisf-field { margin-bottom: 1rem; }
.yisf-field label,
.yisf-sig-wrap > label { display: block; font-size: .85rem; margin-bottom: .4rem; color: var(--_text); font-weight: 600; }

.yisf-field input,
.yisf-field select,
.yisf-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: .7rem .85rem;
	background: var(--_bg);
	border: 1px solid var(--_border);
	border-radius: 10px;
	color: var(--_text);
	font-size: .95rem;
	font-family: inherit;
}
.yisf-field textarea { min-height: 90px; resize: vertical; }
.yisf-field input:focus,
.yisf-field select:focus,
.yisf-field textarea:focus {
	outline: none;
	border-color: var(--_accent2);
	box-shadow: 0 0 0 3px rgba(0, 209, 178, .18);
}

.yisf-req { color: var(--_danger); }

.yisf-radios { display: flex; flex-wrap: wrap; gap: 1rem; }
.yisf-radios label { font-weight: 400; font-size: .9rem; display: flex; align-items: center; gap: .4rem; margin: 0; }

.yisf-check {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
	font-size: .9rem;
	line-height: 1.5;
	color: var(--_muted);
	margin-bottom: 1.1rem;
	cursor: pointer;
}
.yisf-check input { margin-top: .2rem; flex: none; }

.yisf-sig-wrap { margin-top: .5rem; }
.yisf-sig-pad { position: relative; }
.yisf-canvas {
	width: 100%;
	height: 180px;
	background: #fff;
	border: 1px solid var(--_border);
	border-radius: 10px;
	touch-action: none;
	cursor: crosshair;
	display: block;
}
.yisf-sig-clear {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(11, 15, 25, .06);
	border: 1px solid rgba(11, 15, 25, .15);
	color: #0b0f19;
	border-radius: 8px;
	padding: .3rem .7rem;
	font-size: .8rem;
	cursor: pointer;
}
.yisf-sig-clear:hover { background: rgba(11, 15, 25, .12); }
.yisf-sig-hint { font-size: .8rem; color: var(--_muted); margin: .5rem 0 0; }

.yisf-actions { margin-top: .5rem; }
.yisf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .95rem 2rem;
	border: none;
	border-radius: 999px;
	background: var(--_grad);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .2s ease;
}
.yisf-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(108, 92, 231, .7); }
.yisf-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.yisf-status { margin-top: 1rem; font-size: .95rem; }
.yisf-error { color: var(--_danger); }

.yisf-done { text-align: center; padding: 2.5rem 1rem; }
.yisf-done h3 { color: var(--_accent2); font-size: 1.6rem; margin: 0 0 .6rem; }
.yisf-done p { color: var(--_text); line-height: 1.6; max-width: 46ch; margin: 0 auto; }

@media (max-width: 640px) {
	.yisf-row,
	.yisf-row:has(> .yisf-field:nth-child(3)) { grid-template-columns: 1fr; }
}

.yisf-hint { display:block; font-size:.78rem; color:var(--_muted); margin-top:.3rem; }
.yisf-download {
	display:inline-block; margin-top:1rem; padding:.8rem 1.8rem;
	background:var(--_grad); color:#fff !important; border-radius:999px;
	font-weight:700; text-decoration:none;
}
.yisf-download:hover { transform:translateY(-2px); }
