/* Static, optional install action. Only an explicit click opens the help dialog. */
.pwa-install-area {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 14px;
    width: 100%;
    padding: 16px 20px;
    color: #52654d;
    font-family: 'Inter', system-ui, sans-serif;
}
.pwa-install-area[hidden], [data-pwa-install][hidden], [data-pwa-launch][hidden] { display: none !important; }
.pwa-install-button, .pwa-help .pwa-help-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #cddcc8;
    border-radius: 8px;
    background: #f3f8ee;
    color: #375c35;
    font: inherit;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}
.pwa-install-button:hover, .pwa-help .pwa-help-close:hover { background: #e8f1de; border-color: #a6bf98; }
.pwa-install-button:disabled { cursor: progress; opacity: .65; }
.pwa-install-status { max-width: 650px; font-size: 11px; line-height: 1.5; }
.pwa-install-status:empty { display: none; }
.pwa-help {
    position: fixed;
    inset: 0;
    width: min(480px, calc(100vw - 30px));
    height: max-content;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 25px;
    overflow: auto;
    border: 1px solid #d2dfca;
    border-radius: 15px;
    background: #fffef9;
    color: #293d28;
    box-shadow: 0 22px 75px rgb(11 29 14 / 26%);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.65;
}
.pwa-help:not([open]) { display: none; }
.pwa-help::backdrop { background: rgb(17 35 22 / 50%); }
.pwa-help.pwa-help-fallback { z-index: 9500; height: max-content; box-shadow: 0 0 0 100vmax rgb(17 35 22 / 50%), 0 22px 75px rgb(11 29 14 / 26%); }
.pwa-help-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pwa-help .pwa-help-eyebrow { display: block; margin-bottom: 5px; color: #7d8e70; font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.pwa-help h2 { margin: 0; color: inherit; font-family: inherit; font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: -.03em; }
.pwa-help h3 { margin: 0 0 13px; color: #547049; font-family: inherit; font-size: 13px; font-weight: 600; }
.pwa-help .pwa-help-close { flex: 0 0 33px; min-width: 33px; min-height: 33px; padding: 0; font-size: 23px; line-height: 1; }
.pwa-help-steps { margin: 0; padding-left: 24px; }
.pwa-help-steps li { margin: 0 0 13px; padding-left: 4px; }
.pwa-help-steps li::marker { color: #648051; font-weight: 650; }
.pwa-help .pwa-help-note { margin: 20px 0 0; padding: 13px 15px; border-radius: 8px; background: #f1f6ea; color: #617253; font-size: 12px; }
:is(.pwa-install-button, .pwa-help button):focus-visible { outline: 3px solid #8aa761; outline-offset: 3px; }
body.admin-modern > .pwa-install-area { padding-left: calc(var(--admin-sidebar-width, 232px) + 20px); }
body.admin-modern.admin-sidebar-collapsed > .pwa-install-area { padding-left: 20px; }
body:has(> .login-box):has(> .pwa-install-area) { flex-direction: column; gap: 8px; padding: 20px; }
body:has(> .login-box) > .pwa-install-area { padding: 8px 0; }
body.admin-modern .admin-sidebar-footer .pwa-install-area { justify-content: flex-start; padding: 12px 0 0; }
body.admin-modern .admin-sidebar-footer .pwa-install-status { color: #d0e0c7; }
@media screen {
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-install-area { color: #b6c8ab; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-install-button,
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help .pwa-help-close { background: #314a32; border-color: #58754f; color: #d8eccb; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-install-button:hover,
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help .pwa-help-close:hover { background: #405f3e; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help { background: #213326; border-color: #57704c; color: #e0eed6; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help :is(h3, .pwa-help-eyebrow) { color: #b4cf9f; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help .pwa-help-note { background: #2e4430; color: #c2d5b1; }
    html[data-admin-theme="dark"] body:is(.admin-modern, .billing-modern) .pwa-help-steps li::marker { color: #b4cf9f; }
}
@media (max-width: 900px) { body.admin-modern > .pwa-install-area { padding-left: 20px; } }
@media (max-width: 480px) {
    .pwa-help { padding: 21px 18px; border-radius: 12px; font-size: 13px; }
    .pwa-help h2 { font-size: 20px; }
    .pwa-install-status { flex-basis: 100%; text-align: center; }
}
@media print { .pwa-install-area, .pwa-help, [data-pwa-launch] { display: none !important; } }
