/* Full screen overlay styles */
#login-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://tbc.xcoprojects.co.za/wp-content/uploads/2025/03/AdobeStock_510524549-scaled.jpeg') no-repeat center center;
    background-size: cover;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Add overlay for better readability */
#login-popup-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Popup box styles - centered positioning */
#login-popup {
    background: #fff;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1000000;
    margin: auto;
    transform: translateY(0); /* Ensures no offset */
}

/* Logo styling */
.login-popup-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-popup-logo img {
    max-width: 200px;
    height: auto;
}

.login-popup-logo h1 {
    color: #333;
    font-size: 28px;
    margin: 0;
}

/* Login form container */
.login-form-container {
    padding-top: 10px;
}

/* Form labels */
#loginform-popup label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* Style the login form inputs */
#loginform-popup input[type="text"],
#loginform-popup input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#loginform-popup input[type="text"]:focus,
#loginform-popup input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.2);
}

/* Remember me checkbox */
.login-remember {
    margin-bottom: 20px;
}

.login-remember label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    margin-right: 8px;
}

/* Submit button */
#loginform-popup input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

#loginform-popup input[type="submit"]:hover {
    background: #005a87;
}

#loginform-popup input[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Error and success message styling */
#login-error-message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}

#login-error-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#login-error-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive design */
@media (max-width: 480px) {
    #login-popup-overlay {
        padding: 15px;
    }
    
    #login-popup {
        padding: 30px 20px;
        max-width: 100%;
        width: 100%;
    }
    
    .login-popup-logo h1 {
        font-size: 24px;
    }
    
    #loginform-popup input[type="text"],
    #loginform-popup input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Ensure centering on very small screens */
@media (max-height: 600px) {
    #login-popup-overlay {
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
    }
    
    #login-popup {
        margin: auto;
    }
}