/* CRM PWA install controls. Isolated styles: existing site layout is not changed. */
.pwa-install {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed rgba(255, 153, 0, .45);
}

.pwa-install__buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.pwa-install__btn {
    appearance: none;
    min-width: 0;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ink, #111827);
    font: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}

@media (hover: hover) {
    .pwa-install__btn:hover {
        color: var(--subnav-icon-hover, #fd9900);
    }
}

.pwa-install__btn:active {
    background: rgba(255, 255, 255, .7);
    border-color: var(--line, #d3d7e0);
    transform: translateY(1px);
}

.pwa-install__btn:focus-visible {
    outline: 2px solid var(--subnav-icon-hover, #fd9900);
    outline-offset: 2px;
}

.pwa-install__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: rgba(148, 163, 184, .9);
    fill: currentColor;
}

.pwa-install-modal[hidden] {
    display: none !important;
}

.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 18px;
}

/* Keep iPhone/iPad instructions high enough that Safari's share sheet
   can open from the bottom without covering the steps. */
.pwa-install-modal--ios {
    place-items: start center;
    padding-top: max(28px, calc(env(safe-area-inset-top, 0px) + 18px));
    padding-bottom: 45vh;
}

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

.pwa-install-modal__dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    border: 1px solid #e3e5ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .22);
    padding: 20px;
    color: #111827;
}

.pwa-install-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.pwa-install-modal__title {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
}

.pwa-install-modal__close {
    appearance: none;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid #e3e5ee;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-modal__close:hover {
    background: #f9fafb;
}

.pwa-install-modal__text {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.pwa-install-modal__steps {
    margin: 14px 0 0;
    padding-left: 22px;
    color: #111827;
    font-size: 14px;
    line-height: 1.55;
}

.pwa-install-modal__steps li + li {
    margin-top: 6px;
}

.pwa-install-modal__note {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

body.pwa-install-modal-open {
    overflow: hidden;
}
