/* ==================================================================
   css/map-view-menu.css - UPDATED FOR D&L UNIT LOOK
   ================================================================== */

/* --------------------------------------------------
   0. Global Bar & Shared Theme
-------------------------------------------------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 0 1rem;
  background: var(--menu-color, #8b2d48) !important; /* Branded color */
  color: #fff;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2000; /* Higher than sidebar to keep it in front */
}

/* Hamburger & "menu" text as a single unit */
.hamburger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid #ffffff; /* White pill border */
  border-radius: 25px;       /* Pill shape */
  color: #ffffff;
  padding: 4px 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-transform: lowercase; /* Matches "menu" look */
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger i {
  font-size: 1.2rem;
}

/* Bold Project Title */
.topbar-title {
  font-weight: 800 !important;
  font-size: 1.3rem;
  margin-left: 5px;
  letter-spacing: 0.5px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --------------------------------------------------
   3. SIDEBAR LAYOUT — Sliding Behind Topbar
-------------------------------------------------- */

#sidebar {
  position: fixed !important;  /* !important: project custom_css must not override layout positioning */
  top: 50px !important;        /* Aligns precisely beneath topbar height */
  left: -280px;
  width: 280px;
  height: calc(100% - 50px) !important;
  background: #ffffff !important;
  box-shadow: 4px 0 15px rgba(0,0,0,0.1);
  z-index: 1000; /* Lower than topbar to slide behind it */
  display: flex;
  flex-direction: column;
  transition: left .3s ease-in-out;
  padding: 0 !important;
}

body.sidebar-open #sidebar {
  left: 0;
}

/* Sidebar header: "Hide Menu" button row at top */
.sidebar-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #e9ecef;
}

/* List Item Styling */
#sidebar .sidebar-inner {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

#sidebar .sidebar-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

#sidebar .sidebar-btn:hover {
  background: #f8f9fa;
}

#sidebar .sidebar-btn i {
  width: 24px;
  text-align: center;
  color: var(--menu-color, #8b2d48);
  font-size: 1.1rem;
}

.sidebar-label {
  font-weight: 500;
  color: #333;
}

/* --------------------------------------------------
   4. Dropdown & Logic
-------------------------------------------------- */

/* Ensure classic/text menus hide when sidebar is used */
body[data-menu-layout="sidebar"] #button-panel,
body[data-menu-layout="sidebar"] .controls { 
  display: none !important; 
}

/* ─────────────────────────────────────────────
   Menu hover labels (Map View)
   ───────────────────────────────────────────── */

.round-btn {
  position: relative;
}

.menu-hover-label {
  position: absolute;
  left: 110%;
  top: 50%;
  transform: translateY(-50%);

  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out;

  z-index: 1000;
}

/* show label only on hover */
.round-btn:hover .menu-hover-label {
  opacity: 1;
}