/* ==========================================================================
   Servicified TV Mounting — Booking Wizard
   Design concept: a technician's work order. The left card behaves like a
   paper job ticket that fills in as you go; the right pane is the sequence
   of questions a dispatcher would ask. One accent (cobalt) does all the
   pointing; everything else stays quiet ink-on-parchment.
   ========================================================================== */

#stvb-app, #stvb-app * { box-sizing: border-box; }

#stvb-app {
	--ink: #1B2733;
	--muted: #74808C;
	--bg: #F6F4EF;
	--card: #FFFFFF;
	--border: #E4E0D6;
	--primary: #2E5FE0;
	--primary-dark: #23459E;
	--primary-tint: #EAF0FE;
	--available: #3E8F63;
	--partial: #C98A2E;
	--full: #B23A32;
	--radius: 10px;
	--font-head: 'Sora', 'Segoe UI', sans-serif;
	--font-body: 'Inter', 'Segoe UI', sans-serif;

	font-family: var(--font-body);
	color: var(--ink);
	background: var(--bg);
	padding: 32px;
	border-radius: 16px;
	max-width: 980px;
	margin: 0 auto;
}

#stvb-app h1, #stvb-app h2, #stvb-app h3 { font-family: var(--font-head); margin: 0; }

.stvb-layout {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 28px;
	align-items: start;
}

@media (max-width: 760px) {
	.stvb-layout { grid-template-columns: 1fr; }
	#stvb-app { padding: 18px; }
}

/* ---------------- Ticket (order summary) ---------------- */

.stvb-ticket {
	background: var(--card);
	border-radius: var(--radius);
	padding: 26px 24px 20px;
	position: relative;
	box-shadow: 0 1px 2px rgba(27,39,51,.06), 0 10px 24px -16px rgba(27,39,51,.25);
	position: sticky;
	top: 20px;
}

/* perforated top/bottom edge, like a tear-off ticket */
.stvb-ticket::before, .stvb-ticket::after {
	content: "";
	position: absolute;
	left: 0; right: 0;
	height: 10px;
	background-image: radial-gradient(circle, var(--bg) 3.5px, transparent 3.6px);
	background-size: 16px 16px;
	background-position: 4px 0;
}
.stvb-ticket::before { top: -1px; }
.stvb-ticket::after { bottom: -1px; transform: scaleY(-1); }

.stvb-ticket-icon {
	width: 52px; height: 52px;
	border-radius: 50%;
	background: var(--primary-tint);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 14px;
}
.stvb-ticket-icon svg { width: 26px; height: 26px; stroke: var(--primary); }

.stvb-ticket h2 { font-size: 18px; letter-spacing: -.01em; }
.stvb-ticket .stvb-ticket-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.stvb-line-items {
	list-style: none; margin: 18px 0 0; padding: 14px 0 0;
	border-top: 1px dashed var(--border);
}
.stvb-line-items li {
	display: flex; justify-content: space-between; gap: 12px;
	font-size: 13.5px; padding: 5px 0; color: var(--ink);
	animation: stvb-line-in .25s ease;
}
.stvb-line-items li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }

@keyframes stvb-line-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.stvb-ticket-total {
	display: flex; justify-content: space-between; align-items: baseline;
	border-top: 1px solid var(--ink); margin-top: 14px; padding-top: 12px;
}
.stvb-ticket-total .stvb-total-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stvb-ticket-total .stvb-total-amount { font-family: var(--font-head); font-size: 24px; font-variant-numeric: tabular-nums; }

.stvb-ticket-contact {
	margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--border);
	font-size: 13px; color: var(--muted); line-height: 1.6;
}
.stvb-ticket-contact strong { color: var(--ink); display:block; font-size: 13.5px; }

/* ---------------- Step pane ---------------- */

.stvb-panel {
	background: var(--card);
	border-radius: var(--radius);
	padding: 30px 32px;
	box-shadow: 0 1px 2px rgba(27,39,51,.06), 0 10px 24px -16px rgba(27,39,51,.25);
	min-height: 420px;
	display: flex; flex-direction: column;
}

@media (max-width: 760px) {
	.stvb-panel { padding: 22px 18px; }
}

