/* ═══════════════════════════════════════════════════════════════════════════
   Pawa Menu App — Frontend Styles
   VS Digital © 2024
═══════════════════════════════════════════════════════════════════════════ */

/* ── Bar container ───────────────────────────────────────────────────────── */
.pawamenu-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    /* Horizontal scroll on mobile */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;

    /* Hide scrollbar */
    scrollbar-width: none;     /* Firefox */
    -ms-overflow-style: none;  /* IE / Edge */

    /* No line breaks */
    flex-wrap: nowrap;
    white-space: nowrap;
}

.pawamenu-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Position */
.pawamenu-top    { top: 0; }
.pawamenu-bottom { bottom: 0; }

/* ── Scroll indicator (fades when not needed) ────────────────────────────── */
.pawamenu-bar.has-overflow::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(0,0,0,0.3);
    pointer-events: none;
    padding: 0 8px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
    height: 100%;
    display: flex;
    align-items: center;
}

/* ── Tab (onglet) ────────────────────────────────────────────────────────── */
.pawamenu-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 6px 14px;
    min-width: 64px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    cursor: pointer;
    height: 100%;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Active indicator bar at bottom of top menu, top of bottom menu */
.pawamenu-tab.pawamenu-active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 2px;
}

.pawamenu-top    .pawamenu-tab.pawamenu-active::after { bottom: 2px; }
.pawamenu-bottom .pawamenu-tab.pawamenu-active::after { top: 2px; }

/* ── Icon ────────────────────────────────────────────────────────────────── */
.pawamenu-tab .pawamenu-icon {
    width: 24px;
    height: 24px;
    display: block;
    transition: fill 0.2s, color 0.2s;
}

/* ── Label ───────────────────────────────────────────────────────────────── */
.pawamenu-tab-label {
    display: block;
    margin-top: 3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    letter-spacing: 0.2px;
    transition: color 0.2s;
}

/* ── Body padding helpers (auto-applied) ─────────────────────────────────── */
body.pawamenu-has-top    { padding-top: var(--pawamenu-top-height, 64px); }
body.pawamenu-has-bottom { padding-bottom: var(--pawamenu-bottom-height, 64px); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pawamenu-tab {
        padding: 6px 10px;
        min-width: 56px;
    }

    .pawamenu-tab .pawamenu-icon {
        width: 22px;
        height: 22px;
    }
}

/* ── Admin bar adjustment ────────────────────────────────────────────────── */
.admin-bar .pawamenu-top {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .pawamenu-top {
        top: 46px;
    }
}
