/*
 * Join (join.php) and first sign-in (welcome.php) wizards, on the sign-in page design (css/login.css).
 * One question per step: a progress bar, the step, then Back / Next. Choice cards stand in for radio buttons.
 */

.dh-wiz-card { max-width: 480px; }
.dh-login-page [hidden] { display: none !important; }

.dh-wiz-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.dh-wiz-progress-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--dh-line); overflow: hidden; }
.dh-wiz-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--dh-leaf); transition: width .3s ease; }
.dh-wiz-progress-text { color: var(--dh-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }

.dh-wiz-step { display: none; }
.dh-wiz-step.is-current { display: grid; gap: 20px; animation: dh-wiz-in .25s ease; }
@keyframes dh-wiz-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .dh-wiz-step.is-current { animation-name: dh-wiz-in-rtl; }
@keyframes dh-wiz-in-rtl { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

.dh-wiz-title { margin: 0; color: var(--dh-ink); font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 400; line-height: 1.2; letter-spacing: -.01em; }
.dh-wiz-lead { margin: -8px 0 0; color: var(--dh-muted); font-size: 15.5px; line-height: 1.55; }
.dh-wiz-hint { margin: -10px 0 0; color: var(--dh-muted); font-size: 13.5px; line-height: 1.5; }
.dh-wiz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .dh-wiz-row { grid-template-columns: 1fr; } }

/* Inputs without an icon, selects and the phone field with its country code. */
.dh-field-control.is-plain input { padding-left: 17px; }
.dh-field-control select,
.dh-wiz-select {
	width: 100%;
	height: 56px;
	padding: 0 40px 0 16px;
	border: 1px solid var(--dh-line);
	border-radius: 14px;
	outline: none;
	color: var(--dh-ink);
	background: rgba(255, 255, 255, .88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2382908c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
	font: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}
.dh-wiz-select:focus,
.dh-field-control select:focus { border-color: var(--dh-leaf); background-color: #fff; box-shadow: 0 0 0 4px rgba(34, 116, 93, .1); }
.dh-wiz-phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.dh-wiz-phone .dh-field-control input { padding-left: 17px; }

/* Choice cards (radio inputs). */
.dh-wiz-choices { display: grid; gap: 10px; }
.dh-wiz-choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--dh-line); border-radius: 14px; background: rgba(255, 255, 255, .88); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.dh-wiz-choice input { position: absolute; opacity: 0; pointer-events: none; }
.dh-wiz-choice-mark { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid #b6c2be; border-radius: 50%; transition: border .15s ease; }
.dh-wiz-choice-body { display: grid; gap: 2px; min-width: 0; }
.dh-wiz-choice-body strong { font-size: 15.5px; color: var(--dh-ink); }
.dh-wiz-choice-body small { color: var(--dh-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.dh-wiz-choice:hover { border-color: #b9c9c3; }
.dh-wiz-choice:has(input:checked) { border-color: var(--dh-leaf); background: #f1f8f4; box-shadow: 0 0 0 3px rgba(34, 116, 93, .1); }
.dh-wiz-choice:has(input:checked) .dh-wiz-choice-mark { border: 7px solid var(--dh-leaf); }
.dh-wiz-choice:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(34, 116, 93, .25); }
.dh-wiz-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.dh-wiz-choice-extra { margin-top: -2px; }

.dh-wiz-check { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13.5px; font-weight: 600; }
.dh-wiz-check.is-ok { color: var(--dh-leaf); }
.dh-wiz-check.is-bad { color: var(--dh-danger); }

/* Footer: Back (text) and Next (the main button). */
.dh-wiz-nav { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.dh-wiz-nav .dh-signin-button { flex: 1; margin-top: 0; }
.dh-wiz-back { flex: 0 0 auto; min-width: 88px; height: 58px; padding: 0 16px; border: 1px solid var(--dh-line); border-radius: 14px; color: var(--dh-ink); background: #fff; font-weight: 700; cursor: pointer; }
.dh-wiz-back:hover { border-color: #b9c9c3; }
.dh-wiz-back[hidden] { display: none; }
.dh-wiz-error { margin: 0; padding: 12px 14px; border: 1px solid rgba(166, 62, 53, .2); border-radius: 12px; color: #7d2c25; background: #fbeeec; font-size: 14px; line-height: 1.45; }
.dh-wiz-error[hidden] { display: none; }
.dh-wiz-error a { color: inherit; font-weight: 700; }
.dh-wiz-alt { margin: 22px 0 0; color: var(--dh-muted); font-size: 14.5px; text-align: center; }
.dh-wiz-alt a { color: var(--dh-leaf); font-weight: 700; text-decoration: none; }
.dh-wiz-alt a:hover { text-decoration: underline; }
.dh-wiz-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Finish screens. */
.dh-wiz-done { display: grid; justify-items: center; gap: 14px; padding: 6px 0; text-align: center; }
.dh-wiz-done-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; color: var(--dh-forest-deep); background: var(--dh-lime); }
.dh-wiz-done-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dh-wiz-summary { width: 100%; margin: 4px 0; padding: 14px 16px; border: 1px solid var(--dh-line); border-radius: 14px; background: #fff; text-align: left; }
.dh-wiz-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.dh-wiz-summary div + div { border-top: 1px solid var(--dh-line); }
.dh-wiz-summary span { color: var(--dh-muted); }
.dh-wiz-summary strong { overflow-wrap: anywhere; text-align: right; }

/* Privacy policy: a reading box. */
.dh-wiz-policy { max-height: min(46vh, 420px); overflow-y: auto; padding: 4px 18px 10px; border: 1px solid var(--dh-line); border-radius: 14px; background: #fff; font-size: 14.5px; line-height: 1.6; color: #2b3835; overscroll-behavior: contain; }
.dh-wiz-policy h3 { margin: 18px 0 6px; font-size: 15.5px; color: var(--dh-forest); }
.dh-wiz-policy ul { margin: 6px 0; padding-left: 20px; }
.dh-wiz-policy li { margin: 3px 0; }
.dh-wiz-agree { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--dh-line); border-radius: 14px; background: #fff; font-size: 15px; line-height: 1.45; cursor: pointer; }
.dh-wiz-agree input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--dh-leaf); }

/* Center picker. */
.dh-wiz-near { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 1px dashed #a9bcb5; border-radius: 14px; color: var(--dh-leaf); background: #f6faf8; font-weight: 700; cursor: pointer; }
.dh-wiz-near svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dh-wiz-centres { display: grid; gap: 10px; max-height: min(48vh, 440px); overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.dh-wiz-centres .dh-wiz-choice-body small { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dh-wiz-subhead { margin: 8px 2px 0; color: var(--dh-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dh-wiz-distance { color: var(--dh-leaf); font-weight: 700; }
.dh-wiz-empty { padding: 16px; border: 1px dashed var(--dh-line); border-radius: 14px; color: var(--dh-muted); font-size: 14.5px; line-height: 1.5; text-align: center; }

/* Password strength (welcome.php). */
.dh-wiz-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dh-wiz-meter span { height: 5px; border-radius: 99px; background: var(--dh-line); transition: background .2s ease; }
.dh-wiz-meter[data-level="1"] span:nth-child(-n+1) { background: #c0563f; }
.dh-wiz-meter[data-level="2"] span:nth-child(-n+2) { background: #d39a2a; }
.dh-wiz-meter[data-level="3"] span:nth-child(-n+3) { background: #5d9a52; }
.dh-wiz-meter[data-level="4"] span { background: var(--dh-leaf); }

@media (prefers-reduced-motion: reduce) {
	.dh-wiz-step.is-current { animation: none; }
	.dh-wiz-progress-bar span { transition: none; }
}
