/* Basic styling for the popup */
.popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* background-color: #022249; */
    opacity: 1;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 500px;
    margin: auto;
}

.otp-field {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    margin: 5px;
}

.message {
    margin-top: 10px;
    font-size: 16px;
    color: red;
}

.message.fade-out {
    opacity: 0;
}

.hidden {
    display: none;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.acenter {
    text-align: center;
}

a.acenter {
    display: block;
}

/* Loading Spinner Styles */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading-dark::after {
    border-top-color: #333333;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* OTP Button Loading State */
#otpbtn.btn-loading {
    background-color: #e0a800;
    color: transparent;
    min-width: 80px;
}

#otpbtn.btn-loading::after {
    border-top-color: #333;
}

/* Submit Button Loading State */
#submitBtn.btn-loading {
    background-color: #0056b3;
    color: transparent;
    min-width: 100px;
}

/* Success Message Styling */
.otp-success {
    color: #28a745;
    font-weight: bold;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Enhanced Popup Styling */
.popup-content h2 {
    color: #022249;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Form Input Focus States */
.popup-content .form-control:focus {
    border-color: #f58220;
    box-shadow: 0 0 0 0.2rem rgba(245, 130, 32, 0.25);
}

/* Button Hover Effects */
.popup-content .btn-primary:hover:not(.disabled):not(.btn-loading) {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.popup-content .btn-warning:hover:not(.disabled):not(.btn-loading) {
    background-color: #e0a800;
    transform: translateY(-1px);
}

.popup-content .btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Validation Message Styling */
#validationMessage {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

/* OTP Popup Enhancements */
#otpPopup .popup-content {
    max-width: 400px;
}

#otpMessage {
    min-height: 20px;
    margin-top: 10px;
}

#otpMessage.success {
    color: #28a745;
}

#otpMessage.error {
    color: #dc3545;
}