/* ================================================================
   GRAVR Registration Wizard
   Design language mirrors the MyAccount pages (Personal.cshtml):
   onyx/black accent, soft white card, grav-input fields.
   Loaded ONLY on the wizard pages, so body-level rules are scoped
   to those pages and never leak to the rest of the app.
   ================================================================ */

:root {
    --grav-dark:   #000000;
    --grav-gray:   #64748b;
    --grav-light:  #f8fafc;
    --grav-border: #e2e8f0;
    --grav-danger: #dc3545;
}

body {
    background: linear-gradient(135deg, #fdfbfb, #ebedee);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, sans-serif;
    color: var(--grav-dark);
}

/* ---- Layout shell ---- */
.wizard-shell {
    max-width: 640px;
    margin: 0 auto 3rem;
}
.wizard-shell--wide { max-width: 920px; }

/* ---- Progress bar ---- */
.wizard-progress { margin-bottom: 1.25rem; }
.wizard-progress__labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}
.wizard-progress__step {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--grav-dark);
    letter-spacing: -0.01em;
}
.wizard-progress__count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--grav-gray);
}
.wizard-progress__track {
    height: 6px;
    background: var(--grav-border);
    border-radius: 99px;
    overflow: hidden;
}
.wizard-progress__fill {
    height: 100%;
    background: var(--grav-dark);
    border-radius: 99px;
    transition: width 0.5s ease;
}

/* ---- Card ---- */
.wizard-card {
    background: #ffffff;
    border: 1px solid var(--grav-border);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
}

.wizard-card__header {
    border-bottom: 2px solid var(--grav-light);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}
.wizard-card__header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.wizard-card__title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--grav-dark);
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}
.wizard-card__subtitle {
    font-size: 0.9rem;
    color: var(--grav-gray);
    margin: 0;
    font-weight: 400;
}

/* ---- Fields (matches .grav-input in MyAccount) ---- */
.wizard-field { margin-bottom: 1.25rem; }

.wizard-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--grav-gray);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grav-input,
.grav-select {
    background-color: var(--grav-light);
    border: 1px solid var(--grav-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
    color: var(--grav-dark);
    width: 100%;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}
.grav-input:focus,
.grav-select:focus {
    background-color: #ffffff;
    border-color: var(--grav-dark);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    outline: none;
}
.grav-input::placeholder { color: #b0bec5; font-weight: 400; }
.grav-input[readonly] {
    background-color: #f1f5f9;
    border-color: transparent;
    color: var(--grav-gray);
    cursor: default;
}

.grav-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 2.75rem;
    cursor: pointer;
}

.wizard-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--grav-gray);
    margin-top: 0.35rem;
}

/* ---- "Same as" inline toggle ---- */
.wizard-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 0.6rem;
}
.wizard-toggle input[type="checkbox"] {
    width: 17px; height: 17px;
    accent-color: var(--grav-dark);
    cursor: pointer; flex-shrink: 0; margin: 0;
}
.wizard-toggle label {
    font-size: 0.85rem; font-weight: 600;
    color: var(--grav-gray); cursor: pointer; margin: 0;
}

/* ---- Choice list (entity type) ---- */
.wizard-choices { display: flex; flex-direction: column; gap: 12px; }
.wizard-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 1.1rem 1.25rem;
    border: 1.5px solid var(--grav-border);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
    color: var(--grav-dark);
}
.wizard-choice:hover {
    border-color: var(--grav-dark);
    background: var(--grav-light);
}
.wizard-choice__body { flex: 1; }
.wizard-choice__title {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
    margin-bottom: 2px;
}
.wizard-choice__desc {
    display: block;
    font-size: 0.82rem;
    color: var(--grav-gray);
    font-weight: 400;
    line-height: 1.4;
}
.wizard-choice__arrow {
    color: var(--grav-border);
    font-size: 1rem;
    transition: color 0.18s;
}
.wizard-choice:hover .wizard-choice__arrow { color: var(--grav-dark); }

/* ---- Scrollable content (EULA) ---- */
.wizard-scroll {
    max-height: 320px;
    overflow-y: auto;
    background: var(--grav-light);
    border: 1px solid var(--grav-border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1.5rem;
}
.wizard-scroll::-webkit-scrollbar { width: 6px; }
.wizard-scroll::-webkit-scrollbar-thumb { background: var(--grav-border); border-radius: 99px; }

/* ---- Agreement checkbox row ---- */
.wizard-agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1rem 1.1rem;
    border: 1.5px solid var(--grav-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s;
}
.wizard-agree:hover { border-color: var(--grav-dark); background: var(--grav-light); }
.wizard-agree input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--grav-dark);
    flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.wizard-agree__text {
    font-size: 0.93rem; color: var(--grav-dark);
    line-height: 1.5; font-weight: 500;
}
.wizard-agree__text a {
    color: var(--grav-dark); font-weight: 700;
    text-decoration: underline; text-underline-offset: 2px;
}

/* ---- Buttons (matches .btn-onyx in MyAccount) ---- */
.btn-onyx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--grav-dark);
    color: #ffffff;
    border: 2px solid var(--grav-dark);
    border-radius: 12px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s;
}
.btn-onyx:hover { background: transparent; color: var(--grav-dark); text-decoration: none; }
.btn-onyx:disabled { opacity: 0.45; cursor: not-allowed; background: var(--grav-dark); color: #fff; }

.btn-outline-onyx {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--grav-gray);
    border: 2px solid var(--grav-border);
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s;
}
.btn-outline-onyx:hover { border-color: var(--grav-dark); color: var(--grav-dark); background: var(--grav-light); text-decoration: none; }

/* ---- Footer nav (Back / Continue) ---- */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-top: 2px solid var(--grav-light);
    padding-top: 1.5rem;
    margin-top: 1.75rem;
}
.wizard-nav--end { justify-content: flex-end; }

/* ---- Validation text ---- */
.wizard-error {
    display: block;
    color: var(--grav-danger);
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 4px;
}

/* ---- Version badge (EULA) ---- */
.wizard-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--grav-light);
    color: var(--grav-gray);
    border: 1px solid var(--grav-border);
    white-space: nowrap;
}

/* ---- Stripe card element wrapper ---- */
.stripe-wrap {
    background: var(--grav-light);
    border: 1px solid var(--grav-border);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s;
    margin-bottom: 1.25rem;
}
.stripe-wrap.StripeElement--focus {
    background: #fff;
    border-color: var(--grav-dark);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

/* ---- Marketing sidebar (Register / Payment) ---- */
.wizard-aside {
    background: #fff;
    border: 1px solid var(--grav-border);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
    .wizard-card { padding: 1.5rem; border-radius: 16px; }
    .wizard-card__title { font-size: 1.2rem; }
    .wizard-choice__desc { display: none; }
}
