/* =======================================================================
   ZOL — Customer Registration Wizard + Member Card
   ======================================================================= */

.wizard {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
}
.wizard-header {
    background: var(--shop-primary);
    color: var(--shop-on-primary);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.wizard-header .btn-back {
    color: var(--shop-on-primary);
    background: rgba(255,255,255,0.1);
    position: relative;
    top: auto;
    left: auto;
    flex-shrink: 0;
}
.wizard-header .btn-back:hover {
    background: rgba(255,255,255,0.2);
}
.wizard-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    overflow: hidden;
}
.wizard-progress-bar {
    height: 100%;
    background: var(--shop-on-primary);
    transition: width 250ms ease;
}
.wizard-step-indicator {
    font-size: 13px;
    opacity: 0.8;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.wizard-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 20px 64px;
    overflow-y: auto;
}
.wizard-card {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-soft);
}
.wizard-card h2 {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--forest);
    margin-bottom: 8px;
    line-height: 1.15;
}
.wizard-card .lead {
    color: rgba(14, 31, 20, 0.7);
    font-size: 15px;
    margin-bottom: 28px;
    line-height: 1.5;
}

.wizard-step { display: none; }
.wizard-step.is-active { display: block; }

.wizard-actions {
    margin-top: 28px;
    display: flex;
    gap: 10px;
}
.wizard-actions .btn {
    flex: 1;
}
.wizard-actions .btn-primary { flex: 2; }

/* GPS hero button on address intro --------------------------------- */
.btn-gps-hero {
    width: 100%;
    padding: 20px 24px;
    font-size: 16px;
    background: var(--shop-primary);
    color: var(--shop-on-primary);
    border: 2px solid var(--shop-primary);
}
.btn-gps-hero:hover {
    background: var(--shop-secondary);
    border-color: var(--shop-secondary);
}
.btn-gps-hero svg {
    flex-shrink: 0;
}

.addr-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(14, 31, 20, 0.4);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 20px 0;
}
.addr-divider::before,
.addr-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--paper-3);
}
.addr-divider::before { margin-right: 14px; }
.addr-divider::after  { margin-left: 14px; }

/* Welcome / age gate ----------------------------------------------- */
.welcome-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--accent);
}
.welcome-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 24px;
}
.welcome-list li {
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(14, 31, 20, 0.75);
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid var(--paper-3);
}
.welcome-list li:last-child { border-bottom: none; }
.welcome-list li svg {
    flex-shrink: 0;
    color: var(--success);
    margin-top: 2px;
}

/* Photo upload ----------------------------------------------------- */
.photo-zone {
    border: 2px dashed var(--paper-3);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: var(--paper);
    transition: border-color 150ms ease, background-color 150ms ease;
    margin-bottom: 20px;
}
.photo-zone:hover {
    border-color: var(--shop-primary);
    background: #ffffff;
}
.photo-zone svg {
    color: rgba(14, 31, 20, 0.4);
    margin-bottom: 10px;
}
.photo-zone-label {
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 4px;
}
.photo-zone-hint {
    font-size: 13px;
    color: rgba(14, 31, 20, 0.55);
}
.photo-zone.has-photo {
    padding: 12px;
    cursor: default;
    border-style: solid;
    border-color: var(--shop-primary);
    background: #ffffff;
}
.photo-preview-wrap {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--paper);
    aspect-ratio: 4 / 3;
}
.photo-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.face-zone .photo-preview-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    max-width: 240px;
    margin: 0 auto;
}
.face-zone .photo-preview-wrap img {
    object-fit: cover;
}
.photo-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.photo-actions .btn { flex: 1; }

input[type="file"].photo-input {
    display: none;
}

.privacy-note {
    background: var(--paper-2);
    border-left: 3px solid var(--moss);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: rgba(14, 31, 20, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Consent checkboxes ---------------------------------------------- */
.consent-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 8px;
}
.consent-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}
.consent-item:hover {
    border-color: var(--shop-primary);
}
.consent-item.is-checked {
    border-color: var(--shop-primary);
    background: #ffffff;
}
.consent-item input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--shop-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.consent-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    flex: 1;
}
.consent-text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--forest);
}
.consent-text small {
    color: rgba(14, 31, 20, 0.6);
    display: block;
    margin-top: 4px;
}

/* Map container in wizard ----------------------------------------- */
.wizard-card .map-wrap {
    height: 220px;
}

/* ================================================================
   Member Card (post-registration / login home for customers)
   ================================================================ */

.member-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--shop-primary) 0%, var(--shop-secondary) 100%);
}

.member-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--shop-on-primary);
}
.member-header .shop-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: currentColor;
}
.member-header .btn-ghost {
    background: rgba(255,255,255,0.1);
    color: var(--shop-on-primary);
    border-color: rgba(255,255,255,0.2);
}

.member-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 20px 32px;
}

.member-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    overflow: visible;        /* allow photo to overflow on top */
    position: relative;
}

.member-card-top {
    background: var(--shop-primary);
    color: var(--shop-on-primary);
    padding: 24px 24px 56px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}
.member-card-top h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 4px;
    color: currentColor;
}
.member-card-top .small {
    font-size: 13px;
    opacity: 0.8;
}

.member-photo {
    /* Photo "overflows" the green header strip, sitting on top of it */
    position: relative;
    z-index: 5;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: var(--paper-2);
    margin: -48px auto 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.member-photo .placeholder {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--forest);
    font-weight: 600;
}

.member-card-body {
    padding: 16px 28px 28px;
    text-align: center;
    position: relative;
    z-index: 2;
}
.member-name {
    font-family: var(--font-display);
    font-size: 26px;
    color: var(--forest);
    margin: 12px 0 2px;
    line-height: 1.1;
}
.member-number {
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 14px;
    color: rgba(14, 31, 20, 0.6);
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.member-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 24px;
}
.member-status-active {
    background: rgba(47, 107, 72, 0.12);
    color: var(--success);
}
.member-status-flagged {
    background: rgba(181, 74, 61, 0.12);
    color: var(--error);
}
.member-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.qr-frame {
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 0 auto 16px;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-frame canvas,
.qr-frame img {
    max-width: 100%;
    height: auto;
    display: block;
}

.member-hint {
    font-size: 13px;
    color: rgba(14, 31, 20, 0.55);
    margin-bottom: 0;
}

.member-actions {
    padding: 0 20px 24px;
}
.member-actions .btn {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 400px) {
    .wizard-card {
        padding: 28px 22px;
    }
    .member-card {
        max-width: 100%;
    }
}
