/* OTP Modal Styles */
#swi-otp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#swi-otp-modal-overlay.swi-modal-overlay-open {
    display: flex;
}

#swi-otp-modal {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    text-align: center;
}

#swi-otp-modal .swi-modal-title {
    color: #ff1ea4;
    margin-bottom: 15px;
}

#swi-otp-modal .swi-modal-paragraph {
    margin-bottom: 15px;
    color: #333;
}

#swi-otp-modal #otp-modal-email {
    color: #ff1ea4;
    word-break: break-all;
}

.otp-countdown-timer {
    background-color: rgba(255, 30, 164, 0.07);
    color: #ff1ea4;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 4-digit OTP input boxes */
.swi-otp-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.swi-otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.swi-otp-input:focus {
    border-color: #ff1ea4;
}

.swi-otp-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.swi-otp-error-msg-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

.swi-otp-error-msg-container i {
    font-size: 18px;
}

@media screen and (max-width: 480px) {
    .swi-otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

.otp-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.otp-modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.otp-modal-actions .edit-email-btn,
.otp-modal-actions .resend-otp-btn {
    position: static;
    transform: none;
    color: #ff1ea4;
    text-decoration: underline;
    background-color: transparent !important;
    padding: 5px 10px;
    box-shadow: none;
    height: fit-content;
    min-height: fit-content;
    cursor: pointer;
    border: none;
    font-family: 'Poppins';
    font-size: 14px;
    pointer-events: auto;
    z-index: 10;
}

.otp-modal-actions .edit-email-btn::after,
.otp-modal-actions .resend-otp-btn::after {
    display: none;
}

.otp-modal-actions .edit-email-btn:hover,
.otp-modal-actions .resend-otp-btn:hover {
    color: #cc1885;
}

.otp-modal-actions .resend-otp-btn:disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

#swi-otp-modal .verify-code {
    display: block;
    background-color: #ff1ea4;
    color: #fff;
    border: 1px solid #ff1ea4;
    border-radius: 5px;
    padding: 12px 20px;
    font-family: 'Poppins';
    font-size: 16px;
    cursor: pointer;
    transition: all 300ms ease;
}

.otp-input-wrapper {
    width: 100%;
}

#swi-otp-modal .verify-code:hover {
    background-color: transparent;
    color: #ff1ea4;
}

#swi-otp-modal .verify-code:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Loading and sending states */
.otp-sending-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.otp-sending-message::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #ff1ea4;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: otp-spin 1s linear infinite;
}

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

/* Enhanced error states */
.otp-countdown-timer .text-danger {
    color: #dc3545;
    font-weight: 500;
}

/* Smooth transitions for state changes */
.otp-countdown-timer,
.swi-otp-input,
.resend-otp-btn {
    transition: all 0.3s ease;
}

/* Better focus management */
.swi-otp-input:focus:not(:disabled) {
    border-color: #ff1ea4;
    box-shadow: 0 0 0 3px rgba(255, 30, 164, 0.1);
}