/* The install hint. Built by pwa-install.js, styled here.
 *
 * A slim bar pinned to the bottom rather than a modal: this is an offer, not a
 * decision the visitor has to make before continuing. Nothing about the page
 * moves when it appears (it is fixed), so it can never push a control the
 * person was reaching for.
 */
.iw-install {
    position: fixed;
    left: 12px;
    right: 12px;
    /* Clear of the iPhone home indicator. */
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1040;               /* under Bootstrap's modal (1055), over content */
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    font-size: 0.9rem;
    color: #212529;
    /* Enters from below so it reads as arriving, not as always having been
       there and missed. */
    transform: translateY(140%);
    transition: transform 0.28s ease;
}
.iw-install.is-open { transform: translateY(0); }

.iw-install img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    flex: 0 0 auto;
}
.iw-install-text { flex: 1 1 auto; line-height: 1.35; }
.iw-install-text strong { display: block; font-size: 0.95rem; }
.iw-install-text span { color: #6c757d; font-size: 0.82rem; }

.iw-install button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.iw-install .iw-install-go {
    background: #27ae60;
    color: #fff;
    /* 44px is the floor for a thumb target. Set as a min-height rather than
       trusted to fall out of the padding — measured at 38px when it was. */
    min-height: 44px;
    padding: 11px 18px;
    font-size: 0.9rem;
}
.iw-install .iw-install-no {
    background: transparent;
    color: #6c757d;
    font-size: 1.4rem;
    line-height: 1;
    /* Same floor: dismissing must not be the fiddly option. */
    min-width: 44px;
    min-height: 44px;
    padding: 6px 8px;
}

@media (max-width: 420px) {
    /* The instruction wording is longer than the button, so on a narrow phone
       the row is given its own line rather than squeezing the text. */
    .iw-install { flex-wrap: wrap; }
    .iw-install-text { flex: 1 1 60%; }
}

@media (prefers-reduced-motion: reduce) {
    .iw-install { transition: none; }
}
