/* ==============================================
   Vebnox PWA Frontend Styles
   ============================================== */

/* Install prompts shared */
.vbx-install-prompt { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Header Banner */
.vbx-header-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
    background: #1E1B4B; color: #fff;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
    animation: vbxSlideDown .35s ease;
}
@keyframes vbxSlideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.vbx-header-banner[hidden] { display: none !important; }
.vbx-banner-icon { flex-shrink: 0; opacity: .7; }
.vbx-banner-msg { flex: 1; font-size: 13.5px; }
.vbx-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.vbx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .18s; }
.vbx-btn-primary { background: #4F46E5; color: #fff; }
.vbx-btn-primary:hover { background: #3730A3; }
.vbx-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.vbx-btn-icon { background: transparent; border: none; color: rgba(255,255,255,.6); cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.vbx-btn-icon:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Snackbar */
.vbx-snackbar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #1F2937; color: #fff;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25); min-width: 300px;
    animation: vbxSlideUp .35s ease; z-index: 99998;
}
.vbx-snackbar[hidden] { display: none !important; }
@keyframes vbxSlideUp { from { transform: translateX(-50%) translateY(100%); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* Blog popup */
.vbx-popup-overlay {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(0,0,0,.5);
    display: flex; align-items: flex-end; justify-content: center;
    animation: vbxFadeIn .25s ease;
}
.vbx-popup-overlay[hidden] { display: none !important; }
@keyframes vbxFadeIn { from { opacity: 0; } to { opacity: 1; } }
.vbx-popup-card {
    background: #fff; border-radius: 20px 20px 0 0;
    padding: 28px 24px; max-width: 480px; width: 100%;
    text-align: center;
    animation: vbxSlideUpCard .3s ease;
}
@keyframes vbxSlideUpCard { from { transform: translateY(100%); } to { transform: translateY(0); } }
.vbx-popup-icon { width: 64px; height: 64px; background: #EEF2FF; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #4F46E5; }
.vbx-popup-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: #111827; }
.vbx-popup-card p { font-size: 14px; color: #6B7280; margin: 0 0 20px; }
.vbx-btn-ghost { background: transparent; color: #6B7280; margin-top: 10px; display: block; width: 100%; border: none; cursor: pointer; font-size: 14px; padding: 8px; }

/* In-feed prompt */
.vbx-infeed {
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    border: 1px solid #C7D2FE; border-radius: 12px;
    padding: 20px; text-align: center;
    margin: 20px 0;
}
.vbx-infeed[hidden] { display: none !important; }
.vbx-infeed p { font-size: 14px; color: #3730A3; margin: 10px 0 16px; }

/* Navigation Tab Bar */
.vbx-nav-tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
    border-top: 1px solid #E5E7EB;
    display: flex; justify-content: space-around; align-items: stretch;
    height: 60px; padding: 0 4px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.vbx-nav-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; padding: 4px 8px; text-decoration: none;
    color: #9CA3AF; font-size: 10px; font-weight: 500;
    transition: color .15s; gap: 3px;
}
.vbx-nav-tab .dashicons { font-size: 20px; width: 20px; height: 20px; }
.vbx-nav-tab.vbx-active { color: #4F46E5; }
.vbx-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Scroll progress bar */
#vbx-scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    width: 0; z-index: 99999;
    transition: width .1s linear;
    background: #4F46E5; /* overridden inline */
}

/* Pull-to-refresh */
#vbx-pull-indicator {
    position: fixed; top: -80px; left: 50%; transform: translateX(-50%);
    background: #4F46E5; color: #fff; border-radius: 24px;
    padding: 10px 20px; display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; z-index: 99999;
    opacity: 0; transition: transform .2s, opacity .2s;
    box-shadow: 0 4px 16px rgba(79,70,229,.4);
}

/* Dark mode toggle */
.vbx-dark-toggle {
    position: fixed; bottom: 80px; right: 16px; z-index: 9998;
    width: 40px; height: 40px; border-radius: 50%;
    background: #1F2937; color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition: background .2s;
}
.vbx-dark-toggle:hover { background: #374151; }
:root[data-vbx-dark="1"] body { filter: invert(1) hue-rotate(180deg); }
:root[data-vbx-dark="1"] img, :root[data-vbx-dark="1"] video { filter: invert(1) hue-rotate(180deg); }

/* Share button */
.vbx-share-btn {
    position: fixed; z-index: 9998; bottom: 16px;
    width: 48px; height: 48px; border-radius: 50%;
    background: #4F46E5; color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 16px rgba(79,70,229,.4);
    transition: transform .18s;
}
.vbx-share-btn:hover { transform: scale(1.08); }
.vbx-share-bottom-right { right: 16px; }
.vbx-share-bottom-left  { left: 16px; }

/* Page loader */
#vbx-page-loader-bar {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, #4F46E5, #06B6D4);
    width: 0; z-index: 99999; transition: none;
}
#vbx-page-loader-bar.vbx-loading {
    animation: vbxBarProgress 1.5s ease-in-out infinite;
}
@keyframes vbxBarProgress {
    0%   { width: 0; opacity: 1; }
    50%  { width: 70%; }
    100% { width: 100%; opacity: 0; }
}
#vbx-page-loader-spinner {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center;
    background: rgba(255,255,255,.6); backdrop-filter: blur(4px);
}
#vbx-page-loader-spinner.vbx-loading { display: flex; }
.vbx-spinner-ring {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid #E5E7EB;
    border-top-color: #4F46E5;
    animation: vbxSpin .8s linear infinite;
}
@keyframes vbxSpin { to { transform: rotate(360deg); } }

/* Toast messages */
#vbx-toast-container {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    z-index: 999999; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.vbx-toast {
    background: #1F2937; color: #fff;
    padding: 10px 20px; border-radius: 100px;
    font-size: 13px; font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    opacity: 0; transform: translateY(16px);
    transition: all .3s ease; pointer-events: auto;
}
.vbx-toast-show { opacity: 1; transform: translateY(0); }
.vbx-toast-success { background: #065F46; }
.vbx-toast-warning { background: #92400E; }
.vbx-toast-danger  { background: #991B1B; }

/* Push notification button */
.vbx-push-toggle-btn {
    position: fixed; width: 48px; height: 48px; border-radius: 50%;
    background: #4F46E5; color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 16px rgba(79,70,229,.4);
    z-index: 9999; transition: transform .18s;
}
.vbx-push-toggle-btn:hover { transform: scale(1.08); }
.vbx-push-bottom-left  { bottom: 20px; left: 20px; }
.vbx-push-bottom-right { bottom: 20px; right: 20px; }

/* WooCommerce checkout prompt */
.vbx-woo-prompt {
    background: #EEF2FF; border: 1px solid #C7D2FE;
    border-radius: 12px; padding: 16px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.vbx-woo-prompt[hidden] { display: none !important; }
.vbx-nav-prompt { background: #F3F4F6; padding: 16px; border-radius: 8px; }
.vbx-nav-prompt[hidden] { display: none !important; }
