/* Hybrid Login Styles for Theme Aster */
.hybrid-login-container {
    position: relative;
    min-height: 300px;
}

.hybrid-step-1,
.hybrid-step-2,
.hybrid-step-2-register {
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

.hybrid-step-1.d-none,
.hybrid-step-2.d-none,
.hybrid-step-2-register.d-none {
    opacity: 0;
    transform: translateY(-10px);
}

/* Loading button states */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.invalid-feedback:not(:empty) {
    display: block;
}

/* Phone number display */
#confirmed-phone {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
}

/* Change phone button */
#change-phone-btn,
#back-to-phone-btn {
    color: var(--bs-primary, #007bff);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

#change-phone-btn:hover,
#back-to-phone-btn:hover {
    color: var(--bs-primary-dark, #0056b3);
    text-decoration: underline;
}

/* Registration redirect section */
.hybrid-step-2-register .alert {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.hybrid-step-2-register .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Smooth transitions for form steps */
.hybrid-login-container .form-group {
    margin-bottom: 1rem;
}

.hybrid-login-container .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Button states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hybrid-login-container {
        min-height: 250px;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

/* Focus states for better accessibility */
.form-control:focus {
    border-color: var(--bs-primary-light, #80bdff);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Success states */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #28a745;
}

.valid-feedback:not(:empty) {
    display: block;
}

/* Loading overlay for better UX */
.hybrid-login-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 8px;
}

/* Modal specific adjustments */
.modal .hybrid-login-container {
    min-height: 250px;
}

.modal .hybrid-step-1,
.modal .hybrid-step-2,
.modal .hybrid-step-2-register {
    padding: 0;
}

/* Theme Aster specific button styling */
.btn-primary.fs-16 {
    font-size: 1rem !important;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary.fs-16:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Flex alignment for phone confirmation */
.d-flex.align-items-center {
    gap: 0.5rem;
}

.d-flex.align-items-center .form-control {
    flex: 1;
}

.d-flex.align-items-center .btn-link {
    flex-shrink: 0;
    white-space: nowrap;
}
