/* PWA install banner + cookie consent + iOS instructions */

.pwa-install-bar,
.cookie-consent-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14);
    animation: pwaSlideUp 0.35s ease;
    max-width: 520px;
    margin: 0 auto;
}

.cookie-consent-bar.pos-left { left: 12px; right: auto; margin: 0; max-width: 400px; }
.cookie-consent-bar.pos-right { left: auto; right: 12px; margin: 0; max-width: 400px; }
.cookie-consent-bar.pos-bottom { left: 12px; right: 12px; margin: 0 auto; }

.pwa-install-bar.has-bottom-nav,
.cookie-consent-bar.has-bottom-nav {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-install-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light, #eef2ff);
    color: var(--primary, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pwa-install-body,
.cookie-consent-body {
    flex: 1;
    min-width: 0;
}

.pwa-install-body strong,
.cookie-consent-body strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.pwa-install-body p,
.cookie-consent-body p {
    margin: 0;
    font-size: 0.76rem;
    color: var(--text-soft, #64748b);
    line-height: 1.4;
}

.pwa-install-actions,
.cookie-consent-actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
    align-items: center;
}

.pwa-install-actions .btn.is-waiting,
.pwa-install-actions .btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.pwa-install-actions .btn,
.cookie-consent-actions .btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.pwa-install-close,
.cookie-consent-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-soft, #94a3b8);
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;
}

.pwa-install-close:hover,
.cookie-consent-close:hover {
    background: var(--bg, #f8fafc);
    color: var(--text, #0f172a);
}

.cookie-consent-link {
    font-size: 0.72rem;
    color: var(--primary, #6366f1);
    text-decoration: underline;
    white-space: nowrap;
}

/* iOS install modal */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.pwa-ios-modal[hidden] { display: none !important; }

.pwa-ios-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pwa-ios-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--surface, #fff);
    border-radius: 18px 18px 14px 14px;
    padding: 20px;
    animation: pwaSlideUp 0.3s ease;
}

.pwa-ios-steps {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.pwa-ios-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.pwa-ios-steps li:last-child { border-bottom: none; }

.pwa-ios-steps .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light, #eef2ff);
    color: var(--primary, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .pwa-install-bar,
    .cookie-consent-bar {
        flex-wrap: wrap;
        padding: 12px;
    }
    .pwa-install-actions,
    .cookie-consent-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
