/* استایل کلی فرم */
#tw_mobile_login_register {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#tw_mobile_login_register figure {
    text-align: center;
    margin: 0 0 30px 0;
}

#tw_mobile_login_register figure img {
    max-width: 150px;
    height: auto;
}

/* استایل فیلدهای ورودی */
.tw_number,
.tw_code_u {
    margin-bottom: 20px;
}

.tw_phone_number,
.tw_code_u input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tw_phone_number:focus,
.tw_code_u input[type="text"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* استایل دکمه‌ها */
#tw_mobile_login_register button {
    width: 100%;
    padding: 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#tw_mobile_login_register button:hover {
    background: #005a87;
    transform: translateY(-2px);
}

#tw_mobile_login_register button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* استایل هشدارها */
.tw_alert_show {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border-right: 4px solid #007cba;
}

.tw_alert_show p {
    margin: 0 0 10px 0;
    color: #495057;
}

.tw_change_number {
    color: #007cba;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.tw_change_number:hover {
    color: #005a87;
}

/* استایل تایمر */
.flex.tw_countdown {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.tw_resend_code {
    color: #007cba;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
}

.tw_resend_code:hover {
    color: #005a87;
    text-decoration: underline;
}

.tw_count_number {
    color: #dc3545;
    font-weight: bold;
    margin: 0;
    font-size: 14px;
}

/* استایل پیام‌های وضعیت */
.tw_login_alert {
    margin-top: 20px;
}

.tw_success_alert {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.tw_code_error_alert {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* استایل برای حالت لودینگ */
.tarlanweb-sms-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.tarlanweb-sms-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: tarlanweb-sms-spin 1s linear infinite;
}

@keyframes tarlanweb-sms-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* استایل رسپانسیو */
@media (max-width: 480px) {
    #tw_mobile_login_register {
        margin: 20px;
        padding: 20px;
    }
    
    .flex.tw_countdown {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* استایل برای صفحه پرداخت ووکامرس */
.tarlanweb-sms-checkout-login {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.tarlanweb-sms-checkout-login #tw_mobile_login_register {
    max-width: 100%;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

/* استایل برای کاربران لاگین شده */
.tarlanweb-sms-already-logged-in {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}