/**
 * Login Page Styles for TrackThatDrive
 * Provides modern, responsive styling for the login interface
 */

/* Main login hero section */
.login-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login container - split screen design */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    margin: 2rem;
    display: flex;
    min-height: 500px;
}

/* Left panel - benefits and branding */
.login-left {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Right panel - login form */
.login-right {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #333;
}

/* Form styling */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Button styling */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.btn-guest {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    margin-top: 1rem;
}

.btn-guest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

/* Divider styling */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #888;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e1e1;
}

.divider span {
    background: white;
    padding: 0 1rem;
}

/* Back to home link */
.back-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Feature list styling */
.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* Error display - strategic and prominent */
#error {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    display: none;
    animation: slideInDown 0.3s ease-out;
    position: relative;
}

#error:not(:empty) {
    display: block;
}

#error::before {
    content: '⚠️';
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Error animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Critical error styling with pulse */
#error.critical {
    animation: slideInDown 0.3s ease-out, pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5); }
    100% { box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3); }
}

/* Form validation error states */
.has-error .form-control {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

/* Bootstrap spinner for loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        margin: 1rem;
    }
    
    .login-left, .login-right {
        padding: 2rem;
    }
    
    .back-link {
        position: static;
        margin-bottom: 2rem;
        display: inline-block;
    }
    
    .login-hero {
        padding: 40px 0;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .login-left, .login-right {
        padding: 1.5rem;
    }
    
    .login-container {
        margin: 0.5rem;
    }
    
    .feature-list {
        font-size: 0.9rem;
    }
}