/* Enhanced Authentication Forms CSS */

.hec-auth-container {
    max-width: 450px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tab Navigation */
.hec-auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.hec-tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.hec-tab-btn.active {
    color: #007cba;
    background: #fff;
}

.hec-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #007cba;
}

.hec-tab-btn:hover {
    color: #007cba;
    background: #fff;
}

/* Tab Content */
.hec-tab-content {
    display: none;
    padding: 2rem;
}

.hec-tab-content.active {
    display: block;
}

/* Form Styles */
.hec-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hec-form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.hec-form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.hec-form-group input {
    padding: 0.875rem 1rem;
    padding-right: 3rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.hec-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 123, 202, 0.1);
}

.hec-form-group input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.hec-field-icon {
    position: absolute;
    right: 1rem;
    top: 65%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.2rem;
    pointer-events: none;
}

.hec-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.hec-password-toggle:hover {
    color: #007cba;
}

.hec-email-check {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hec-email-check.show {
    opacity: 1;
}

/* Password Strength Indicator */
.hec-password-strength {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.hec-password-strength.weak {
    color: #dc3545;
}

.hec-password-strength.medium {
    color: #ffc107;
}

.hec-password-strength.strong {
    color: #28a745;
}

/* Form Options */
.hec-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.hec-remember-me,
.hec-terms {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.hec-remember-me input,
.hec-terms input {
    margin: 0;
}

.hec-forgot-password {
    color: #007cba;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.hec-forgot-password:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Submit Button */
.hec-submit-btn {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.hec-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 202, 0.3);
}

.hec-submit-btn:active {
    transform: translateY(0);
}

.hec-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hec-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hec-btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Messages */
.hec-form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hec-form-message.show {
    opacity: 1;
}

.hec-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hec-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hec-form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Footer */
.hec-form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.hec-back-to-login {
    color: #007cba;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.hec-back-to-login:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Logged In Message */
.hec-logged-in-message {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.hec-logged-in-message p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.hec-logout-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.hec-logout-btn:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 480px) {
    .hec-auth-container {
        margin: 1rem;
        border-radius: 8px;
    }

    .hec-tab-content {
        padding: 1.5rem;
    }

    .hec-form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .hec-remember-me,
    .hec-terms {
        font-size: 0.85rem;
    }
}

/* Loading Animation */
.hec-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hec-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.hec-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Validation Styles */
.hec-form-group.error input {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.hec-form-group.success input {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.hec-field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Progress Bar for Password Strength */
.hec-password-strength-bar {
    margin-top: 0.5rem;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.hec-password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hec-password-strength-fill.weak {
    background: #dc3545;
    width: 33%;
}

.hec-password-strength-fill.medium {
    background: #ffc107;
    width: 66%;
}

.hec-password-strength-fill.strong {
    background: #28a745;
    width: 100%;
}

button.hec-submit-btn {
    border: none !important;
    color: #fff !important;
}