/* ── FRMAKIJ PWA Styles ── */

/* Install banner */
.fm-pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border-top: 3px solid #C1121F;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    padding: 14px 16px;
}

.fm-pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.fm-pwa-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.fm-pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.fm-pwa-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fm-pwa-banner-desc {
    font-size: 12px;
    color: #888;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.fm-pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fm-pwa-btn-install {
    padding: 9px 20px;
    background: #C1121F;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background 0.15s;
    white-space: nowrap;
}

.fm-pwa-btn-install:hover {
    background: #a00f1a;
}

.fm-pwa-btn-dismiss {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #888;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

.fm-pwa-btn-dismiss:hover {
    background: #e8e8e8;
    color: #333;
}

/* iOS banner */
.fm-ios-banner {
    border-top-color: #1a3a5c;
}

.fm-ios-arrow {
    text-align: center;
    font-size: 20px;
    color: #1a3a5c;
    margin-top: 4px;
    animation: fmpwa-bounce 1s ease-in-out infinite alternate;
}

/* Offline banner */
.fm-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Toast */
.fm-pwa-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.fm-pwa-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animations */
@keyframes fmpwa-slidein {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes fmpwa-slideout {
    from { transform: translateY(0); }
    to   { transform: translateY(100%); }
}

@keyframes fmpwa-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(6px); }
}

/* When app is in standalone mode (installed) — hide banner */
@media all and (display-mode: standalone) {
    .fm-pwa-banner,
    .fm-ios-banner {
        display: none !important;
    }

    /* Add safe area padding for notched phones */
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile optimization */
@media (max-width: 480px) {
    .fm-pwa-banner-inner {
        gap: 10px;
    }
    .fm-pwa-banner-desc {
        display: none;
    }
}
