/* استایل‌های فرانت‌اند پلاگین */

.utta-sms-form .input-wrapper {
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.utta-sms-form .input-wrapper input {
    background: transparent;
}

.utta-sms-form .input-wrapper:hover {
    border: 1px solid var(--sms-base-color);
}

.utta-sms-form .input-wrapper:focus {
    border: 1px solid var(--sms-base-color);
}

/* فرم‌های احراز هویت دو مرحله‌ای */
.utta-two-factor-form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.utta-two-factor-form h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.utta-form-field {
    margin: 2rem 0;
}

.utta-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.utta-form-field input[type="tel"],
.utta-form-field input[type="text"],
.utta-form-field input[type="password"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.utta-form-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.utta-verification-code-input {
    text-align: center;
    letter-spacing: 2px;
    font-size: 18px;
    font-weight: bold;
}

.utta-otp-inputs {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.utta-otp-digit {
    width: 3rem;
    height: 3rem;
    text-align: center;
}

/* دکمه‌ها */
.utta-btn {
    background: var(--sms-base-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.utta-btn:hover {
    filter: brightness(95%);
}

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

.utta-btn-secondary {
    background: #666;
}

.utta-btn-secondary:hover {
    background: #444;
}

.utta-phone-display {
    margin-top: .75rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.utta-edit-phone {
    color: #0488d9;
}

.submit-btn {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
    background: var(--sms-base-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
}

/* لینک ارسال مجدد */
.utta-resend-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}

.utta-resend-link:hover {
    text-decoration: underline;
}

.utta-resend-disabled {
    color: #999;
    cursor: not-allowed;
    text-decoration: none !important;
}

/* پیام‌های وضعیت */
.utta-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

.utta-message.success {
    color: #00c950;
}

.utta-message.error {
    color: #fb2c36;
}

.utta-message.info {
    color: #055160;
}

.utta-message.warning {
    color: #664d03;
}

/* Loader */
.utta-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: uttaLoader 1s linear infinite;
    margin-left: 8px;
}

@keyframes uttaLoader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* تایمر شمارش معکوس */
.utta-countdown {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.utta-countdown.active {
    color: #0073aa;
    font-weight: 600;
}

/* فیلدهای ووکامرس */
.woocommerce .utta-phone-field {
    position: relative;
}

.woocommerce .utta-phone-verify-btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #0073aa;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .utta-two-factor-form {
        margin: 10px;
        padding: 15px;
    }

    .utta-otp-digit {
        width: 2.5rem;
        height: 2.5rem;
    }

    .utta-otp-inputs {
        gap: 0.5rem;
    }
}

/* فرم ورود وردپرس */
#loginform .utta-two-factor-fields {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

#loginform .utta-verification-input {
    margin-bottom: 10px;
}

#loginform .utta-resend-code {
    text-align: center;
    margin-top: 10px;
}

/* فرم ثبت نام وردپرس */
#registerform .utta-phone-field {
    margin-bottom: 16px;
}

/* انیمیشن‌ها */
.utta-fade-in {
    animation: uttaFadeIn 0.5s ease-in-out;
}

.utta-slide-down {
    animation: uttaSlideDown 0.3s ease-out;
}

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

@keyframes uttaSlideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

body.rtl .woocommerce .utta-phone-verify-btn {
    right: 5px;
    left: auto;
}