/**
 * ============================================================
 * SONIC STOREFRONT — Register Page CSS
 * Multi-step wizard design, progress tracking, mobile-first
 * ============================================================
 */

/* ── Base Layout (Shared with Login) ─────────────────────── */
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--page-bg);
    font-family: 'Cairo', sans-serif;
    padding: 40px 20px;
}

/* ── Card ────────────────────────────────────────────────── */
.register-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px; /* Wider for multi-step */
    background: rgba(var(--card-bg-rgb), 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.4);
    animation: registerReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes registerReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Progress Bar ─────────────────────────────────────────── */
.reg-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.reg-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255,255,255,0.08);
    z-index: 0;
}

.reg-progress__line {
    position: absolute;
    top: 20px;
    left: 10%;
    height: 2px;
    background: var(--accent);
    z-index: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.reg-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
}

.reg-step__node {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: all 0.3s ease;
}

.reg-step.active .reg-step__node {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4);
}

.reg-step.completed .reg-step__node {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.reg-step__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.reg-step.active .reg-step__label {
    color: var(--accent);
}

/* ── Wizard Content ───────────────────────────────────────── */
.reg-wizard {
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.reg-view {
    display: none;
    animation: viewFadeIn 0.4s ease both;
}

.reg-view.active {
    display: block;
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.reg-view__title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.reg-view__title i {
    color: var(--accent);
}

/* ── Grid Layout for Forms ───────────────────────────────── */
.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.reg-field--full {
    grid-column: span 2;
}

/* ── Form Styling (Inherits/Matches Login) ───────────────── */
.reg-group {
    margin-bottom: 20px;
}

.reg-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.reg-input {
    width: 100%;
    height: 52px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 0 18px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.25s;
    outline: none;
}

.reg-input:focus {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

/* ── Navigation Buttons ──────────────────────────────────── */
.reg-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-reg {
    height: 54px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 30px;
}

.btn-reg--next {
    flex: 2;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.btn-reg--back {
    flex: 1;
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.btn-reg:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-reg:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Password Strength ────────────────────────────────────── */
.strength-meter {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

/* ── Terms & Conditions ───────────────────────────────────── */
.reg-terms {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
}

.reg-terms input {
    margin-top: 4px;
}

.reg-terms__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.reg-terms__text a {
    color: var(--accent);
    text-decoration: none;
}

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
    .register-card {
        padding: 30px 20px;
        border-radius: 0;
        min-height: 100vh;
        border: none;
    }

    .reg-grid {
        grid-template-columns: 1fr;
    }

    .reg-field--full {
        grid-column: span 1;
    }

    .reg-progress {
        margin-bottom: 30px;
    }

    .reg-step__label {
        display: none; /* Hide labels on very small mobile */
    }
}
