/* ============================================================
   REGISTRATION MODAL
   Only the pieces the four-step wizard adds on top of the
   frosted auth system in auth.css. Everything shared — fields,
   buttons, alerts, the panel itself — comes from there.

   This file used to carry unscoped `.modal-body`, `.form-control`
   and `.invalid-feedback` rules that applied to every modal on
   the front page. They are gone; nothing here escapes the wizard.
   ============================================================ */

/* ===========================
   STEP RAIL
   =========================== */
.reg-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 26px;
}

.reg-steps .step {
    position: relative;
    flex: 1;
    text-align: center;
}

.reg-steps .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: rgba(255, 255, 255, 0.20);
    transition: background 0.3s ease;
}

.reg-steps .step.completed::after {
    background: var(--auth-accent);
}

.reg-steps .step-circle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    border: 1.5px solid rgba(255, 255, 255, 0.26);
    color: #B9CDDE;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.reg-steps .step.active .step-circle {
    background: var(--auth-accent);
    border-color: rgba(34, 211, 238, 0.55);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

.reg-steps .step.completed .step-circle {
    background: rgba(14, 116, 144, 0.35);
    border-color: var(--auth-accent);
    color: #ffffff;
}

/* A finished step reads as a tick rather than as its own number. */
.reg-steps .step.completed .step-circle span {
    display: none;
}

.reg-steps .step.completed .step-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8125rem;
}

.reg-steps .step-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #9FBACF;
    transition: color 0.3s ease;
}

.reg-steps .step.active .step-label,
.reg-steps .step.completed .step-label {
    color: #F3F8FC;
}

/* ===========================
   STEP PANELS
   =========================== */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: regFadeIn 0.3s ease-in;
}

@keyframes regFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reg-step-title {
    margin: 0 0 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9FBACF;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

/* Year / Month / Day sit on one row. */
.reg-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.reg-grid-3 .auth-input {
    padding-left: 14px;
    padding-right: 34px;
    font-size: 0.84rem;
}

.reg-grid-3 select.auth-input {
    background-position: right 12px center;
}

.reg-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 480px) {
    .reg-grid-2 {
        grid-template-columns: 1fr;
    }

    .reg-steps .step-label {
        font-size: 0.6rem;
    }
}

/* ===========================
   PASSWORD STRENGTH
   =========================== */
.password-strength-meter {
    margin: -4px 0 6px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 14px 18px;
    min-height: 1em;
}

.password-strength-text.weak {
    color: #FF9B9B;
}

.password-strength-text.fair {
    color: #FFD27A;
}

.password-strength-text.strong {
    color: #8CE0B7;
}

/* ===========================
   STEP NAVIGATION
   =========================== */
.reg-nav {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* showStep() shows and hides these with an inline `display: block`, which wipes
   out .auth-btn's flex centering — so centre the content the block way too. */
.reg-nav .auth-btn,
.reg-nav .auth-btn-ghost {
    flex: 1;
    margin-top: 0;
    min-width: 0;
    text-align: center;
}

/* Previous is hidden on step one, so Next takes the full width on its own. */
.reg-nav .auth-btn-ghost {
    padding: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .form-step.active {
        animation: none;
    }

    .reg-steps .step::after,
    .reg-steps .step-circle,
    .reg-steps .step-label,
    .password-strength-bar {
        transition: none;
    }
}
