/* ============================================================
   PUBLIC SIDEBAR — Shared left nav for all public pages
   ============================================================ */
:root {
    --ps-orange: #F75F16;
    --ps-dark-orange: #d94f0f;
    --ps-light-gray: #f5f5f5;
    --ps-text-gray: #666666;
}

/* Force full-width layout when sidebar is present */
html body .content,
html body .content.nosidebar,
html body #themaincontent,
html body div.content,
html body div#themaincontent,
html .content,
html #themaincontent {
    position: static !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    float: none !important;
    display: block !important;
}
html body .content > .container-fluid,
html body #themaincontent > .container-fluid,
.content > .container-fluid,
#themaincontent > .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
html body .content,
html body .content.nosidebar,
html body #themaincontent {
    overflow: visible !important;
}
#themaincontent > .container-fluid {
    overflow: visible !important;
}

/* Page layout wrapper — flex with sidebar + main content */
.ps-page-layout {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 140px);
    background: var(--ps-light-gray);
}
.ps-page-content {
    flex: 1;
    min-width: 0;
    padding-top: 140px;
}

/* LEFT SIDEBAR */
.fb-left-nav {
    width: 280px;
    min-width: 280px;
    background: #000;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 140px 0 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    z-index: 100;
}
.fb-left-nav::-webkit-scrollbar { width: 4px; }
.fb-left-nav::-webkit-scrollbar-track { background: transparent; }
.fb-left-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* Search */
.fb-left-nav .sidebar-search { padding: 0 16px 16px; }
.fb-left-nav .sidebar-search-wrap { position: relative; }
.fb-left-nav .sidebar-search-wrap .search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: #999; pointer-events: none; z-index: 2;
}
.fb-left-nav .sidebar-search input {
    width: 100%; height: 38px; padding: 8px 12px 8px 36px; font-size: 13px;
    border: none; border-radius: 20px; background: #fff; outline: none; box-sizing: border-box;
}
.fb-left-nav .sidebar-search input:focus { box-shadow: 0 0 0 2px rgba(247,95,22,0.4); }
.fb-left-nav .sidebar-search .typeahead__container { margin: 0; position: relative; }
.fb-left-nav .sidebar-search .typeahead__field { position: relative; }
.fb-left-nav .sidebar-search .typeahead__result { position: absolute; z-index: 1002; width: 100%; }
.fb-left-nav .sidebar-search .typeahead__list {
    background: #fff; border-radius: 8px; margin-top: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3); max-height: 350px; overflow-y: auto; text-align: left;
}
.fb-left-nav .sidebar-search .typeahead__item > a {
    padding: 10px 14px; color: #333; display: block; text-decoration: none; font-size: 13px;
}
.fb-left-nav .sidebar-search .typeahead__item:hover > a { background: var(--ps-light-gray); }
.fb-left-nav .sidebar-search .typeahead__group {
    padding: 8px 14px; background: var(--ps-light-gray); font-weight: 700;
    font-size: 11px; text-transform: uppercase; color: var(--ps-text-gray);
}

/* Search suggestions */
.search-suggestions {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1002;
    background: #fff; border-radius: 8px; margin-top: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3); padding: 10px 0;
}
.search-suggestions.active { display: block; }
.search-suggestions .suggestions-label {
    padding: 6px 14px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; color: #999;
}
.search-suggestions a {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    color: #333; text-decoration: none; font-size: 13px; transition: background 0.1s;
}
.search-suggestions a:hover { background: var(--ps-light-gray); }
.search-suggestions a svg {
    width: 16px; height: 16px; color: #999; flex-shrink: 0;
    stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Nav links */
.fb-nav-section { padding: 0; flex: 1; }
.fb-nav-link {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px;
    color: #fff !important; text-decoration: none; font-size: 14px;
    font-family: Arial, Helvetica, sans-serif; transition: background 0.15s;
    border-left: 3px solid transparent;
}
.fb-nav-link:hover { background: rgba(255,255,255,0.1); color: #fff !important; text-decoration: none; }
.fb-nav-link.active { border-left-color: var(--ps-orange); color: var(--ps-orange) !important; }
.fb-nav-link svg {
    width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor;
    fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* CTA */
.fb-left-nav .sidebar-cta { padding: 16px; margin-top: auto; }
.fb-left-nav .btn-become {
    display: block; width: 100%; padding: 12px 16px; background: var(--ps-orange);
    color: #fff; text-align: center; font-family: "avenir", Arial, Helvetica, sans-serif;
    font-size: 13px; font-weight: 700; text-transform: uppercase; text-decoration: none;
    border-radius: 8px; border: none; letter-spacing: 0.5px; transition: background 0.2s; box-sizing: border-box;
}
.fb-left-nav .btn-become:hover { background: var(--ps-dark-orange); }
.fb-left-nav .vip-login {
    display: block; text-align: center; margin-top: 12px;
    color: var(--ps-orange); font-size: 13px; font-weight: 600; text-decoration: none;
}
.fb-left-nav .vip-login:hover { text-decoration: underline; }

/* Mobile FAB */
.fb-mobile-fab {
    display: none; position: fixed; bottom: 24px; right: 24px;
    width: 56px; height: 56px; border-radius: 50%; background: var(--ps-orange);
    color: #fff; border: none; box-shadow: 0 4px 12px rgba(247,95,22,0.4);
    cursor: pointer; z-index: 998; align-items: center; justify-content: center;
}
.fb-mobile-fab svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Mobile overlay + panel */
.fb-nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
.fb-nav-overlay.active { display: block; }
.fb-nav-panel {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #000;
    border-radius: 20px 20px 0 0; z-index: 1001; transform: translateY(100%);
    transition: transform 0.3s ease; max-height: 70vh; overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom);
}
.fb-nav-panel.active { display: block; transform: translateY(0); }
.fb-nav-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.fb-nav-panel-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.fb-nav-panel-close {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.1); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.fb-nav-panel-items { padding: 12px; }
.fb-nav-panel-items a {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border-radius: 12px; color: #fff !important; text-decoration: none;
    font-size: 15px; font-weight: 500;
}
.fb-nav-panel-items a:hover { background: rgba(247,95,22,0.15); }
.fb-nav-panel-items a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fb-nav-panel-items .panel-cta {
    display: block; margin: 12px 16px; padding: 14px; background: var(--ps-orange);
    color: #fff !important; text-align: center; border-radius: 12px; font-weight: 700;
    font-size: 14px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .fb-left-nav { display: none; }
    .fb-mobile-fab { display: flex; }
    .ps-page-content { padding-top: 0; }
}
