/* ==========================================================================
   Static forms (components/web/dz-form, web/forms/_field) and the request
   confirmation page. Builds on the wf-* primitives in site.css (field, label,
   control, error, summary) and the design tokens. Logical properties only.
   ========================================================================== */

.dz-form__title {
    margin: 0 0 var(--sp-6);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.dz-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-5) var(--sp-4);
}

.dz-form__field--full {
    grid-column: 1 / -1;
}

.dz-form .wf-field {
    margin: 0;
}

.dz-form .wf-label {
    margin-block-end: var(--sp-2);
    font-size: .8125rem;
}

.dz-form .wf-field .wf-control {
    border-radius: var(--radius-md);
}

.dz-form__submit {
    margin-block-start: var(--sp-6);
}

.dz-form__note {
    margin: var(--sp-4) 0 0;
    color: var(--ink-subtle);
    font-size: .8125rem;
    line-height: 1.5;
}

@media (max-width: 575.98px) {
    .dz-form__grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Option pills and cards (radio / checkboxes) ---------------------------------- */
.dz-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.dz-fieldset .wf-label {
    display: block;
    float: none;
    width: auto;
    padding: 0;
}

.dz-opts {
    display: grid;
    gap: var(--sp-3);
}

.dz-opts--pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dz-opts--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dz-opts--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
    .dz-opts--grid,
    .dz-opts--cards {
        grid-template-columns: 1fr;
    }
}

.dz-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--ui-line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink);
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.dz-opt:hover {
    border-color: var(--violet-300);
}

.dz-opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.dz-opt__mark {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    color: transparent;
    font-size: .5625rem;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.dz-opt:has(input[type="checkbox"]) .dz-opt__mark {
    border-radius: 6px;
}

.dz-opt:has(input:checked) {
    border-color: var(--action);
    background: var(--violet-50);
    box-shadow: 0 0 0 1px var(--action);
}

.dz-opt:has(input:checked) .dz-opt__mark {
    border-color: var(--action);
    background: var(--action);
    color: #fff;
}

.dz-opt:has(input:focus-visible) {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: 2px;
}

.dz-opts--cards .dz-opt {
    padding: var(--sp-5);
    font-weight: 600;
}

.dz-fieldset--cards .wf-label {
    margin-block-end: var(--sp-4);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
}

/* ---- Consent / single checkbox ------------------------------------------------------ */
.dz-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    color: var(--ink-muted);
    font-size: .875rem;
    line-height: 1.5;
    cursor: pointer;
}

.dz-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.dz-check__box {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    margin-block-start: 2px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: var(--surface);
    color: transparent;
    font-size: .625rem;
}

.dz-check input:checked + .dz-check__box {
    border-color: var(--action);
    background: var(--action);
    color: #fff;
}

.dz-check input:focus-visible + .dz-check__box {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: 2px;
}

.dz-form .has-error .dz-check__box {
    border-color: var(--danger);
}

/* ---- Upload ------------------------------------------------------------------------------ */
.dz-upload {
    position: relative;
    display: block;
    cursor: pointer;
}

.dz-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.dz-upload__box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    padding: var(--sp-5);
    border: 1.5px dashed var(--violet-300);
    border-radius: var(--radius-md);
    background: var(--violet-50);
    color: var(--action);
    font-size: .9375rem;
    font-weight: 600;
    text-align: center;
}

.dz-upload:hover .dz-upload__box {
    background: var(--violet-100);
}

.dz-upload input:focus-visible + .dz-upload__box {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: 2px;
}

.dz-upload__names {
    display: block;
    margin-block-start: var(--sp-2);
    color: var(--ink-muted);
    font-size: .8125rem;
    overflow-wrap: anywhere;
}

.dz-upload + .wf-label,
.dz-form .wf-label + .dz-upload {
    margin-block-start: 0;
}

/* ---- Wizard (Start Your Journey) ----------------------------------------------------------- */
.dz-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
    margin: 0 0 var(--sp-8);
    padding: 0;
    list-style: none;
}

