/* ─── Mobile app download banner ──────────────────────────────
   Replaces the old "install this site in your browser" banners. One banner for
   every platform: the CTA links to /m and the server picks the store. */

.pwa-hidden {
    display: none !important;
}

.app-dl {
    position: fixed;
    bottom: 16px;
    inset-inline: 16px;
    z-index: 2147483000;
    animation: pwaFadeUp 0.35s ease-out both;
}

@media (min-width: 640px) {
    .app-dl {
        inset-inline-start: auto;
        inset-inline-end: 16px;
        max-width: 360px;
    }
}

.app-dl-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 4px 6px rgba(79, 70, 229, 0.2),
        0 10px 30px rgba(79, 70, 229, 0.35);
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.app-dl-icon {
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
}

.app-dl-icon svg {
    width: 22px;
    height: 22px;
}

.app-dl-text {
    flex: 1;
    min-width: 0;
}

.app-dl-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.app-dl-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.45;
    margin: 3px 0 0;
}

.app-dl-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.app-dl-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #4f46e5;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    height: 32px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.app-dl-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.app-dl-cta:hover { opacity: 0.9; color: #4f46e5; }
.app-dl-cta:active { transform: scale(0.97); }

.app-dl-later {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0 10px;
    height: 32px;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.app-dl-later:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.app-dl-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    flex-shrink: 0;
    margin-top: -2px;
    transition: background 0.2s, color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.app-dl-close svg {
    width: 16px;
    height: 16px;
}

.app-dl-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

@keyframes pwaFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Offline / network status banner ─────────────────────── */

.daniel-network-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2147482000;
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(146, 64, 14, 0.35);
}

.daniel-network-banner__inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.daniel-network-banner__icon {
    flex-shrink: 0;
    display: flex;
    margin-top: 2px;
}

.daniel-network-banner__text {
    font-size: 13px;
    line-height: 1.55;
    font-weight: 500;
}

body.daniel-offline [data-requires-network]:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}
