/*
 * شكل زر تثبيت التطبيق العائم.
 * ألوانه ثابتة لا تعتمد على متغيّرات الصفحة، لأنه يظهر في صفحات
 * ذات أنظمة ألوان مختلفة (تسجيل الدخول بخلفية زرقاء، ولوحة الدعم
 * بخلفية فاتحة، والبحث بوضعين فاتح وداكن).
 */

.mt-install {
    position: fixed;
    inset-inline-end: 16px;
    bottom: 84px;                 /* فوق شريط التنقل السفلي */
    z-index: 4000;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .35s ease, transform .35s ease;
}
.mt-install.show { opacity: 1; transform: translateY(0); }

.mt-install-main {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px 11px 14px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, #5b93ee, #2563eb);
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 10px 26px -8px rgba(37, 99, 235, 0.75);
    transition: transform .15s ease, box-shadow .15s ease;
}
.mt-install-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(37, 99, 235, 0.9);
}
.mt-install-main:active { transform: translateY(0); }

/* السهم ينزل ويرجع - حركة خفيفة تلفت النظر بلا إزعاج */
.mt-install-arrow {
    display: inline-flex;
    animation: mtInstallBob 2s ease-in-out infinite;
}
.mt-install-arrow svg { width: 18px; height: 18px; display: block; }

@keyframes mtInstallBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}

/* من يفضّل تقليل الحركة لا نحرّك له شيئًا */
@media (prefers-reduced-motion: reduce) {
    .mt-install-arrow { animation: none; }
    .mt-install { transition: none; }
}

.mt-install-close {
    position: absolute;
    top: -7px;
    inset-inline-start: -7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #1e293b;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

/* على الشاشات الضيقة نُبقي السهم ونخفي النص */
@media (max-width: 380px) {
    .mt-install-text { display: none; }
    .mt-install-main { padding: 12px; }
}

/* ---------- شرح التثبيت على آيفون ---------- */

.mt-ios-back {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
}
.mt-ios-back.show { opacity: 1; }

.mt-ios-sheet {
    width: 100%;
    max-width: 460px;
    background: #fff;
    color: #172033;
    border-radius: 20px 20px 0 0;
    padding: 22px 22px 26px;
    font-family: inherit;
    transform: translateY(100%);
    transition: transform .3s ease;
}
.mt-ios-back.show .mt-ios-sheet { transform: translateY(0); }

.mt-ios-title { font-size: 16px; font-weight: 800; margin-bottom: 14px; }

.mt-ios-steps {
    margin: 0 0 18px;
    padding-inline-start: 20px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 2.1;
}
.mt-ios-steps li { margin-bottom: 4px; }

.mt-ios-ico {
    display: inline-flex;
    vertical-align: middle;
    color: #2563eb;
}
.mt-ios-ico svg { width: 16px; height: 16px; }

.mt-ios-ok {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #5b93ee, #2563eb);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
}
