/* FarmLedger – PWA install invitation styles */
.fl-pwa-hidden { display: none !important; }

.fl-pwa-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 4200;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(92vw, 480px);
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--pwa-surface, #ffffff);
    color: var(--pwa-text, #1c1917);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    font-size: .875rem;
}

html[data-theme="dark"] .fl-pwa-banner {
    background: #1f2937;
    color: #e7e5e4;
    border-color: rgba(255, 255, 255, .08);
}

.fl-pwa-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
}

.fl-pwa-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.fl-pwa-copy strong { font-size: .9375rem; }
.fl-pwa-copy span { color: var(--pwa-muted, #57534e); }
html[data-theme="dark"] .fl-pwa-copy span { color: #a8a29e; }

.fl-pwa-actions {
    display: flex;
    gap: 8px;
    flex: none;
}

.fl-pwa-btn {
    border: 0;
    border-radius: 9px;
    padding: 8px 14px;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    background: #f1f5f9;
    color: #1c1917;
    transition: filter .15s ease;
}
.fl-pwa-btn:hover { filter: brightness(.97); }

.fl-pwa-btn-primary {
    background: var(--primary, #047857);
    color: #ffffff;
}
.fl-pwa-btn-primary:hover { filter: brightness(1.06); }

html[data-theme="dark"] .fl-pwa-btn { background: #374151; color: #e7e5e4; }

/* Modal */
.fl-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 4300;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .55);
    padding: 20px;
}
.fl-pwa-modal-card {
    width: min(92vw, 420px);
    background: var(--pwa-surface, #ffffff);
    color: var(--pwa-text, #1c1917);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    box-shadow: 0 20px 48px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .fl-pwa-modal-card { background: #1f2937; color: #e7e5e4; }
.fl-pwa-modal-card .fl-pwa-icon { width: 56px; height: 56px; }

.fl-pwa-steps {
    margin: 0;
    padding-left: 20px;
    text-align: left;
    font-size: .85rem;
    line-height: 1.6;
    color: inherit;
}

/* Toast */
.fl-pwa-toast {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    z-index: 4400;
    background: var(--primary-dark, #065f46);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 500;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    opacity: 1;
    transition: opacity .45s ease;
    max-width: 92vw;
}
.fl-pwa-toast-out { opacity: 0; }

/* Login-page footer trigger */
.auth-install-link {
    background: transparent;
    border: 0;
    color: var(--primary-text, #ffffff);
    opacity: .85;
    text-decoration: underline;
    cursor: pointer;
    font-size: .8125rem;
    padding: 2px 4px;
}
.auth-install-link:hover { opacity: 1; }

@media (max-width: 480px) {
    .fl-pwa-banner { align-items: flex-start; flex-wrap: wrap; }
    .fl-pwa-actions { width: 100%; justify-content: flex-end; }
}