/* "Install the app" sheet (mu-plugins/social-team-pwa.php).
   Markup is built by install-prompt.js: .st-install > .st-install__backdrop + .st-install__sheet */

.st-install {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: var(--font-primary, 'DIN Next LT Arabic', -apple-system, 'Segoe UI', Tahoma, sans-serif);
    color: #0F1F33;
    line-height: 1.7;
}

.st-install[hidden] {
    display: none !important;
}

html.st-install-lock,
html.st-install-lock body {
    overflow: hidden;
}

.st-install__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 32, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.st-install__sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -14px 40px rgba(15, 31, 51, 0.24);
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
    outline: none;
}

/* Sits above the bottom nav when it is on screen */
body.has-st-bottom-nav .st-install__sheet {
    margin-bottom: var(--st-bottom-nav-space, 0px);
}

.st-install.is-open .st-install__backdrop {
    opacity: 1;
}

.st-install.is-open .st-install__sheet {
    transform: none;
    opacity: 1;
}

.st-install__sheet::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: #D5DEE7;
    margin: -6px auto 14px;
}

/* ---------- head ---------- */
.st-install__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.st-install__app {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    flex: none;
    border: 1px solid #E7EDF3;
    background: #fff;
    display: grid;
    place-items: center;
}

.st-install__app img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.st-install__app--glyph {
    background: #0F1F33;
    border-color: #0F1F33;
    color: #4DAFE4;
}

.st-install__app--glyph .st-install__ic {
    width: 26px;
    height: 26px;
}

.st-install__titles {
    min-width: 0;
}

.st-install__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #0F1F33;
}

.st-install__sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6B7C90;
    line-height: 1.5;
    word-break: break-word;
}

/* ---------- icons ---------- */
.st-install__ic {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.st-install__glyph {
    display: inline-flex;
    vertical-align: -4px;
    color: #2E8FC7;
    margin-inline: 2px;
}

.st-install__glyph .st-install__ic {
    width: 18px;
    height: 18px;
}

/* ---------- android: perks ---------- */
.st-install__perks {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.st-install__perks li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #44566C;
    line-height: 1.5;
}

.st-install__perk-ic {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #E3F1FA;
    color: #2E8FC7;
    display: grid;
    place-items: center;
    flex: none;
}

.st-install__perk-ic .st-install__ic {
    width: 18px;
    height: 18px;
}

/* ---------- iOS: steps ---------- */
.st-install__steps {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 12px;
}

.st-install__step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #E7EDF3;
    border-radius: 16px;
    background: #FBFCFE;
}

.st-install__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0F1F33;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    flex: none;
}

.st-install__step-text {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #2B3A4D;
}

.st-install__step-text small {
    display: block;
    font-size: 11.5px;
    color: #8496A8;
    margin-top: 2px;
}

.st-install__art {
    flex: none;
    width: 80px;
    display: grid;
    place-items: center;
}

.st-install__art-svg {
    width: 80px;
    height: 56px;
    display: block;
}

.st-install__toggle {
    display: inline-block;
    width: 26px;
    height: 16px;
    border-radius: 8px;
    background: #4CC38A;
    position: relative;
    vertical-align: -3px;
    margin-inline-end: 6px;
    flex: none;
}

.st-install__toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-end: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
}

/* ---------- shared bits ---------- */
.st-install__note,
.st-install__text {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.7;
    color: #6B7C90;
    background: #F4F7FA;
    border-radius: 12px;
    padding: 10px 12px;
}

.st-install__url {
    width: 100%;
    margin-bottom: 14px;
    padding: 11px 12px;
    border: 1px solid #E7EDF3;
    border-radius: 12px;
    background: #F7F9FB;
    font-family: inherit;
    font-size: 12.5px;
    color: #44566C;
}

.st-install__sr {
    margin: 10px 0 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #1F8A5B;
    text-align: center;
    min-height: 1em;
}

/* ---------- actions ---------- */
.st-install__actions {
    display: flex;
    gap: 10px;
}

.st-install__btn {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background 0.2s ease;
}

.st-install__btn:active {
    transform: scale(0.98);
}

.st-install__btn:focus-visible {
    outline: 2px solid #2E8FC7;
    outline-offset: 2px;
}

.st-install__btn--primary {
    background: #0F1F33;
    color: #fff;
}

.st-install__btn--primary .st-install__ic {
    color: #4DAFE4;
}

.st-install__btn--ghost {
    background: #F1F5F9;
    color: #44566C;
}

.st-install__btn .st-install__ic {
    width: 18px;
    height: 18px;
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
    .st-install {
        align-items: center;
    }

    .st-install__sheet {
        border-radius: 22px;
        margin: 20px;
        padding-bottom: 20px;
    }

    body.has-st-bottom-nav .st-install__sheet {
        margin-bottom: 20px;
    }

    .st-install__sheet::before {
        display: none;
    }
}

/* ---------- small phones ---------- */
@media (max-width: 360px) {
    .st-install__sheet {
        padding-inline: 16px;
    }

    .st-install__title {
        font-size: 16.5px;
    }

    .st-install__art,
    .st-install__art-svg {
        width: 64px;
    }

    .st-install__art-svg {
        height: 45px;
    }

    .st-install__btn {
        height: 44px;
        font-size: 13.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-install__backdrop,
    .st-install__sheet,
    .st-install__btn {
        transition: none;
    }

    .st-install__sheet {
        transform: none;
    }
}
