/* OTP Modal Styles */
.otp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.otp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.otp-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    position: relative;
}

.otp-modal-overlay.active .otp-modal {
    transform: translateY(0);
}

.otp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f8f9fa;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #6c757d;
}

.otp-modal-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}

.otp-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.otp-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e95085 0%, rgba(236, 57, 118, 0.86) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: #fff;
}

.otp-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.otp-modal-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Delivery Method Selection */
.otp-delivery-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.otp-method-btn {
    padding: 20px 10px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.otp-method-btn:hover {
    border-color: #e95085;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.otp-method-btn.active {
    border-color: #e95085;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.otp-method-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.otp-method-btn.active .otp-method-icon {
    color: #e95085;
}

.otp-method-text {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    display: block;
}

.otp-method-btn.active .otp-method-text {
    color: #e95085;
}

/* OTP Input Section */
.otp-input-section {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.otp-input-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-sent-info {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.otp-sent-info p {
    margin: 0;
    font-size: 14px;
    color: #495057;
}

.otp-sent-destination {
    font-weight: 700;
    color: #e95085;
}

/* OTP Input Boxes */
.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
}

.otp-input {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.otp-input:focus {
    border-color: #e95085;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.otp-input.filled {
    border-color: #e95085;
    background: #fff;
}

.otp-input.error {
    border-color: #dc3545;
    background: #fff5f5;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Timer and Resend */
.otp-timer-section {
    text-align: center;
    margin-bottom: 20px;
}

.otp-timer {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.otp-timer-countdown {
    font-weight: 700;
    color: #e95085;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: #e95085;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.otp-resend-btn:hover:not(:disabled) {
    color: rgba(236, 57, 118, 0.86);
    text-decoration: underline;
}

.otp-resend-btn:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* Action Buttons */
.otp-actions {
    display: flex;
    gap: 12px;
}

.otp-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.otp-btn-primary {
    background: linear-gradient(135deg, #e95085 0%, rgba(236, 57, 118, 0.86) 100%);
    color: #fff;
}

.otp-btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.otp-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.otp-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.otp-btn-secondary:hover {
    background: #e9ecef;
}

/* Loading State */
.otp-btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.otp-btn.loading .spinner {
    display: inline-block;
}

.otp-btn.loading .btn-text {
    display: none;
}

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

/* Success State */
.otp-success {
    display: none;
    text-align: center;
    animation: fadeInUp 0.4s ease;
}

.otp-success.active {
    display: block;
}

.otp-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 50px;
    color: #fff;
    animation: successPop 0.6s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.otp-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 10px;
}

.otp-success-text {
    font-size: 14px;
    color: #6c757d;
}

/* Error Message */
.otp-error-message {
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: none;
    animation: fadeInUp 0.3s ease;
}

.otp-error-message.active {
    display: flex;
    align-items: center;
    gap: 10px;
}

.otp-error-icon {
    color: #dc3545;
    font-size: 20px;
}

.otp-error-text {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Responsive */
@media (max-width: 576px) {
    .otp-modal {
        padding: 30px 20px;
    }

    .otp-modal-title {
        font-size: 20px;
    }

    .otp-delivery-methods {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .otp-method-btn {
        display: flex;
        align-items: center;
        padding: 15px;
        text-align: left;
    }

    .otp-method-icon {
        margin-bottom: 0;
        margin-right: 12px;
        font-size: 28px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 45px;
        height: 52px;
        font-size: 20px;
    }

    .otp-actions {
        flex-direction: column;
    }
}

/* Dark Theme Support */
.dark-theme .otp-modal {
    background: #1a1a1a;
}

.dark-theme .otp-modal-title {
    color: #fff;
}

.dark-theme .otp-modal-subtitle {
    color: #adb5bd;
}

.dark-theme .otp-modal-close {
    background: #2a2a2a;
    color: #adb5bd;
}

.dark-theme .otp-modal-close:hover {
    background: #3a3a3a;
    color: #fff;
}

.dark-theme .otp-method-btn {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

.dark-theme .otp-method-btn:hover {
    background: #3a3a3a;
}

.dark-theme .otp-input {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #fff;
}

.dark-theme .otp-input:focus {
    background: #1a1a1a;
}

.dark-theme .otp-sent-info {
    background: #2a2a2a;
}

.dark-theme .otp-sent-info p {
    color: #adb5bd;
}

.dark-theme .otp-btn-secondary {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #adb5bd;
}

.dark-theme .otp-btn-secondary:hover {
    background: #3a3a3a;
}
