/* TechMich Offerte Wizard — Frontend Stijlen */

/* ── CSS Custom Properties (kleurthema's) ──────────────────────────────────
   Overschrijf deze variabelen via data-theme of inline style om het thema
   aan te passen zonder de plugin CSS te wijzigen.
   ────────────────────────────────────────────────────────────────────────── */

.tmof-wizard-wrap {
	/* Standaard: lichte achtergrond, donkere tekst */
	--tmof-title:         #1a1a2e;
	--tmof-subtitle:      #555555;
	--tmof-step-title:    #111827;
	--tmof-label:         #374151;
	--tmof-progress-bg:   #e5e7eb;
	--tmof-dot-bg:        #e5e7eb;
	--tmof-dot-color:     #6b7280;
	--tmof-prev-bg:       #f3f4f6;
	--tmof-prev-color:    #374151;
	--tmof-prev-border:   #d1d5db;
	--tmof-success-color: #374151;

	max-width: 680px;
	margin: 0 auto;
	font-family: inherit;
}

/* ── Donker thema: witte tekst op gekleurde/donkere achtergrond ─────────── */

.tmof-wizard-wrap[data-theme="dark"] {
	--tmof-title:         #ffffff;
	--tmof-subtitle:      rgba(255, 255, 255, 0.82);
	--tmof-step-title:    #ffffff;
	--tmof-label:         #ffffff;
	--tmof-progress-bg:   rgba(255, 255, 255, 0.28);
	--tmof-dot-bg:        rgba(255, 255, 255, 0.22);
	--tmof-dot-color:     rgba(255, 255, 255, 0.75);
	--tmof-prev-bg:       rgba(255, 255, 255, 0.12);
	--tmof-prev-color:    #ffffff;
	--tmof-prev-border:   rgba(255, 255, 255, 0.4);
	--tmof-success-color: #ffffff;
}

/* Expliciete selectors — winnen van WordPress-theme stijlen (h3, p, label…) */
.tmof-wizard-wrap[data-theme="dark"] .tmof-wizard-title   { color: #ffffff !important; }
.tmof-wizard-wrap[data-theme="dark"] .tmof-wizard-subtitle { color: rgba(255,255,255,0.82) !important; }
.tmof-wizard-wrap[data-theme="dark"] .tmof-step-title     { color: #ffffff !important; }
.tmof-wizard-wrap[data-theme="dark"] .tmof-label          { color: #ffffff !important; }
.tmof-wizard-wrap[data-theme="dark"] .tmof-success-message { color: #ffffff !important; }
.tmof-wizard-wrap[data-theme="dark"] .tmof-required       { color: #fca5a5 !important; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.tmof-wizard-header {
	text-align: center;
	margin-bottom: 28px;
}

.tmof-wizard-title {
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--tmof-title);
}

.tmof-wizard-subtitle {
	font-size: 1rem;
	color: var(--tmof-subtitle);
	margin: 0;
}

/* ── Voortgangsbalk ──────────────────────────────────────────────────────── */

.tmof-progress-wrap {
	margin-bottom: 32px;
}

.tmof-progress-bar {
	height: 6px;
	background: var(--tmof-progress-bg);
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 12px;
}

.tmof-progress-fill {
	height: 100%;
	background: #2563eb;
	border-radius: 99px;
	transition: width 0.35s ease;
	width: 0%;
}

.tmof-steps-indicator {
	display: flex;
	justify-content: center;
	gap: 8px;
}

.tmof-step-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tmof-dot-bg);
	color: var(--tmof-dot-color);
	font-size: 0.75rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
}

.tmof-step-dot.active {
	background: #2563eb;
	color: #fff;
}

.tmof-step-dot.done {
	background: #16a34a;
	color: #fff;
}

/* ── Formulierstap ───────────────────────────────────────────────────────── */

.tmof-step-title {
	font-size: 1.2rem;
	font-weight: 600;
	margin: 0 0 20px;
	color: var(--tmof-step-title);
}

/* ── Veld ────────────────────────────────────────────────────────────────── */

.tmof-field-wrap {
	margin-bottom: 20px;
}

.tmof-label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--tmof-label);
	font-size: 0.95rem;
}

