/* ملف: assets/css/tm-otp-style.css */
@keyframes tmSpin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

@keyframes tmFadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.tm-fade-in { 
    animation: tmFadeIn 0.4s ease-out forwards; 
}

#tm-otp-main-container { 
    transition: height 0.3s ease-in-out; 
    overflow: hidden; 
}

.tm-otp-ajax-form button:active { 
    transform: scale(0.98); 
}

.tm-otp-spinner {
    border: 3px solid #f3f3f3; 
    border-top: 3px solid #985aae; 
    border-radius: 50%; 
    width: 35px; 
    height: 35px; 
    animation: tmSpin 1s linear infinite;
}
/* العناوين داخل الخطوات */
.tm-otp-step-title {
    text-align: center;
    color: #985aae;
    font-weight: bold;
    margin-bottom: 15px;
}

/* حقل إدخال الكود */
.tm-otp-input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #985aae;
    border-radius: 8px;
    margin-bottom: 15px;
    box-sizing: border-box; /* لضمان عدم خروج الحقل عن الحاوية */
}

.tm-otp-code-style {
    font-size: 24px;
    text-align: center;
    letter-spacing: 5px;
}

/* الأزرار الرئيسية */
.tm-otp-btn-main {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.tm-otp-btn-green {
    background: #28a745;
    color: #fff;
}
.tm-otp-btn-green:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

/* روابط التذييل (تغيير البيانات وإعادة الإرسال) */
.tm-otp-footer-links {
    text-align: center;
    margin-top: 20px;
}

.tm-otp-btn-link {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}
.tm-otp-btn-link:hover {
    background: none;
    border: none;
    color: #8f8e8e;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

.tm-otp-resend-wrapper {
    text-align: center;
    margin-top: 15px;
}

.tm-otp-btn-resend {
    background: none;
    border: none;
    color: #985aae;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
}
.tm-otp-btn-resend:hover {
    background: none;
    border: none;
    color: #8f5ba1;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
}
.tm-otp-btn-resend:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
/* حاوية الحقل والملصق */
.tm-otp-field-wrapper {
    margin-bottom: 15px;
    text-align: right;
}

/* ملصق الحقل (أسود/رمادي) */
.tm-otp-label-secondary {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

/* نص المساعدة الصغير */
.tm-otp-help-text {
    color: #666;
    font-size: 11px;
    display: block;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* لون الزر البنفسجي */
.tm-otp-btn-purple {
    background: #985aae;
    color: #fff;
}
.tm-otp-btn-purple:hover {
    background: #7a3e8f; 
    color: #fff;         
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}

/* لدعم الاتجاه من اليسار لليمين في أرقام الهواتف */
.tm-otp-ltr {
    direction: ltr;
    text-align: right;
}
/* الحاوية الرئيسية */
.tm-otp-main-box {
    max-width: 400px;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #985aae;
    border-radius: 15px;
    direction: rtl;
    text-align: right;
    background: #fff;
    box-shadow: 0 10px 25px rgba(94, 22, 235, 0.1);
    position: relative;
    min-height: 100px;
}

/* رسالة "أنت مسجل الدخول بالفعل" */
.tm-otp-already-logged {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* طبقة التحميل (Loader Overlay) */
.tm-otp-loader-overlay {
    display: none; /* يتم تفعيله عبر JS */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

/* تصميم السبينر (إذا لم يكن موجوداً لديك) */
.tm-otp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #985aae;
    border-radius: 50%;
    animation: tm-spin 1s linear infinite;
}

@keyframes tm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* الليبل الرئيسي (بنفسجي) */
.tm-otp-label-main {
    font-weight: bold;
    color: #985aae;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

/* حقول القوائم المنسدلة */
.tm-otp-select-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #985aae;
    border-radius: 8px;
    background-color: #fff;
    font-size: 14px;
}

/* مجموعة الإدخال (الجوال + الكود) */
.tm-otp-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tm-otp-flex-1 { flex: 1; }
.tm-otp-w-100 { width: 100px; }

/* تنسيق عام لحاويات الحقول */
.tm-otp-method-fields {
    margin-bottom: 5px;
}