/* auth.css - Professional CSS for login and registration pages */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    color: #333;
    min-height: 100vh;
    line-height: 1.5;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Site header */
.site-header {
    text-align: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.site-header.login-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
}

.site-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: bold;
}

.site-header h2 {
    margin: 0;
    font-size: 1.3em;
    font-weight: normal;
    opacity: 0.9;
}

/* Main content layout */
.main-content {
    display: flex;
    min-height: 500px;
}

.left-panel {
    flex: 1;
    padding: 40px;
    background: #f3f8fd;
}

.right-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Left panel content */
.description h2 {
    color: #2c5aa0;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.description p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 1.1em;
}

.description p:last-child {
    margin-bottom: 0;
}

.vtg-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.2s ease;
}

.vtg-link:hover,
.vtg-link:focus {
    text-decoration: underline;
}

/* Benefits and features sections */
.benefits,
.features {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #28a745;
}

.features {
    border-left-color: #2c5aa0;
}

.benefits h3,
.features h3 {
    color: #28a745;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.features h3 {
    color: #2c5aa0;
}

.benefits ul,
.features ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.benefits li,
.features li {
    margin-bottom: 8px;
}

/* Verification process */
.verification-process {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.verification-process h4 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 10px;
}

.verification-process ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

/* Form sections */
.register-section,
.login-section {
    max-width: 400px;
}

.register-section h2,
.login-section h2 {
    color: #28a745;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.8em;
    text-align: center;
}

.login-section h2 {
    color: #2c5aa0;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-weight: 500;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Form styling */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 1.1em;
}

.form-input,
.form-select {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.form-input:invalid {
    border-color: #dc3545;
}

.form-input:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Field error messages */
.field-error {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.field-error.show {
    display: block;
}

/* Agent section */
.agent-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-bottom: 25px;
}

.agent-section h3 {
    color: #2c5aa0;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.agent-section p {
    color: #666;
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 15px;
}

.agent-section .form-group {
    margin-bottom: 0;
}

/* Checkbox styling */
.checkbox-group {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    line-height: 1.5;
    cursor: pointer;
    font-size: 1em;
    margin: 0;
}

.agent-checkbox-label {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    margin: 0;
}

.form-checkbox {
    margin-right: 12px;
    margin-top: 2px;
    transform: scale(1.3);
    accent-color: #28a745;
    cursor: pointer;
}

.checkbox-text {
    flex: 1;
}

.privacy-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.2s ease;
}

.privacy-link:hover,
.privacy-link:focus {
    text-decoration: underline;
}

/* Button styling */
.register-btn,
.login-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    text-decoration: none;
    text-align: center;
}

.login-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
}

.register-btn:hover,
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    text-decoration: none;
}

.login-btn:hover {
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.3);
}

.register-btn:focus,
.login-btn:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.register-btn:disabled,
.login-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button spinner */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Secondary button styling (used in login/register sections) */
.register-section .register-btn,
.login-section .register-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    font-size: 1.1em;
}

.login-section .login-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    display: inline-block;
    width: auto;
    padding: 12px 30px;
    font-size: 1.1em;
}

/* Form sections at bottom */
.register-section,
.login-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.register-section p,
.login-section p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Disclaimer */
.disclaimer {
    background: #f8f9fa;
    padding: 20px 40px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    font-style: italic;
    border-top: 1px solid #e9ecef;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-content p {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

/* Form validation states */
.form-input.error,
.form-select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-input.success,
.form-select.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-content {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        padding: 30px 20px;
    }

    .container {
        margin: 0;
        border-radius: 0;
    }

    .site-header {
        padding: 20px;
    }

    .site-header h1 {
        font-size: 2em;
    }

    .site-header h2 {
        font-size: 1.1em;
    }

    .register-section,
    .login-section {
        max-width: none;
    }

    .form-input,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input,
    .form-select {
        border-width: 3px;
    }

    .register-btn,
    .login-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .register-btn:hover,
    .login-btn:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .register-btn,
    .login-btn,
    .loading-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}