/* ========================================
   MOBILE LOGIN POPUP
   ======================================== */

/* Mobile Login Popup Overlay */
.mobile-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-login-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Login Popup Content */
.mobile-login-content {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    position: absolute;
    bottom: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.mobile-login-popup.show .mobile-login-content {
    transform: translateY(0);
}

/* Mobile Login Header */
.mobile-login-header {
    background: linear-gradient(135deg, #002147 0%, #003d82 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.mobile-login-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.mobile-login-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Close Button */
.mobile-login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.mobile-login-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile Login Body */
.mobile-login-body {
    padding: 25px;
}

/* Mobile Login Form */
.mobile-login-form {
    width: 100%;
}

.mobile-form-group {
    margin-bottom: 20px;
}

.mobile-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.mobile-form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.mobile-form-input:focus {
    outline: none;
    border-color: #002147;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1);
}

/* Mobile Login Button */
.mobile-login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #002147 0%, #003d82 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.mobile-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 33, 71, 0.3);
}

.mobile-login-btn:active {
    transform: translateY(0);
}

/* Mobile Login Options */
.mobile-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.mobile-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #002147;
}

.mobile-forgot-link {
    color: #002147;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-forgot-link:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Mobile Login Footer */
.mobile-login-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e5e5e5;
}

.mobile-login-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.mobile-login-footer a {
    color: #002147;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-login-footer a:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Error Message */
.mobile-error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #c33;
    display: none;
}

.mobile-error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

/* Success Message */
.mobile-success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #3c3;
    display: none;
}

.mobile-success-message.show {
    display: block;
}

/* Loading State */
.mobile-login-btn.loading {
    color: transparent;
    pointer-events: none;
}

.mobile-login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mobileSpin 0.8s linear infinite;
}

/* Mobile Only - Hide on Desktop */
@media (min-width: 769px) {
    .mobile-login-popup {
        display: none !important;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .mobile-login-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
    }
    
    .mobile-login-header {
        padding: 15px;
    }
    
    .mobile-login-header h2 {
        font-size: 1.3rem;
    }
    
    .mobile-login-body {
        padding: 20px;
    }
    
    .mobile-form-input {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .mobile-login-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .mobile-login-header {
        padding: 12px;
    }
    
    .mobile-login-header h2 {
        font-size: 1.2rem;
    }
    
    .mobile-login-body {
        padding: 15px;
    }
    
    .mobile-form-group {
        margin-bottom: 15px;
    }
}

/* Animations */
@keyframes mobileSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Swipe Indicator */
.mobile-swipe-indicator {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 15px auto 10px;
    animation: swipePulse 2s ease-in-out infinite;
}

@keyframes swipePulse {
    0%, 100% { opacity: 0.3; transform: scaleX(1); }
    50% { opacity: 0.6; transform: scaleX(1.2); }
}

/* Touch-friendly improvements */
.mobile-form-input,
.mobile-login-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent zoom on input focus (iOS) */
@supports (-webkit-touch-callout: none) {
    .mobile-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
