/**
 * TCM Registration Wizard — Styles
 *
 * CSS Guidelines:
 * - Grid first, Flexbox only for icon+text, button groups, centering
 * - All values from design tokens (CSS custom properties)
 * - BEM naming with tcm-ev-reg prefix
 * - Mobile-first responsive (WordPress)
 * - Min font size: 16px / Body: 18px (Spec §A2 — funnel-kritische Lesbarkeit,
 *   überstimmt den globalen 14px-Token aus README §Design-Tokens)
 */

/* ==========================================================================
   0. Wizard Design-Tokens (override globaler 14px-Min, Spec §A2)
   ========================================================================== */
body.tcm-expertenverzeichnis {
	--tcm-reg-font-size-min: 16px;   /* Hints, Optionals, Sekundär-Labels, Errors */
	--tcm-reg-font-size-base: 18px;  /* Inputs, Selects, Textareas, Body */
	--tcm-reg-checkbox-size: 22px;   /* ~×2 vom Browser-Default 13px */
}

/* ==========================================================================
   1. Layout
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg {
	display: grid;
	gap: var(--tcm-spacing-xl, 32px);
	max-width: 640px;
	margin: 0 auto;
	padding: var(--tcm-spacing-xl, 32px) var(--tcm-spacing-md, 16px);
	font-family: var(--tcm-font-body, 'Montserrat', sans-serif);
}

/* ==========================================================================
   2. Header
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__header {
	text-align: center;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__title {
	font-family: var(--tcm-font-heading, 'Ibarra Real Nova', serif);
	font-size: 28px;
	font-weight: 700;
	color: var(--tcm-color-text-dark, #000A0D);
	margin: 0 0 8px;
	line-height: 1.3;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__subtitle {
	font-size: 16px;
	color: var(--tcm-gray-cool-500, #6B7A88);
	margin: 0;
}

/* ==========================================================================
   3. Stepper
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	position: relative;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: var(--tcm-reg-font-size-min);
	font-weight: 700;
	background: #E5E7EB;
	color: var(--tcm-gray-cool-500, #6B7A88);
	transition: background 200ms ease, color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step--active .tcm-ev-reg__step-circle {
	background: var(--tcm-color-primary, #177E89);
	color: var(--tcm-color-white, #fff);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step--done .tcm-ev-reg__step-circle {
	background: #10B981;
	color: var(--tcm-color-white, #fff);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step-label {
	font-size: var(--tcm-reg-font-size-min);
	color: var(--tcm-gray-cool-500, #6B7A88);
	white-space: nowrap;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step--active .tcm-ev-reg__step-label {
	color: var(--tcm-color-primary, #177E89);
	font-weight: 600;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step--done .tcm-ev-reg__step-label {
	color: #10B981;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step-line {
	flex: 1;
	height: 2px;
	background: #E5E7EB;
	min-width: 32px;
	max-width: 80px;
	margin: 0 8px;
	margin-bottom: 22px;
	transition: background 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__step-line--done {
	background: #10B981;
}

/* ==========================================================================
   4. Card (Form Container)
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__panel {
	display: none;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__panel--active {
	display: block;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card {
	background: var(--tcm-color-white, #fff);
	border: 1px solid #D0D5DA;
	border-radius: 12px;
	overflow: hidden;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-header {
	padding: 24px 24px 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-title {
	font-family: var(--tcm-font-heading, 'Ibarra Real Nova', serif);
	font-size: 22px;
	font-weight: 700;
	color: var(--tcm-color-text-dark, #000A0D);
	margin: 0 0 4px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-desc {
	font-size: var(--tcm-reg-font-size-min);
	color: var(--tcm-gray-cool-500, #6B7A88);
	margin: 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-body {
	display: grid;
	gap: 20px;
	padding: 24px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-body--center {
	justify-items: center;
	text-align: center;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-footer {
	padding: 16px 24px 24px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__card-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

/* ==========================================================================
   5. Form Fields
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__row {
	display: grid;
	gap: 16px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__row--2col {
	grid-template-columns: 1fr 1fr;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__row--zip-city {
	grid-template-columns: 150px 1fr;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__field {
	display: grid;
	gap: 6px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__label {
	font-size: var(--tcm-reg-font-size-min);
	font-weight: 600;
	color: var(--tcm-color-text-dark, #000A0D);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__required {
	color: var(--tcm-color-secondary, #DB3A34);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__optional {
	font-weight: 400;
	color: var(--tcm-gray-cool-500, #6B7A88);
	font-size: var(--tcm-reg-font-size-min);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__input,
body.tcm-expertenverzeichnis .tcm-ev-reg__select,
body.tcm-expertenverzeichnis .tcm-ev-reg__textarea {
	font-family: inherit;
	font-size: var(--tcm-reg-font-size-base);
	padding: 10px 14px;
	border: 1px solid var(--tcm-color-border, #ABB8C3);
	border-radius: 6px;
	background: var(--tcm-color-white, #fff);
	color: var(--tcm-color-text-dark, #000A0D);
	width: 100%;
	box-sizing: border-box;
	transition: border-color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__input:focus,
body.tcm-expertenverzeichnis .tcm-ev-reg__select:focus,
body.tcm-expertenverzeichnis .tcm-ev-reg__textarea:focus {
	outline: none;
	border-color: var(--tcm-color-primary, #177E89);
	box-shadow: 0 0 0 3px rgba(23, 126, 137, 0.1);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__input--error {
	border-color: var(--tcm-color-error, #EF4444);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__textarea {
	resize: vertical;
	min-height: 100px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__textarea--sm {
	min-height: 80px;
}

/* Password eye toggle */
body.tcm-expertenverzeichnis .tcm-ev-reg__input-wrap {
	position: relative;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__input-wrap .tcm-ev-reg__input {
	padding-right: 44px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__eye-btn {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--tcm-gray-cool-500, #6B7A88);
	line-height: 1;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__eye-btn:hover {
	color: var(--tcm-color-text-dark, #000A0D);
}

/* Checkbox — vergrößerte Touch-Targets, ≥16px Schrift (Spec §A2) */
body.tcm-expertenverzeichnis .tcm-ev-reg__checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: var(--tcm-reg-font-size-min);
	line-height: 1.5;
	color: var(--tcm-color-text-dark, #000A0D);
	cursor: pointer;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__checkbox {
	width: var(--tcm-reg-checkbox-size);
	height: var(--tcm-reg-checkbox-size);
	flex-shrink: 0;
	margin-top: 2px;
	accent-color: var(--tcm-color-primary, #177E89);
	cursor: pointer;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__checkbox-label a {
	color: var(--tcm-color-primary, #177E89);
	text-decoration: underline;
}

/* ==========================================================================
   6. Chips (Specializations)
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	font-size: var(--tcm-reg-font-size-min);
	font-family: inherit;
	border: 1px solid var(--tcm-color-border, #ABB8C3);
	border-radius: 9999px;
	background: var(--tcm-color-white, #fff);
	color: var(--tcm-color-text-dark, #000A0D);
	cursor: pointer;
	transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__chip:hover {
	border-color: var(--tcm-color-primary, #177E89);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__chip--active {
	background: var(--tcm-color-primary-light, #E8F4F5);
	border-color: var(--tcm-color-primary, #177E89);
	color: var(--tcm-color-primary, #177E89);
	font-weight: 600;
}

/* ==========================================================================
   7. Tags Input (Languages)
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border: 1px solid var(--tcm-color-border, #ABB8C3);
	border-radius: 6px;
	background: var(--tcm-color-white, #fff);
	min-height: 42px;
	cursor: text;
	transition: border-color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__tags:focus-within {
	border-color: var(--tcm-color-primary, #177E89);
	box-shadow: 0 0 0 3px rgba(23, 126, 137, 0.1);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	font-size: var(--tcm-reg-font-size-min);
	background: var(--tcm-color-primary-light, #E8F4F5);
	color: var(--tcm-color-primary, #177E89);
	border-radius: 4px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__tag-remove {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: inherit;
	line-height: 1;
	font-size: 16px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__tags-input {
	flex: 1;
	min-width: 120px;
	border: none;
	outline: none;
	font-size: 16px;
	font-family: inherit;
	padding: 4px 0;
	background: transparent;
	color: var(--tcm-color-text-dark, #000A0D);
}

/* ==========================================================================
   8. Photo Upload
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__upload {
	position: relative;
	border: 2px dashed var(--tcm-color-border, #ABB8C3);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload--dragover {
	border-color: var(--tcm-color-primary, #177E89);
	background: var(--tcm-color-primary-light, #E8F4F5);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 32px;
	color: var(--tcm-gray-cool-500, #6B7A88);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-text {
	font-size: var(--tcm-reg-font-size-min);
	font-weight: 600;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-hint {
	font-size: var(--tcm-reg-font-size-min);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-preview {
	position: relative;
	display: flex;
	justify-content: center;
	padding: 16px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-preview img {
	max-width: 160px;
	max-height: 160px;
	border-radius: 8px;
	object-fit: cover;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tcm-color-white, #fff);
	border: 1px solid var(--tcm-color-border, #ABB8C3);
	cursor: pointer;
	color: var(--tcm-gray-cool-500, #6B7A88);
	transition: color 200ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__upload-remove:hover {
	color: var(--tcm-color-error, #EF4444);
}

/* ==========================================================================
   9. Buttons
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	border-radius: 8px;
	cursor: pointer;
	transition: background 200ms ease, opacity 200ms ease;
	text-decoration: none;
	line-height: 1.2;
	border: none;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__btn--primary {
	background: var(--tcm-color-primary, #177E89);
	color: var(--tcm-color-white, #fff);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__btn--primary:hover {
	background: var(--tcm-color-primary-dark, #0A6570);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__btn--ghost {
	background: var(--tcm-color-white, #fff);
	color: var(--tcm-color-text-dark, #000A0D);
	border: 1px solid var(--tcm-color-border, #ABB8C3);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__btn--ghost:hover {
	background: var(--tcm-gray-cool-50, #F8FAFB);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__btn--loading {
	opacity: 0.7;
	pointer-events: none;
}

/* ==========================================================================
   10. Error Message
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__error {
	color: var(--tcm-color-error, #EF4444);
	font-size: var(--tcm-reg-font-size-min);
	min-height: 0;
	margin-bottom: 8px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__error:empty {
	display: none;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__error a {
	color: var(--tcm-color-primary, #177E89);
	text-decoration: underline;
	font-weight: 600;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__error a:hover {
	color: var(--tcm-color-primary-dark, #0A6570);
}

/* ==========================================================================
   11. Success Step
   ========================================================================== */

body.tcm-expertenverzeichnis .tcm-ev-reg__card--success {
	border-color: #10B981;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #ECFDF5;
	color: #10B981;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__success-title {
	font-family: var(--tcm-font-heading, 'Ibarra Real Nova', serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--tcm-color-text-dark, #000A0D);
	margin: 8px 0 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__success-text {
	font-size: 16px;
	color: var(--tcm-gray-cool-500, #6B7A88);
	margin: 0 0 8px;
	max-width: 480px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__info-box {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	text-align: left;
	background: #FFFBEB;
	border: 1px solid #FDE68A;
	border-radius: 8px;
	padding: 16px;
	margin-top: 16px;
	color: #92400E;
	font-size: var(--tcm-reg-font-size-min);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__info-box svg {
	flex-shrink: 0;
	margin-top: 2px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__info-box strong {
	display: block;
	margin-bottom: 4px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__info-box p {
	margin: 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__photo-warning {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: 8px;
	padding: 12px 16px;
	margin: 12px 0 0;
	color: var(--tcm-color-error, #EF4444);
	font-size: var(--tcm-reg-font-size-min);
	text-align: left;
}

/* §A6 Verify-Hint Box (Step 4) — visuell zwischen Erfolg und Login-Button */
body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 12px;
	align-items: start;
	text-align: left;
	background: #E0F2FE;
	border: 1px solid #BAE6FD;
	border-radius: 8px;
	padding: 16px;
	margin: 16px 0;
	color: #075985;
	font-size: var(--tcm-reg-font-size-min);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint-icon {
	margin-top: 2px;
	flex-shrink: 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint-body {
	display: grid;
	gap: 8px;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint-title {
	font-weight: 700;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint-text {
	margin: 0;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-resend {
	justify-self: start;
	background: var(--tcm-color-primary, #177E89);
	color: var(--tcm-color-white, #fff);
	border: none;
	border-radius: 6px;
	padding: 8px 16px;
	font-family: inherit;
	font-size: var(--tcm-reg-font-size-min);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 150ms ease;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-resend:hover:not([disabled]) {
	background: #0A6570;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-resend[disabled] {
	background: var(--tcm-color-border, #ABB8C3);
	cursor: not-allowed;
	opacity: 0.7;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-status {
	margin: 0;
	font-size: var(--tcm-reg-font-size-min);
	min-height: 1em;
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-status--success {
	color: var(--tcm-color-success, #22C55E);
}

body.tcm-expertenverzeichnis .tcm-ev-reg__verify-status--error {
	color: var(--tcm-color-error, #EF4444);
}

/* ==========================================================================
   12. Responsive
   ========================================================================== */

@media (max-width: 767px) {
	body.tcm-expertenverzeichnis .tcm-ev-reg {
		padding: var(--tcm-spacing-lg, 24px) var(--tcm-spacing-sm, 8px);
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__title {
		font-size: 22px;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__row--2col {
		grid-template-columns: 1fr;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__row--zip-city {
		grid-template-columns: 120px 1fr;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__card-header,

	body.tcm-expertenverzeichnis .tcm-ev-reg__card-body,

	body.tcm-expertenverzeichnis .tcm-ev-reg__card-footer {
		padding-left: 16px;
		padding-right: 16px;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__card-actions {
		flex-direction: column-reverse;
		gap: 8px;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__btn {
		width: 100%;
		justify-content: center;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__step-label {
		display: none;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__step-line {
		margin-bottom: 0;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__info-box {
		flex-direction: column;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint {
		grid-template-columns: 1fr;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__verify-hint-icon {
		display: none;
	}

	body.tcm-expertenverzeichnis .tcm-ev-reg__verify-resend {
		justify-self: stretch;
		text-align: center;
	}
}

/* ==========================================================================
   Theme Override — Header spacing on plugin pages
   ========================================================================== */

body.tcm-expertenverzeichnis header.header {
	margin-bottom: var(--tcm-spacing-lg);
}
