/* Formular de programare Axa Optic — aliniat la macheta de referinta.
   Tokenii --brand-* vin din tema; fallback pentru folosire izolata. */

.appointment-form-card {
	--c-red: var(--brand-red, #b91c2c);
	--c-red-dark: var(--brand-red-dark, #8f1625);
	--c-ink: var(--brand-ink, #17222c);
	--c-green: var(--brand-green, #1f5a51);
	--c-border: var(--border, #dce4e3);

	background: #fff;
	border: 1px solid #dbe5e3;
	border-radius: 1.5rem;
	padding: clamp(1.5rem, 4vw, 3rem);
	box-shadow: 0 28px 80px rgb(36 68 63 / 10%);
}

.appointment-form-card .ao-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.appointment-form-card .form-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.6rem;
}
.appointment-form-card .form-heading h2 {
	margin: 0;
	font-family: var(--serif, Georgia, serif);
	font-size: 1.65rem;
	font-weight: 600;
}
.appointment-form-card .form-heading p { margin: 0; color: #647178; font-size: 0.8rem; }

.appointment-form-card .form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}
.appointment-form-card .form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.appointment-form-card .form-field-full { grid-column: 1 / -1; }

.appointment-form-card label,
.appointment-form-card .ao-legend,
.appointment-form-card legend {
	color: #26343c;
	font-size: 0.9rem;
	font-weight: 700;
}
.appointment-form-card label span,
.appointment-form-card legend span { color: #6a767c; font-weight: 500; }

.appointment-form-card input,
.appointment-form-card select,
.appointment-form-card textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.72rem 0.85rem;
	border: 1px solid #b9c7c4;
	border-radius: 0.7rem;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	color: var(--c-ink);
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.appointment-form-card textarea { min-height: 5.5rem; line-height: 1.55; resize: vertical; }
.appointment-form-card :where(input, select, textarea):focus {
	border-color: var(--c-red);
	outline: 3px solid rgb(185 28 44 / 14%);
	outline-offset: 1px;
}
.appointment-form-card [aria-invalid="true"] { border-color: var(--c-red); background: rgb(185 28 44 / 3%); }

.appointment-form-card .input-with-icon { position: relative; }
.appointment-form-card .input-with-icon .ao-icon {
	position: absolute;
	top: 50%;
	left: 0.8rem;
	translate: 0 -50%;
	width: 1rem;
	height: 1rem;
	color: var(--c-green);
	pointer-events: none;
}
.appointment-form-card .input-with-icon input { padding-left: 2.3rem; }

.appointment-form-card .ao-contact-method { margin-top: 1.4rem; }
.appointment-form-card .ao-segment { display: flex; gap: 0.5rem; margin-top: 0.15rem; }
.appointment-form-card .ao-segment label {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 3rem;
	padding-inline: 0.75rem;
	border: 1px solid #b9c7c4;
	border-radius: 0.7rem;
	font-weight: 600;
	cursor: pointer;
}
.appointment-form-card .ao-segment input { width: auto; min-height: 0; accent-color: var(--c-red); }
.appointment-form-card .ao-segment label:has(input:checked) {
	border-color: var(--c-red);
	background: rgb(185 28 44 / 5%);
	color: var(--c-red-dark);
}

.appointment-form-card .preference-fieldset {
	margin: 1.8rem 0;
	padding: 1.6rem 0;
	border: 0;
	border-top: 1px solid var(--c-border);
	border-bottom: 1px solid var(--c-border);
}
.appointment-form-card .preference-fieldset legend { padding: 0; }
.appointment-form-card .preference-fieldset > p { margin: 0.3rem 0 1.1rem; color: #647178; font-size: 0.8rem; }

.appointment-form-card .field-help { color: #5f6d73; font-size: 0.78rem; line-height: 1.45; }
.appointment-form-card .field-error { color: var(--c-red); font-size: 0.78rem; line-height: 1.45; }
.appointment-form-card .field-error:empty { display: none; }

.appointment-form-card .consent-field {
	display: grid;
	grid-template-columns: 1.2rem 1fr;
	align-items: start;
	gap: 0.75rem;
	margin-top: 1.5rem;
}
.appointment-form-card .consent-field input {
	width: 1.15rem;
	height: 1.15rem;
	min-height: 0;
	margin: 0.15rem 0 0;
	accent-color: var(--c-red);
}
.appointment-form-card .consent-field label { color: #38464d; font-size: 0.86rem; font-weight: 400; line-height: 1.55; }
.appointment-form-card .consent-help { margin: 0.35rem 0 0 1.95rem; }
.appointment-form-card .consent-error { display: block; margin: 0.35rem 0 0 1.95rem; }

.appointment-form-card .appointment-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 3.25rem;
	margin-top: 1.5rem;
	padding: 0.8rem 1.45rem;
	border: 0;
	border-radius: 999px;
	background: var(--c-red);
	color: #fff;
	font: inherit;
	font-size: 0.96rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.12s ease;
}
.appointment-form-card .appointment-submit:hover { background: var(--c-red-dark); }
.appointment-form-card .appointment-submit[disabled] { opacity: 0.55; cursor: progress; }
.appointment-form-card .appointment-submit .ao-icon { width: 1rem; height: 1rem; }

.appointment-form-card .ao-form-notice {
	margin-bottom: 1.5rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--c-border);
	border-radius: 0.7rem;
}
.appointment-form-card .ao-form-notice p { margin: 0.25rem 0; }
.appointment-form-card .ao-form-notice--ok { background: rgb(31 90 81 / 8%); border-color: rgb(31 90 81 / 35%); }
.appointment-form-card .ao-form-notice--error { background: rgb(185 28 44 / 6%); border-color: rgb(185 28 44 / 35%); }
.appointment-form-card .ao-form-ref { font-size: 0.9rem; }

.appointment-form-card .ao-form-live { margin-top: 1rem; font-size: 0.95rem; line-height: 1.5; }
.appointment-form-card .ao-form-live--ok { color: var(--c-green); font-weight: 700; }
.appointment-form-card .ao-form-live--error { color: var(--c-red); font-weight: 700; }
.appointment-form-card .ao-form-live--pending { color: #5f6d73; }

@media (max-width: 640px) {
	.appointment-form-card { border-radius: 1.1rem; padding: 1.35rem; }
	.appointment-form-card .form-heading { display: block; }
	.appointment-form-card .form-heading p { margin-top: 0.4rem; }
	.appointment-form-card .form-grid { grid-template-columns: 1fr; }
	.appointment-form-card .form-field-full { grid-column: auto; }
	.appointment-form-card .appointment-submit { width: 100%; }
}
