/* Login Page Specific Styles */

.login-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100vh;
    background-color: #f4f4f9;
    padding: 0 20px;
}

.logo-container {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.login-logo {
    max-height: 90vh;
    width: auto;
}

.form-container {
    width: 600px;
    background: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 0;
    align-self: center;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 15px;
}

.form-container form {
    display: flex;
    flex-direction: column;
}

.form-container label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-container input {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px; /* Prevents zoom on iOS */
}

.form-container button {
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.form-container button:hover {
    background-color: #0056b3;
}

/* Hide the header only on the login page */
body.light-mode.login-page header,
body.dark-mode.login-page header {
    display: none;
}

/* Mobile Responsive Design */

/* Tablet styles (768px and down) */
@media screen and (max-width: 768px) {
    .login-page {
        flex-direction: column;
        justify-content: center;
        padding: 20px 15px;
        gap: 20px;
    }
    
    .logo-container {
        margin-bottom: 0;
    }
    
    .login-logo {
        max-height: 30vh;
        max-width: 80vw;
    }
    
    .form-container {
        width: 100%;
        max-width: 400px;
        padding: 20px 25px;
    }
}

/* Mobile styles (480px and down) */
@media screen and (max-width: 480px) {
    .login-page {
        padding: 15px 10px;
        gap: 15px;
    }
    
    .login-logo {
        max-height: 25vh;
        max-width: 85vw;
    }
    
    .form-container {
        padding: 20px 20px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .form-container h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .form-container input {
        padding: 12px;
        font-size: 16px;
        border-radius: 5px;
        margin-bottom: 15px;
    }
    
    .form-container button {
        padding: 12px;
        font-size: 16px;
        border-radius: 5px;
        font-weight: 600;
    }
    
    .form-container label {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

/* Small mobile styles (320px and down) */
@media screen and (max-width: 320px) {
    .login-page {
        padding: 10px 8px;
    }
    
    .login-logo {
        max-height: 20vh;
        max-width: 90vw;
    }
    
    .form-container {
        padding: 15px;
        width: calc(100% - 16px);
    }
    
    .form-container h2 {
        font-size: 1.3em;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .login-page {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 20px;
    }
    
    .logo-container {
        flex: 1;
        margin-bottom: 0;
    }
    
    .login-logo {
        max-height: 80vh;
        max-width: 40vw;
    }
    
    .form-container {
        flex: 1;
        max-width: 350px;
        align-self: center;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .form-container input {
        min-height: 44px; /* Apple's recommended touch target size */
    }
    
    .form-container button {
        min-height: 44px;
        font-weight: 600;
    }
    
    .form-container button:active {
        background-color: #004494;
        transform: translateY(1px);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}