/* Login Page Styles - Matching Mobile App */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 50px;
    max-width: 440px;
    /* Mobile max-width matching React component */
    margin: 0 auto;
}

/* Background */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/app/ui/assets/img/mobile.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Tablet background */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-background {
        background-image: url('/app/ui/assets/img/tablet.png');
    }
}

/* Desktop background */
@media (min-width: 1024px) {
    .login-background {
        background-image: url('/app/ui/assets/img/desktop.png');
    }
}

/* Gradient Overlay - More transparent */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(156, 222, 255, 0.3) 0%, rgba(7, 39, 68, 0.3) 100%);
    z-index: 1;
}

/* Header with Logo (ON BACKGROUND) - matching React component exactly */
.login-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 193px;
    margin-bottom: 0;
    width: 100%;
    padding: 0;
}

/* Reduce top margin on mobile */
@media (max-width: 767px) {
    .login-header {
        margin-top: 100px;
        /* Reduced for mobile */
    }
}

/* Logo shows on all breakpoints (mobile, tablet, desktop) */

.login-header .logo {
    width: auto;
    height: 70px !important;
    margin-bottom: 0;
    filter: brightness(0) invert(1);
    /* Make logo white */
    object-fit: contain;
}

/* Title and Subtitle Section (ON BACKGROUND, WHITE text) - matching React component exactly */
.login-title-section {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 70px;
    margin-bottom: 0;
    width: 100%;
    padding: 0;
}

.login-title-section .login-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    /* SemiBold - matching spec */
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: white;
    margin-bottom: 0;
    white-space: nowrap;
}

.login-title-section .login-subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    /* Light - matching spec */
    font-size: 16px;
    line-height: 100%;
    /* Matching Figma spec */
    letter-spacing: 0%;
    text-align: center;
    color: white;
    margin-top: 13px;
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Login Form Wrapper (NO white card, everything on background) - matching React component exactly */
.login-form-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 58px;
}

/* Login Steps - Mobile only */
.mobile-login-step {
    display: none;
}

.mobile-login-step.active {
    display: block;
}

/* Desktop/Tablet form - hidden on mobile */
.desktop-login-form {
    display: none;
}

/* Show desktop form on tablet/desktop, hide mobile steps */
@media (min-width: 768px) {
    .desktop-login-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .mobile-login-step {
        display: none !important;
    }
}

/* Show mobile steps on mobile, hide desktop form */
@media (max-width: 767px) {
    .desktop-login-form {
        display: none !important;
    }

    .mobile-login-step {
        display: none;
    }

    .mobile-login-step.active {
        display: block;
    }
}

/* Form Inputs - matching React component exactly */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.input-group {
    margin-bottom: 0;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    /* Light - matching spec */
    line-height: 100%;
    letter-spacing: 0%;
    color: #000000;
    background: #ffffff;
    transition: border-color 0.3s ease;
    text-align: center;
    vertical-align: middle;
    height: 45px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
}

.form-input::placeholder {
    color: #c6c6c6;
    /* Matching React component */
    font-weight: 300;
    /* Light */
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
}

/* Buttons - matching React component exactly */
.btn-primary {
    width: 100%;
    padding: 0;
    background: #1881e6;
    /* Matching React component button color */
    color: white;
    border: none;
    border-radius: 15px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    /* SemiBold - matching spec */
    font-size: 16px;
    /* Matching spec */
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: opacity 0.3s ease;
    margin: 0;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Footer content (ON BACKGROUND, white text) */
.login-footer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding-bottom: 0;
    margin-top: 0;
    min-height: 0;
}

/* Tablet/Desktop: Footer positioned from bottom */
@media (min-width: 768px) {
    .login-footer {
        justify-content: flex-end !important;
    }
}

/* Forgot Password Link (ON BACKGROUND) - 45px below legal text - Mobile only */
.forgot-password {
    display: block !important;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
    color: white;
    text-decoration: underline;
    text-decoration-style: solid;
    margin-top: 45px;
    margin-bottom: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    order: 2;
}

/* Hide footer forgot password on tablet/desktop (it shows inline in form) */
@media (min-width: 768px) {
    .login-footer .forgot-password {
        display: none !important;
    }
}

/* Desktop forgot password - appears after password field */
.desktop-forgot-password {
    margin-top: 0;
    margin-bottom: 14px;
    text-align: center;
    color: #c6c6c6;
    /* Light gray matching image */
}

@media (max-width: 767px) {
    .desktop-forgot-password {
        display: none;
    }
}

.forgot-password:hover {
    opacity: 0.9;
}

/* Show forgot password in footer on mobile only */
@media (max-width: 767px) {
    .login-footer .forgot-password {
        display: block !important;
    }
}

/* Legal Text (ON BACKGROUND, white text) - 15px below Continue button on mobile, 45px above support on tablet/desktop */
.legal-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: white;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0;
    width: 100%;
    order: 1;
}

/* Tablet/Desktop: Legal text 45px above support text */
@media (min-width: 768px) {
    .legal-text {
        margin-top: 0 !important;
        margin-bottom: 45px !important;
        order: 2 !important;
    }

    .support-text {
        order: 3 !important;
        margin-top: 0 !important;
    }

    /* Ensure forgot password doesn't affect layout */
    .login-footer .forgot-password {
        display: none !important;
        order: 0 !important;
    }
}

.legal-text .link-white {
    color: white;
    text-decoration: underline;
}

/* New User Text - REMOVED on mobile */
@media (max-width: 767px) {
    .new-user-text {
        display: none !important;
    }
}

/* Support Text (ON BACKGROUND, white text) - 45px from bottom, all white, email underlined */
.support-text {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 200;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    color: white;
    margin-top: auto;
    margin-bottom: 45px;
    width: 100%;
    order: 3;
}

.support-prefix {
    font-weight: 200;
    color: white;
}

.support-email {
    font-weight: 200;
    color: white;
    text-decoration: underline;
}

/* Links */
.link-white {
    color: white;
    text-decoration: none;
}

.link-white:hover {
    text-decoration: underline;
}

.link-blue {
    color: #1881e6;
    /* Matching React component */
    text-decoration: none;
}

.link-blue:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid #fcc;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Back Button - Step 2 (Mobile only) */
/* Back button removed - no longer needed */

/* Email Display removed - no longer shown on Step 2 */

/* Adjust form wrapper for Step 2 to account for back button */
#stepPassword .login-form {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 767px) {
    .login-container {
        padding: 0 25px;
        /* Less padding on mobile */
        max-width: 100%;
        /* Full width on mobile */
    }

}

@media (min-width: 768px) {
    .login-container {
        max-width: 440px;
        /* Fixed max-width on tablet/desktop, centered */
        margin: 0 auto;
    }
}