﻿/* =============================================================================
   RegisterMobile.css
   Styles for the Empower mobile registration page.

   Reuses shared mobile login classes from LoginMobile.css:
     .mobile-login-brand, .mobile-login-app-name, .mobile-login-city-name,
     .mobile-login-bg, .mobile-skip-link, .mobile-input-group, .mobile-input-icon,
     .mobile-pw-toggle, .mobile-validation, .mobile-error-banner, .mobile-signup-row

   This file adds only registration-specific styles:
     1. Page wrapper
     2. Register card
     3. Field hints
     4. Account number help panel
     5. EULA row
     6. Register button
     7. Link button (inline)
     8. Accessibility / reduced motion
   ============================================================================= */


/* =============================================================================
   1. PAGE WRAPPER
   Matches .mobile-login-page but allows scrolling — registration is taller
   than login and must scroll on small phones.
   ============================================================================= */

.mobile-register-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: env(safe-area-inset-top, 24px) 20px env(safe-area-inset-bottom, 24px) 20px;
    position: relative;
    overflow-y: auto;
    padding-top: max(env(safe-area-inset-top), 24px);
}


/* =============================================================================
   2. REGISTER CARD
   Same frosted panel as .mobile-login-card but slightly wider to
   accommodate the account number help image comfortably.
   ============================================================================= */

.mobile-register-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    padding: 24px 20px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.mobile-register-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-register-card-title {
    flex: 1;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1a3a5c;
    margin-right: 60px; /* visually centers title against logo width */
}


/* =============================================================================
   3. FIELD HINTS
   Subtle helper text below inputs (password requirements, account number).
   ============================================================================= */

.mobile-field-hint {
    font-size: 13px;
    color: #6a8aaa;
    margin-top: 6px;
    margin-bottom: 10px;
    padding-left: 2px;
    line-height: 1.4;
}


/* =============================================================================
   4. ACCOUNT NUMBER HELP PANEL
   Tap-to-reveal panel showing the utility bill sample image.
   ============================================================================= */

.mobile-account-help {
    margin-top: -4px;
    margin-bottom: 12px;
}

/* Toggle button — styled as a subtle inline link with icon */
.mobile-account-help-toggle {
    background: none;
    border: none;
    padding: 4px 0;
    color: #1a6fad;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px; /* WCAG 2.5.5 touch target */
}

    .mobile-account-help-toggle:focus-visible {
        outline: 2px solid #5AABF5;
        outline-offset: 2px;
        border-radius: 4px;
    }

/* Revealed panel containing the bill image */
.mobile-account-help-panel {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0dcea;
}

    .mobile-account-help-panel img {
        display: block;
        width: 100%;
        height: auto;
    }


/* =============================================================================
   5. EULA ROW
   Checkbox + Terms link + helper text.
   ============================================================================= */

.mobile-eula-row {
    margin-bottom: 16px;
}

.mobile-eula-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1a3a5c;
    line-height: 1.4;
}

.mobile-eula-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #1a6fad;
    cursor: pointer;
}

    .mobile-eula-check:focus-visible {
        outline: 2px solid #5AABF5;
        outline-offset: 2px;
    }


/* =============================================================================
   6. REGISTER BUTTON
   Matches .mobile-btn-login style but uses the primary blue.
   Disabled state when EULA not accepted.
   ============================================================================= */

.mobile-btn-register {
    width: 100%;
    height: 48px; /* WCAG 2.5.5 */
    border-radius: 10px;
    background: #1a6fad;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    margin-bottom: 4px;
    transition: background 0.15s;
    letter-spacing: 0.2px;
}

    .mobile-btn-register:hover:not(:disabled) {
        background: #155d94;
    }

    .mobile-btn-register:active:not(:disabled) {
        background: #0f4a78;
    }

    .mobile-btn-register:focus-visible {
        outline: 3px solid #9CCBFA;
        outline-offset: 2px;
    }

    /* Visually communicate disabled state when EULA not accepted */
    .mobile-btn-register:disabled {
        background: #a0b8cc;
        cursor: not-allowed;
        opacity: 0.7;
    }


/* =============================================================================
   7. INLINE LINK BUTTON
   Used for the "Terms and Conditions" link inside the EULA label.
   Styled as a plain inline link, not a button.
   ============================================================================= */

.mobile-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #1a6fad;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    line-height: inherit;
}

    .mobile-link-btn:hover {
        color: #155d94;
    }

    .mobile-link-btn:focus-visible {
        outline: 2px solid #5AABF5;
        outline-offset: 2px;
        border-radius: 2px;
    }


/* =============================================================================
   8. ACCESSIBILITY / REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .mobile-btn-register,
    .mobile-input-group,
    .mobile-account-help-panel {
        transition: none;
    }
}


.mobile-input-group {
    margin-bottom: 20px;
}

    .mobile-input-group input {
        font-size: max(13px, 1em);
    }

/* Field help text — appears on input focus, collapses on blur */
.mobile-field-help {
    font-size: 12px;
    color: #4a6a8a;
    background: #f0f6ff;
    border-left: 3px solid #1a6fad;
    border-radius: 0 6px 6px 0;
    padding: 8px 10px;
    margin-top: 4px;
    margin-bottom: 8px;
    line-height: 1.5;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Remove default Blazor Identity validation styles */
.mobile-input-group .form-control.valid.modified,
.mobile-input-group .form-control.modified:not([type=checkbox]) {
    outline: none;
    border: none;
}


/* Introductory paragraph text on forgot password/username pages */
.mobile-form-intro {
    font-size: .8125rem;
    color: #4a6a8a;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 0 2px;
}

/* Lead variant - Emphasises the primary message on the confirmation pages */
.mobile-form-intro--welcome {
    font-size: 1.125rem;
    line-height: 1.45;
    text-align: center; /* Centers lead text under the icoon */
}

/* Lead variant - Emphasises the primary message on the confirmation pages */
.mobile-form-intro--lead {
    font-size: 1rem;
    line-height: 1.45;
    text-align: center;  /* Centers lead text under the icoon */
}


/* Large confirmation icon shown on email sent confirmation pages */
.mobile-confirmation-icon {
    text-align: center;
    font-size: 48px;
    color: #1a6fad;
    margin: 8px 0 16px;
}