/* ============================================================
   FLOATING NAV PRO — FRONT CSS
   Layout only. All design/color styles applied via JS.
============================================================ */

#fnp-wrap {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 99999;
  pointer-events: none;
  padding: 0 14px;
}

/* Bar */
#fnp-bar {
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;      /* critical: submenus position relative to bar */
  overflow: visible;       /* allow submenus to render above */
  flex-shrink: 1;
  max-width: 100%;
  box-sizing: border-box;
}

/* Bar inner container handles its own scroll on mobile */
#fnp-bar > * {
  flex-shrink: 0;
}

/* Mobile horizontal scroll (only when explicitly enabled) */
#fnp-bar.fnp-scrollable {
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#fnp-bar.fnp-scrollable::-webkit-scrollbar { display: none; }

/* When mobile scroll is OFF, items must wrap or shrink-to-fit on small screens */
#fnp-bar:not(.fnp-scrollable) {
  flex-wrap: nowrap;
  overflow-x: visible;
}

/* ── ITEM WRAP ── */
.fnp-item-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── ICON CIRCLE ── */
.fnp-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Transition applied to animated targets via JS */
.fnp-anim-el {
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              background 0.16s ease,
              color 0.16s ease;
  will-change: transform;
}

/* ── LABEL ── */
.fnp-label {
  display: block;
  text-align: center;
  white-space: nowrap;
  margin-top: 3px;
  line-height: 1;
  transition: color 0.16s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  will-change: transform;
}

/* ── DIVIDER ── */
.fnp-divider {
  display: block;
  flex-shrink: 0;
  border: none;
  outline: none;
}

/* ── CTA ── */
.fnp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  outline: none;
  transition: opacity 0.16s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.fnp-cta:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ── LOGO ── */
.fnp-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  overflow: hidden;
  transition: opacity 0.16s ease, transform 0.18s ease;
}

.fnp-logo:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ── TOOLTIP ── */
.fnp-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.88);
  background: #fff;
  color: #111;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  letter-spacing: 0.2px;
}

.fnp-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
}

.fnp-item-wrap:hover .fnp-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ── SUBMENU ── */
.fnp-submenu {
  position: fixed;
  top: 0;
  left: 0;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 8px;
  z-index: 999999;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 280px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  transform: translateY(8px);
}

.fnp-submenu.fnp-open {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile: full-width single column submenu */
@media (max-width: 600px) {
  .fnp-submenu {
    grid-template-columns: 1fr;
    min-width: 220px;
    max-width: calc(100vw - 20px);
    padding: 6px;
    gap: 4px;
  }
}

/* Sub items — card style with subtle border for separation */
.fnp-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.fnp-sub-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.fnp-sub-item.fnp-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(232,50,20,0.16) 0%, rgba(232,50,20,0.08) 100%);
  border: 1px solid rgba(232,50,20,0.3);
}

.fnp-sub-item.fnp-featured:hover {
  background: linear-gradient(135deg, rgba(232,50,20,0.24) 0%, rgba(232,50,20,0.14) 100%);
  border-color: rgba(232,50,20,0.45);
}

.fnp-sub-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.fnp-sub-item.fnp-featured .fnp-sub-icon {
  background: rgba(232,50,20,0.18);
  border-color: rgba(232,50,20,0.3);
}

.fnp-sub-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fnp-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: normal;
  word-break: break-word;
  letter-spacing: -0.1px;
}

.fnp-sub-desc {
  font-size: 11px;
  color: #999;
  display: block;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
