/* "Get the App" banner (Home), Account tab row, the Add to Home Screen sheet,
   and the installed-app shell (no site footer, iPhone launch splash). */

html.shefa-pwa-standalone .site-footer {
    display: none !important;
}

html.shefa-pwa-standalone body:has(.shefa-chat-page) footer.site-footer {
    display: none !important;
}

@media (display-mode: standalone) {
    .site-footer {
        display: none !important;
    }

    body:has(.shefa-chat-page) footer.site-footer {
        display: none !important;
    }
}

.shefa-pwa-splash {
    display: none;
}

html.shefa-pwa-launching .shefa-pwa-splash {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 3000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    background: #fff;
    transition: opacity 0.3s ease;
}

html.shefa-pwa-launching .shefa-pwa-splash.is-leaving {
    opacity: 0;
}

.shefa-pwa-splash img {
    width: 42vw;
    max-width: 220px;
    height: auto;
    border-radius: 50%;
}

.shefa-pwa-splash span {
    color: #2f6b2c;
    font-family: Signika, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.shefa-pwa-banner[hidden],
.shefa-pwa-account-row[hidden],
.shefa-pwa-sheet[hidden] {
    display: none !important;
}

.shefa-pwa-banner {
    display: none;
}

@media (max-width: 991.98px) {
    .shefa-pwa-banner {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        z-index: 1039;
        padding: 6px 8px 6px 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid #d5ead2;
        box-shadow: 0 10px 28px rgba(51, 59, 50, 0.16);
        -webkit-backdrop-filter: blur(18px) saturate(1.6);
        backdrop-filter: blur(18px) saturate(1.6);
    }

    html.shefa-has-member-tabs .shefa-pwa-banner {
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}

.shefa-pwa-banner-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
}

.shefa-pwa-banner-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.shefa-pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.shefa-pwa-banner-text strong {
    color: #2f6b2c;
    font-size: 0.98rem;
}

.shefa-pwa-banner-text small {
    color: #5c665a;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shefa-pwa-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e4efe2;
    color: #333b32;
    font-size: 0.95rem;
    line-height: 1;
}

.shefa-pwa-account-row {
    width: 100%;
    font: inherit;
    font-weight: 600;
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    text-align: left;
}

.shefa-pwa-sheet {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.shefa-pwa-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.shefa-pwa-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-radius: 1.25rem 1.25rem 0 0;
    background: #fff;
    color: #333b32;
    text-align: center;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
}

@media (prefers-reduced-motion: no-preference) {
    .shefa-pwa-sheet-panel {
        animation: shefaPwaSheetUp 0.25s ease-out;
    }
}

@keyframes shefaPwaSheetUp {
    from { transform: translateY(100%); }
    to { transform: none; }
}

.shefa-pwa-sheet-panel > .shefa-pwa-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
}

.shefa-pwa-sheet-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.shefa-pwa-sheet-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2f6b2c;
    margin: 0 0 1rem;
}

.shefa-pwa-chrome-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.9rem;
    background: #eef4ff;
    color: #1a3d8f;
    text-align: left;
    text-decoration: none;
}

.shefa-pwa-chrome-badge > i {
    flex: 0 0 auto;
    font-size: 1.6rem;
    color: #1a73e8;
}

.shefa-pwa-chrome-badge span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.shefa-pwa-chrome-badge strong {
    font-size: 0.95rem;
}

.shefa-pwa-chrome-badge small {
    font-size: 0.82rem;
    color: #3d5680;
}

.shefa-pwa-sheet-note {
    margin: -0.5rem 0 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    background: #fff4e5;
    color: #7a4a0c;
    font-size: 0.9rem;
    text-align: left;
}

.shefa-pwa-steps {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    text-align: left;
}

.shefa-pwa-steps li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e4efe2;
}

.shefa-pwa-steps li:last-child {
    border-bottom: 0;
}

.shefa-pwa-step-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: #f3faf1;
    color: #2f6b2c;
    font-size: 1.05rem;
}

html.shefa-pwa-sheet-open,
html.shefa-pwa-sheet-open body {
    overflow: hidden;
}

html[data-bs-theme="dark"] .shefa-pwa-banner {
    background: rgba(22, 22, 22, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"] .shefa-pwa-banner-text strong,
html[data-bs-theme="dark"] .shefa-pwa-sheet-title {
    color: #d7ead2;
}

html[data-bs-theme="dark"] .shefa-pwa-banner-text small {
    color: #a6a6a6;
}

html[data-bs-theme="dark"] .shefa-pwa-close {
    background: #3a3a3a;
    color: #f0f0f0;
}

html[data-bs-theme="dark"] .shefa-pwa-chrome-badge {
    background: rgba(26, 115, 232, 0.16);
    color: #d6e4ff;
}

html[data-bs-theme="dark"] .shefa-pwa-chrome-badge small {
    color: #b7c9ee;
}

html[data-bs-theme="dark"] .shefa-pwa-sheet-panel {
    background: #2a2a2a;
    color: #f0f0f0;
}

html[data-bs-theme="dark"] .shefa-pwa-steps li {
    border-bottom-color: #3a3a3a;
}

html[data-bs-theme="dark"] .shefa-pwa-step-icon {
    background: rgba(91, 140, 81, 0.3);
    color: #d7ead2;
}