.tmof-required {
	color: #dc2626;
	margin-left: 2px;
}

/* ── Input ───────────────────────────────────────────────────────────────── */

.tmof-input {
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	font-size: 1rem;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
	outline: none;
	appearance: none;
}

.tmof-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tmof-input.tmof-error {
	border-color: #dc2626;
}

.tmof-textarea {
	resize: vertical;
	min-height: 100px;
}

/* Input met achtervoegsel */
.tmof-input-wrap {
	position: relative;
}

.tmof-input-wrap.has-suffix .tmof-input {
	padding-right: 52px;
}

.tmof-suffix {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #6b7280;
	font-size: 0.95rem;
	pointer-events: none;
}

/* ── Radio & Checkbox ────────────────────────────────────────────────────── */

.tmof-options-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tmof-options-wrap.tmof-error .tmof-option-label {
	color: #dc2626;
}

.tmof-option-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 2px solid #d1d5db;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	font-size: 0.95rem;
	background: #fff;
	color: #111827;
}

.tmof-option-label:hover {
	border-color: #2563eb;
	background: #eff6ff;
}

.tmof-option-label input[type="radio"],
.tmof-option-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #2563eb;
	flex-shrink: 0;
}

.tmof-option-label:has(input:checked) {
	border-color: #2563eb;
	background: #eff6ff;
}

/* ── Bestand upload ──────────────────────────────────────────────────────── */

.tmof-file-wrap {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tmof-file-input {
	display: none;
}

.tmof-file-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	cursor: pointer;
	background: #fff;
	color: #374151;
	font-size: 0.95rem;
	transition: border-color 0.2s, background 0.2s;
}

.tmof-file-label:hover {
	border-color: #2563eb;
	background: #eff6ff;
}

.tmof-file-icon {
	font-size: 1.2rem;
}

.tmof-file-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tmof-file-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 0.8rem;
	color: #555;
	max-width: 120px;
	word-break: break-all;
	text-align: center;
}

.tmof-file-item img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
}

/* ── Herhaal-velden ──────────────────────────────────────────────────────── */

.tmof-repeat-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tmof-repeat-item {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 12px 14px;
}

.tmof-repeat-label {
	display: block;
	font-weight: 600;
	font-size: 0.88rem;
	color: #6b7280;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Op donkere achtergrond */
.tmof-wizard-wrap[data-theme="dark"] .tmof-repeat-item {
	background: rgba(255,255,255,0.08);
	border-color: rgba(255,255,255,0.15);
}

.tmof-wizard-wrap[data-theme="dark"] .tmof-repeat-label {
	color: rgba(255,255,255,0.65);
}

/* ── Foutmelding ─────────────────────────────────────────────────────────── */

.tmof-field-error {
	display: block;
	color: #dc2626;
	font-size: 0.85rem;
	margin-top: 4px;
	min-height: 1.2em;
}

/* ── Navigatieknoppen ────────────────────────────────────────────────────── */

.tmof-nav {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	align-items: center;
}

.tmof-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: background 0.2s, opacity 0.2s, border-color 0.2s;
	line-height: 1;
}

.tmof-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tmof-btn-primary {
	background: #2563eb;
	color: #fff;
}

.tmof-btn-primary:hover:not(:disabled) {
	background: #1d4ed8;
}

/* "Vorige" knop past zich aan het thema aan */
.tmof-btn-secondary {
	background: var(--tmof-prev-bg);
	color: var(--tmof-prev-color);
	border: 2px solid var(--tmof-prev-border);
}

.tmof-btn-secondary:hover:not(:disabled) {
	filter: brightness(0.93);
}

/* ── Succesmelding ───────────────────────────────────────────────────────── */

.tmof-success {
	text-align: center;
	padding: 40px 20px;
}

.tmof-success-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #16a34a;
	color: #fff;
	font-size: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.tmof-success-message {
	font-size: 1.1rem;
	color: var(--tmof-success-color);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.tmof-wizard-title { font-size: 1.3rem; }
	.tmof-btn { padding: 10px 18px; font-size: 0.9rem; }
}
