/*
 * Register page (redesign). Loaded after css/auth/login.css, which holds the shared
 * auth layout, card, fields and buttons. This file adds field errors and hints, the
 * password rules, the honeypot and the "Hoe het werkt" panel.
 */

/* ---------- Honeypot (RegisterForm.contact_reference) ---------- */
/* Off-screen rather than display:none, so simple bots still see and fill it. */
.contact_reference {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Field hints and errors ---------- */
.field__hint { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.field__error {
    color: var(--text-brand);
    font-weight: var(--font-weight-semibold);
    font-size: 13px;
    line-height: 1.5;
}
.field__input[aria-invalid="true"] { border-color: var(--text-brand-display); }
.field__match:empty { display: none; }
.field__match.is-match { color: var(--support-green-700); font-weight: var(--font-weight-semibold); }
.field__match.is-mismatch { color: var(--text-brand); font-weight: var(--font-weight-semibold); }

/* ---------- Password rules ---------- */
.rules { display: grid; grid-template-columns: 1fr; gap: 6px; padding-top: 2px; }
.rules__item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    transition: color .2s ease;
}
/* Small dot that becomes a green check once the rule is met. */
.rules__item::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle, var(--text-muted) 0 3px, transparent 3.5px);
    transition: background-color .2s ease;
}
.rules__item.is-met { color: var(--support-green-700); }
.rules__item.is-met::before {
    background:
        center / 10px 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.5 8.5 2.5' fill='none' stroke='%2315803d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
        var(--support-green-100);
}
@media (min-width: 480px) {
    .rules { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

/* ---------- Legal line ---------- */
.auth-form__legal { color: var(--text-secondary); font-size: 13px; line-height: 1.5; text-align: center; }
.auth-form__legal a {
    color: var(--text-brand);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- "Hoe het werkt" panel ---------- */
/* Only shown next to the form on desktop; on smaller screens the form stays focused. */
.register-steps { display: none; }
@media (min-width: 1024px) {
    .register-steps {
        display: flex;
        flex-direction: column;
        gap: 16px;
        flex: 0 1 520px;
    }
}
.register-steps__title {
    color: var(--text-primary);
    font-weight: var(--font-weight-extrabold);
    font-size: 40px;
    line-height: 1.12;
    letter-spacing: -0.02em;
}
.register-steps__list { display: flex; flex-direction: column; gap: 24px; padding-top: 16px; }
.register-step { display: flex; align-items: flex-start; gap: 16px; }
.register-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    background: var(--bg-brand);
    color: var(--text-on-brand);
    font-weight: var(--font-weight-bold);
    font-size: 18px;
}
.register-step__title { color: var(--text-primary); font-weight: var(--font-weight-bold); font-size: 19px; line-height: 1.3; }
.register-step__body { margin-top: 4px; color: var(--text-secondary); font-size: 16px; line-height: 1.55; }
.register-steps__trust { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 16px; }
.register-steps__trust li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
}
.register-steps__trust svg { width: 18px; height: 18px; color: var(--support-green-700); }

@media (prefers-reduced-motion: no-preference) {
    .register-step { animation: auth-rise .6s cubic-bezier(.22, 1, .36, 1) both; }
    .register-step:nth-child(1) { animation-delay: .2s; }
    .register-step:nth-child(2) { animation-delay: .3s; }
    .register-step:nth-child(3) { animation-delay: .4s; }
}
