/**
 * نافذة تثبيت PWA — تُحمَّل مع app.css (صفحة الضيف) ومع branch عبر Vite.
 * ألوان ثابتة حتى تعمل بدون متغيرات Tailwind على لوحة الفرع.
 */
.biotech-pwa-install-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

html.biotech-pwa-install-open,
html.biotech-pwa-install-open body {
    overflow: hidden;
    touch-action: none;
}

.biotech-pwa-install-root *,
.biotech-pwa-install-root *::before,
.biotech-pwa-install-root *::after {
    box-sizing: border-box;
}

.biotech-pwa-install-root.is-open {
    display: flex;
}

.biotech-pwa-install-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.biotech-pwa-install-card__brand {
    display: flex;
    justify-content: center;
    padding: 1.15rem 1.25rem 0;
}

.biotech-pwa-install-card__brand img {
    width: 5rem;
    height: 5rem;
    border-radius: 1.1rem;
    object-fit: contain;
    background: #f8fafc;
    box-shadow: 0 10px 28px -12px rgba(13, 148, 136, 0.45);
}

.biotech-pwa-install-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    max-height: min(92dvh, 640px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow:
        0 18px 50px -16px rgba(2, 8, 23, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    padding: 1.2rem 1.3rem 1.25rem;
}

@media (max-width: 575.98px) {
    .biotech-pwa-install-root {
        align-items: flex-end;
        padding: 0;
    }

    .biotech-pwa-install-card {
        max-width: none;
        border-radius: 1.35rem 1.35rem 0 0;
        max-height: min(88dvh, 520px);
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }
}

.biotech-pwa-install-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.biotech-pwa-install-card__title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0b1220;
    line-height: 1.35;
}

.biotech-pwa-install-card__x {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.65rem;
    background: rgba(241, 245, 249, 0.98);
    color: #475569;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}

.biotech-pwa-install-card__x:hover {
    background: rgba(226, 232, 240, 0.98);
    color: #0f172a;
}

.biotech-pwa-install-card__body {
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #52607a;
}

.biotech-pwa-install-card__body p {
    margin: 0 0 0.65rem;
}

.biotech-pwa-install-steps {
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: #0b1220;
}

.biotech-pwa-install-steps__list {
    margin: 0 0 0.75rem;
    padding-inline-start: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.biotech-pwa-install-steps__list li {
    line-height: 1.55;
}

.biotech-pwa-install-steps__note {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.biotech-pwa-install-share-icon {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 0.35rem;
    background: #ecfdf5;
    color: #0f766e;
    font-weight: 800;
    font-size: 0.85rem;
}

.biotech-pwa-install-card__body strong {
    color: #0b1220;
    font-weight: 700;
}

.biotech-pwa-install-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    align-items: center;
}

.biotech-pwa-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0 1.15rem;
    border-radius: 0.9rem;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.biotech-pwa-install-btn--ghost {
    color: #0b1220;
    background: rgba(248, 250, 252, 0.98);
    border-color: rgba(148, 163, 184, 0.55);
}

.biotech-pwa-install-btn--ghost:hover {
    filter: brightness(1.02);
    background: #f1f5f9;
}

.biotech-pwa-install-btn--primary {
    color: #fff;
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: 0 10px 26px -14px rgba(13, 148, 136, 0.65);
}

.biotech-pwa-install-btn--primary:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}
