/* OTP Popup Container */
.otp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.otp-popup-overlay.show {
    opacity: 1;
}

.otp-popup-content {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.otp-popup-overlay.show .otp-popup-content {
    transform: translateY(0);
}

.otp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.otp-popup-close:hover {
    color: #000;
}

.otp-popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.otp-popup-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Form Elements */
.otp-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.otp-input-wrapper {
    position: relative;
}

.otp-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    outline: none;
}

.otp-form-control:focus {
    border-color: #000;
}

.otp-form-control.is-invalid {
    border-color: #dc3545;
}

.otp-error-msg {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* Buttons */
.otp-btn {
    width: 100%;
    padding: 12px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.otp-btn:hover {
    background-color: #333;
}

.otp-btn:active {
    transform: scale(0.98);
}

.otp-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* OTP Step Handling */
.otp-step-2 {
    display: none;
}

.resend-otp-link {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #000;
    text-decoration: underline;
    cursor: pointer;
}

.resend-otp-link:hover {
    color: #333;
}

.resend-otp-link.disabled {
    color: #999;
    cursor: default;
    text-decoration: none;
}

/* Use standard spinners if available, else simple one */
.otp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: otp-spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 10px;
    display: none;
}

@keyframes otp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .otp-popup-content {
        padding: 2rem 1.5rem;
        width: 90%;
    }
}