/**
 * ============================================================
 * SONIC STOREFRONT — High-Fashion Minimalist Register CSS (Zara/H&M Style)
 * ============================================================
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: #f7f7f7; /* Clean, light neutral background */
    color: #111111;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ── Container ── */
.register-page {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Card (High-Fashion flat) ── */
.register-card {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 48px 36px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    animation: registerReveal 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
}

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

/* ── Logo Area ── */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    text-decoration: none;
}

.login-logo img {
    max-height: 52px;
    max-width: 180px;
    object-fit: contain;
}

.login-logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #111111;
    letter-spacing: -1px;
}

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

.reg-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #eaeaea;
    z-index: 0;
}

.reg-progress__line {
    position: absolute;
    top: 20px;
    left: 10%;
    height: 2px;
    background: #111111;
    z-index: 0;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 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: #ffffff;
    border: 2px solid #d1d1d1;
    color: #888888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: all 0.3s ease;
}

.reg-step.active .reg-step__node {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.reg-step.completed .reg-step__node {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.reg-step__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888888;
    white-space: nowrap;
}

.reg-step.active .reg-step__label {
    color: #111111;
}

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

.reg-view {
    display: none;
    animation: viewFadeIn 0.35s ease both;
    text-align: right;
}

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

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

.reg-view__title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    color: #111111;
    direction: rtl;
}

.reg-view__title i {
    color: #111111;
    font-size: 1.1rem;
}

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

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

.reg-group {
    margin-bottom: 20px;
}

.reg-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 8px;
    text-align: right;
}

.reg-input {
    width: 100%;
    height: 50px;
    background: #ffffff !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 6px;
    padding: 0 16px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #111111 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.reg-input[type="password"] {
    direction: ltr;
    text-align: right;
    padding-left: 46px !important;
}

.reg-input-wrap {
    position: relative;
    width: 100%;
}

.reg-pass-toggle {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 4px;
    font-size: 0.92rem;
    transition: color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
}

.reg-pass-toggle:hover {
    color: #111111;
}

.reg-input::placeholder {
    color: #aaaaaa;
}

.reg-input:focus {
    border-color: #111111 !important;
    box-shadow: inset 0 0 0 1px #111111;
}

select.reg-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23555555' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 16px center !important;
    background-size: 8px 10px !important;
    padding-left: 40px !important;
    padding-right: 16px !important;
}

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

.btn-reg {
    height: 50px;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-reg--next {
    flex: 2;
    background: #111111;
    color: #ffffff;
}

.btn-reg--next:hover:not(:disabled) {
    background-color: #222222;
}

.btn-reg--back {
    flex: 1;
    background: #eaeaea;
    color: #333333;
}

.btn-reg--back:hover:not(:disabled) {
    background-color: #dfdfdf;
}

.btn-reg:disabled {
    background-color: #cccccc;
    color: #ffffff;
    cursor: not-allowed;
}

/* ── Password Strength ── */
.strength-meter {
    height: 4px;
    background: #eaeaea;
    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: 6px;
    display: block;
    text-align: right;
}

/* ── Terms & Conditions ── */
.reg-terms {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    direction: rtl;
}

.reg-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #111111;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #d1d1d1;
    display: block !important;
}

.reg-terms__text {
    font-size: 0.85rem;
    color: #555555;
    line-height: 1.5;
    text-align: right;
}

.reg-terms__text a {
    color: #111111;
    font-weight: 700;
    text-decoration: none;
}

.reg-terms__text a:hover {
    text-decoration: underline;
}

/* Footer Link */
.lf-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eaeaea;
    font-size: 0.88rem;
    color: #555555;
}

.lf-footer a {
    color: #111111;
    font-weight: 800;
    text-decoration: none;
    margin-inline-start: 4px;
}

.lf-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.5;
    text-align: right;
}

.login-alert--error {
    background: #fdf2f2;
    border: 1px solid #f8b4b4;
    color: #9b1c1c;
}

.login-alert--success {
    background: #f3faf7;
    border: 1px solid #def7ec;
    color: #03543f;
}

.login-alert i { margin-top: 2px; flex-shrink: 0; }

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
    body {
        padding: 0;
        background-color: #ffffff;
    }

    .register-card {
        padding: 40px 24px;
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100vh;
    }

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

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

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

    .reg-step__label {
        display: none;
    }
}