.stvb-steps {
	display: flex; align-items: center; margin-bottom: 26px; gap: 2px;
}
.stvb-step-dot {
	width: 26px; height: 26px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 600; font-family: var(--font-head);
	background: var(--bg); color: var(--muted); border: 1px solid var(--border);
	flex-shrink: 0;
}
.stvb-step-dot.is-done { background: var(--primary); color: #fff; border-color: var(--primary); }
.stvb-step-dot.is-current { background: var(--card); color: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.stvb-step-line { flex: 1; height: 1px; background: var(--border); min-width: 8px; }
.stvb-step-line.is-done { background: var(--primary); }

.stvb-question { font-size: 21px; margin-bottom: 4px; letter-spacing: -.01em; }
.stvb-question-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.stvb-body { flex: 1; }

/* ---------------- Option cards (TV size / bracket) ---------------- */

.stvb-option-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
@media (max-width: 560px) { .stvb-option-grid { grid-template-columns: 1fr; } }

.stvb-option-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 14px;
	text-align: center;
	cursor: pointer;
	background: var(--card);
	transition: border-color .15s ease, transform .1s ease, background .15s ease;
}
.stvb-option-card:hover { border-color: var(--primary); }
.stvb-option-card:active { transform: scale(.98); }
.stvb-option-card.is-selected { border-color: var(--primary); background: var(--primary-tint); }
.stvb-option-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.stvb-option-icon {
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--primary-tint); margin: 0 auto 12px;
	display: flex; align-items: center; justify-content: center;
}
.stvb-option-card.is-selected .stvb-option-icon { background: var(--primary); }
.stvb-option-icon svg { width: 22px; height: 22px; stroke: var(--primary); }
.stvb-option-card.is-selected .stvb-option-icon svg { stroke: #fff; }

.stvb-option-label { font-weight: 600; font-size: 14px; }
.stvb-option-price { color: var(--primary); font-weight: 600; font-size: 13.5px; margin-top: 2px; }

/* ---------------- Pill list (wall type) ---------------- */

.stvb-pill-list { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.stvb-pill {
	border: 1px solid var(--border); border-radius: var(--radius);
	padding: 16px 18px; cursor: pointer; display: flex; justify-content: space-between;
	align-items: center; font-size: 14.5px; transition: border-color .15s ease, background .15s ease;
}
.stvb-pill:hover { border-color: var(--primary); }
.stvb-pill.is-selected { border-color: var(--primary); background: var(--primary-tint); font-weight: 600; }
.stvb-pill .stvb-pill-extra { color: var(--muted); font-weight: 500; }
.stvb-pill.is-selected .stvb-pill-extra { color: var(--primary); }

/* ---------------- Addon checkboxes ---------------- */

.stvb-check-list { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.stvb-check-row {
	display: flex; align-items: center; gap: 12px;
	border: 1px solid var(--border); border-radius: var(--radius);
	padding: 13px 16px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.stvb-check-row:hover { border-color: var(--primary); }
.stvb-check-row.is-selected { border-color: var(--primary); background: var(--primary-tint); }
.stvb-check-row input { width: 17px; height: 17px; accent-color: var(--primary); flex-shrink: 0; }
.stvb-check-row .stvb-check-icon {
	width: 32px; height: 32px; border-radius: 50%; background: var(--primary-tint);
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stvb-check-row .stvb-check-icon svg { width: 16px; height: 16px; stroke: var(--primary); }
.stvb-check-row .stvb-check-label { flex: 1; font-size: 14px; }
.stvb-check-row .stvb-check-price { color: var(--primary); font-weight: 600; font-size: 13.5px; }

/* ---------------- Contact form ---------------- */

.stvb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }
.stvb-form-grid .stvb-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .stvb-form-grid { grid-template-columns: 1fr; } }

.stvb-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.stvb-field input, .stvb-field textarea {
	width: 100%; border: 1px solid var(--border); border-radius: 8px;
	padding: 11px 13px; font-size: 14px; font-family: var(--font-body); color: var(--ink);
	background: var(--card);
}
.stvb-field input:focus, .stvb-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.stvb-field textarea { resize: vertical; min-height: 80px; }
.stvb-field.has-error input, .stvb-field.has-error textarea { border-color: var(--full); }
.stvb-field-error { color: var(--full); font-size: 12px; margin-top: 4px; display: none; }
.stvb-field.has-error .stvb-field-error { display: block; }

/* ---------------- Calendar ---------------- */

.stvb-schedule { display: flex; gap: 28px; flex-wrap: wrap; }
.stvb-calendar { width: 300px; }
.stvb-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 600; font-family: var(--font-head); font-size: 14px; }
.stvb-cal-nav { background: none; border: 1px solid var(--border); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; color: var(--ink); }
.stvb-cal-nav:hover { border-color: var(--primary); color: var(--primary); }
.stvb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.stvb-cal-dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.stvb-cal-day {
	position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
	border-radius: 50%; font-size: 13px; cursor: pointer; border: 1px solid transparent;
}
.stvb-cal-day.is-blank { visibility: hidden; cursor: default; }
.stvb-cal-day.is-disabled { color: var(--border); cursor: not-allowed; }
.stvb-cal-day.is-full { color: var(--full); cursor: not-allowed; text-decoration: line-through; }
.stvb-cal-day.is-partial::after {
	content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--partial);
}
.stvb-cal-day:not(.is-disabled):not(.is-blank):not(.is-full):hover { border-color: var(--primary); }
.stvb-cal-day.is-selected { background: var(--primary); color: #fff; }
.stvb-cal-day.is-selected::after { background: #fff; }

.stvb-cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.stvb-cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stvb-cal-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.stvb-cal-legend .dot-partial { background: var(--partial); }
.stvb-cal-legend .dot-full { background: var(--full); }

.stvb-time-select { min-width: 220px; }
.stvb-time-select label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.stvb-time-select select {
	width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px;
	font-size: 14px; font-family: var(--font-body); background: var(--card); color: var(--ink);
}
.stvb-time-select select:focus { outline: none; border-color: var(--primary); }

/* ---------------- Buttons & nav ---------------- */

.stvb-nav { display: flex; justify-content: space-between; margin-top: 28px; gap: 12px; }
.stvb-btn {
	font-family: var(--font-body); font-weight: 600; font-size: 14px;
	padding: 12px 22px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
	transition: background .15s ease, opacity .15s ease;
}
.stvb-btn-primary { background: var(--primary); color: #fff; }
.stvb-btn-primary:hover { background: var(--primary-dark); }
.stvb-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.stvb-btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.stvb-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------- Result / confirmation state ---------------- */

.stvb-result { text-align: center; padding: 40px 10px; }
.stvb-result-icon {
	width: 64px; height: 64px; border-radius: 50%; background: var(--primary-tint);
	display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.stvb-result-icon svg { width: 30px; height: 30px; stroke: var(--available); }
.stvb-result h2 { font-size: 20px; margin-bottom: 8px; }
.stvb-result p { color: var(--muted); font-size: 14.5px; }

.stvb-error-banner {
	background: #FCEBEA; color: var(--full); border: 1px solid #F3C9C5;
	padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px;
}

.stvb-loading { text-align: center; padding: 60px 0; color: var(--muted); font-size: 14px; }