.dz-stepper__bar {
    display: block;
    height: 6px;
    margin-block-end: var(--sp-3);
    border-radius: 3px;
    background: var(--surface-muted);
    transition: background-color var(--dur) var(--ease-out);
}

.dz-stepper__item.is-current .dz-stepper__bar,
.dz-stepper__item.is-done .dz-stepper__bar {
    background: var(--action);
}

.dz-stepper__label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--ink-subtle);
    font-size: .875rem;
    font-weight: 500;
}

.dz-stepper__item.is-current .dz-stepper__label {
    color: var(--ink);
}

.dz-stepper__num {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--ink-subtle);
    font-size: .75rem;
    font-weight: 600;
}

.dz-stepper__item.is-current .dz-stepper__num {
    background: var(--action);
    color: var(--on-action);
}

.dz-stepper__item.is-done .dz-stepper__num {
    background: #12b76a;
    color: #fff;
    font-size: 0;
}

.dz-stepper__item.is-done .dz-stepper__num::after {
    content: "\2713";
    font-size: .75rem;
}

.dz-form__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-block-start: var(--sp-8);
    padding-block-start: var(--sp-6);
    border-block-start: 1px solid var(--ui-line);
}

/* Without JavaScript every step is shown at once; only the final submit button is needed. */
html:not(.js) [data-dz-next],
html:not(.js) [data-dz-back],
html:not(.js) .dz-stepper {
    display: none;
}

/* ---- Request received (design 05 / 07) ------------------------------------------------------------ */
.dz-received {
    padding-block: clamp(2.5rem, 2rem + 4vw, 6.5rem);
    background:
        radial-gradient(42% 62% at 100% 32%, var(--violet-300), transparent 72%),
        linear-gradient(180deg, var(--violet-50) 0%, #fbfaff 100%);
}

[dir="rtl"] .dz-received {
    background:
        radial-gradient(42% 62% at 0% 32%, var(--violet-300), transparent 72%),
        linear-gradient(180deg, var(--violet-50) 0%, #fbfaff 100%);
}

.dz-received__inner {
    max-width: 58rem;
    text-align: center;
}

.dz-received__title {
    margin: 0 0 var(--sp-3);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: var(--tracking-tight);
}

.dz-received__subtitle {
    margin: 0 0 var(--sp-10);
    color: var(--ink-muted);
    font-size: var(--fs-lead);
}

.dz-received__card {
    margin-block-start: var(--sp-8);
    padding: clamp(2rem, 1.2rem + 3vw, 3rem) clamp(1.25rem, .5rem + 3vw, 3rem);
    border: 1px solid var(--violet-100);
    border-radius: 2rem;
    background: var(--surface);
    box-shadow: 0 24px 60px -24px rgba(41, 7, 121, .22);
}

.dz-received__check {
    display: inline-grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin-block-end: var(--sp-8);
    border-radius: 50%;
    background: #e9f8f0;
    color: #12b76a;
}

.dz-received__check svg {
    width: 44px;
    height: 44px;
}

.dz-received__message {
    max-width: 44rem;
    margin: 0 auto var(--sp-6);
    color: var(--ink);
    font-size: clamp(1.0625rem, .95rem + .5vw, 1.375rem);
    font-weight: 600;
    line-height: 1.5;
}

.dz-received__ref {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2) var(--sp-3);
    margin: 0 0 var(--sp-6);
    padding: var(--sp-4) var(--sp-6);
    border: 2px dashed var(--violet-300);
    border-radius: var(--radius-md);
    background: var(--violet-50);
    color: var(--ink-muted);
    font-size: 1.0625rem;
    font-weight: 500;
}

.dz-received__ref strong {
    color: var(--action);
    font-size: 1.125rem;
    letter-spacing: .03em;
}

.dz-received__card .dz-actions {
    margin-block-start: 0;
}

.dz-received__card .c-btn {
    min-height: 56px;
    padding-inline: var(--sp-8);
    border-radius: var(--radius-sm);
    font-size: 1.0625rem;
}
