/* Evolve Theme CSS - Based on example login page design */

/* Font Definitions */
@font-face {
    font-family: 'Gotham Medium';
    src: url('../assets/fonts/gotham-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham Book';
    src: url('../assets/fonts/gotham-book.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Body Styling for Auth Pages */
.evolve-auth-layout {
    font-family: 'Gotham Book', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: url('../assets/img/backgrounds/evolve-background.png');
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Login Container */
.evolve-login-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
}

/* Logo Styling */
.evolve-logo {
    max-width: 250px;
    margin-bottom: 20px;
}

/* Main Heading */
.evolve-heading {
    font-family: 'Gotham Medium', Arial, sans-serif;
    font-size: 2.8rem;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Subtitle */
.evolve-subtitle {
    color: white;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Form Labels */
.evolve-form-label {
    color: white;
    text-align: left;
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

/* Form Controls */
.evolve-form-control {
    background-color: white;
    border: none;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    font-family: 'Gotham Book', Arial, sans-serif;
}

.evolve-form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Password Field Container */
.evolve-password-field {
    position: relative;
}

.evolve-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 10;
}

/* Links */
.evolve-forgot-password {
    display: block;
    color: white;
    text-align: right;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.evolve-forgot-password:hover {
    text-decoration: underline;
    color: white;
}

/* Sign In Button */
.evolve-btn-signin {
    background-color: white;
    color: #333;
    border: none;
    border-radius: 20px;
    padding: 8px 30px;
    font-size: 0.9rem;
    margin: 10px 0 30px;
    font-family: 'Gotham Book', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.evolve-btn-signin:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

/* Footer Text */
.evolve-footer-text {
    color: white;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Toggle Button for ESS Account */
.evolve-toggle-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 10px 20px;
    margin-bottom: 20px;
    font-family: 'Gotham Book', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.evolve-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Validation Messages */
.evolve-validation-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
}

/* Form Groups */
.evolve-form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* Horizontal form layout for wider screens */
@media (min-width: 768px) {
    .evolve-form-group {
        display: flex;
        align-items: flex-start;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .evolve-form-label {
        min-width: 140px;
        margin-bottom: 0;
        flex-shrink: 0;
        padding-top: 10px; /* Align with input padding */
    }
    
    .evolve-form-control {
        flex: 1;
        margin-bottom: 0;
        min-width: 250px; /* Ensure minimum width for readability */
    }
    
    .evolve-password-field {
        flex: 1;
        min-width: 250px;
    }
    
    .evolve-validation-error {
        flex-basis: 100%;
        margin-left: 155px;
        margin-top: 5px;
        display: block;
    }
    
    /* Special handling for form groups with validation errors */
    .evolve-form-group:has(.evolve-validation-error:not(:empty)) {
        margin-bottom: 25px;
    }
}

/* Mobile layout - labels above controls */
@media (max-width: 767px) {
    .evolve-form-group {
        display: block;
    }
    
    .evolve-form-label {
        display: block;
        margin-bottom: 5px;
    }
    
    .evolve-form-control {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .evolve-heading {
        font-size: 2.2rem;
    }
    
    .evolve-login-container {
        max-width: 90%;
        padding: 15px;
    }
    
    .evolve-logo {
        max-width: 200px;
    }
}

/* Landing Page Specific Styles */
.evolve-landing-page {
    background-image: url('../assets/img/backgrounds/evolve-background.png');
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: center;
    min-height: 100vh;
    font-family: 'Gotham Book', Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.evolve-landing-header {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.evolve-landing-content {
    color: white;
    text-align: center;
    padding: 50px 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 80px; /* Account for fixed header */
}

.evolve-landing-title {
    font-family: 'Gotham Medium', Arial, sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.evolve-landing-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Loading Spinner Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.evolve-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Other Identity Pages Styling */
.evolve-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 30px;
    margin: 20px auto;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.evolve-card-title {
    font-family: 'Gotham Medium', Arial, sans-serif;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.evolve-card .form-control {
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.evolve-card .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    border-radius: 20px;
    padding: 8px 30px;
    font-family: 'Gotham Book', Arial, sans-serif;
}

/* Email History Dropdown Styles */
.evolve-email-field-container {
    position: relative;
    width: 100%;
}

.evolve-email-history-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    z-index: 5;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.evolve-email-history-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.evolve-email-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    margin-top: 2px;
}

.evolve-email-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.evolve-clear-emails-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.evolve-clear-emails-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.evolve-email-list {
    max-height: 200px;
    overflow-y: auto;
}

.evolve-email-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.evolve-email-item:hover {
    background-color: #f8f9fa;
}

.evolve-email-item:last-child {
    border-bottom: none;
}

.evolve-email-item-text {
    flex: 1;
    text-align: left;
    color: #333;
}

.evolve-email-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.evolve-email-item-remove:hover {
    background-color: rgba(220, 53, 69, 0.1);
    opacity: 1;
}

.evolve-email-dropdown-footer {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.evolve-email-dropdown-footer small {
    color: #6c757d;
    font-size: 0.8rem;
}

.evolve-email-empty {
    padding: 20px 15px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Touch-friendly improvements for tablets */
@media (max-width: 1024px) {
    .evolve-email-history-btn {
        padding: 8px;
        right: 8px;
    }
    
    .evolve-email-item {
        padding: 15px;
        font-size: 1rem;
        min-height: 48px; /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
    }
    
    .evolve-email-item-remove {
        padding: 8px;
        margin-left: 15px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .evolve-clear-emails-btn {
        padding: 5px;
        min-width: 28px;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .evolve-email-dropdown {
        margin-top: 4px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
}

/* Additional improvements for smaller devices */
@media (max-width: 480px) {
    .evolve-email-field-container {
        position: relative;
    }
    
    .evolve-form-control {
        padding-right: 45px; /* Make room for button */
    }
    
    .evolve-email-dropdown {
        left: -5px;
        right: -5px;
        margin-top: 5px;
    }
}
