/* Authentication Modal Styles */

/* Modal Overlay */
.auth-modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-modal-content .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 1.5rem 1rem;
}

.auth-modal-content .modal-title {
    color: #4e2487;
    font-weight: 600;
    font-size: 1.5rem;
}

.auth-modal-content .modal-body {
    padding: 1.5rem;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.country-code-display {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    transition: border-color 0.3s ease;
}

.phone-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.phone-input:focus {
    border-color: #4e2487;
    box-shadow: 0 0 0 0.2rem rgba(78, 36, 135, 0.25);
    outline: none;
}

/* OTP Inputs */
.otp-inputs {
    margin-bottom: 1.5rem;
}

.otp-digit {
    width: 55px;
    height: 55px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.otp-digit:focus {
    border-color: #4e2487;
    box-shadow: 0 0 0 0.2rem rgba(78, 36, 135, 0.25);
    outline: none;
}

.otp-digit.filled {
    border-color: #4e2487;
    background-color: rgba(78, 36, 135, 0.05);
}

/* Buttons */
.send-otp-btn,
.verify-otp-btn {
    background-color: #4e2487;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.send-otp-btn:hover,
.verify-otp-btn:hover {
    background-color: #3a1d6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 36, 135, 0.3);
}

.send-otp-btn:disabled,
.verify-otp-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-spinner i {
    font-size: 1rem;
}

/* Timer Display */
.timer-display {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timer-display i {
    margin-right: 0.5rem;
}

.timer-display.warning {
    color: #dc3545;
}

.timer-display.expired {
    color: #dc3545;
    font-weight: 600;
}

/* Error Messages */
.error-message {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Success State */
.success-state {
    padding: 2rem 1rem;
}

.success-icon {
    animation: scaleIn 0.5s ease;
}

.success-icon i {
    color: #28a745;
}

.success-state h4 {
    color: #28a745;
    margin: 1rem 0 0.5rem;
}

.success-state p {
    color: #6c757d;
    margin: 0;
}

/* Links */
.resend-link,
.change-number-link {
    color: #4e2487;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.resend-link:hover,
.change-number-link:hover {
    color: #3a1d6b;
    text-decoration: underline;
}

.resend-link.disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
}

.resend-link.disabled:hover {
    color: #6c757d;
    text-decoration: none;
}

/* Separator */
.separator {
    color: #6c757d;
    margin: 0 0.5rem;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-modal-content .modal-body {
        padding: 1rem;
    }
    
    .phone-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .country-code-display {
        flex: none;
    }
    
    .otp-digit {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .otp-inputs {
        gap: 0.4rem;
    }
    
    .send-otp-btn,
    .verify-otp-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Focus States for Accessibility */
.send-otp-btn:focus,
.verify-otp-btn:focus {
    outline: 2px solid #4e2487;
    outline-offset: 2px;
}

/* Masked Phone Display */
#maskedPhone {
    color: #4e2487;
    font-weight: 600;
}

/* Loading State */
.auth-modal-content.loading {
    pointer-events: none;
}

.auth-modal-content.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}
