/* Slim site bar above the full-screen metro app (page template «نقشه و مسیریاب مترو»).
   The app's own stylesheet owns everything below the bar. */
:root {
  --mapbar-h: 56px;
  --mapbar-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--mapbar-h));
}

html,
body {
  margin: 0;
  height: 100%;
}

body.reylo-map {
  font-family: var(--reylo-font, 'Vazirmatn'), 'Vazirmatn', Tahoma, sans-serif;
  overflow: hidden;
}

.mapbar {
  position: fixed;
  inset-inline: 0;
  top: var(--wp-admin--admin-bar--height, 0px);
  height: var(--mapbar-h);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-inline: 14px;
  background: #f3eee4;
  border-bottom: 5px solid transparent;
  border-image: linear-gradient(to left, #e1462c 0 25%, #1e7b4e 0 50%, #f3b229 0 75%, #2155a3 0) 1;
  direction: rtl;
}

.mapbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #161513;
  font-weight: 900;
  font-size: 20px;
  text-decoration: none;
  flex: none;
}

.mapbar__brand svg {
  width: 46px;
  height: 29px;
}

.mapbar__title {
  margin: 0;
  padding-inline-start: 16px;
  border-inline-start: 2px solid #161513;
  font-size: 15px;
  font-weight: 800;
  color: #161513;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mapbar__nav {
  margin-inline-start: auto;
  min-width: 0;
}

.mapbar__nav::-webkit-scrollbar {
  display: none;
}

.mapbar__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}

.mapbar__nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  color: #3a3833;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.mapbar__nav a:hover,
.mapbar__nav .current-menu-item > a,
.mapbar__nav .current_page_item > a {
  background: #161513;
  color: #f3eee4;
}

/* «بیشتر» dropdown (inc/menu.php) */
.mapbar__nav li {
  position: relative;
}

.mapbar__nav .menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 11px;
}

.mapbar__nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 70;
  min-width: 210px;
  flex-direction: column;
  gap: 0;
  padding: 6px;
  background: #fbf8f1;
  border: 2px solid #161513;
  border-radius: 8px;
  box-shadow: -6px 6px 0 #f3b229;
}

.mapbar__nav .is-open > .sub-menu {
  display: flex;
}

.mapbar__nav .is-open > a {
  background: #161513;
  color: #f3eee4;
}

.mapbar__nav .sub-menu a {
  padding: 9px 12px;
  font-size: 14.5px;
}

.mapbar__nav .sub-menu .current-menu-item > a {
  background: #e9e2d4;
  color: #161513;
}

.mapbar__nav .sub-menu .menu-sep {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1.5px dashed rgba(22, 21, 19, 0.14);
}

/* push the app (position: fixed; inset: 0) below the bar */
.reylo-map .app {
  top: var(--mapbar-top) !important;
}

.mapbar-missing {
  position: fixed;
  top: var(--mapbar-top);
  inset-inline: 0;
  padding: 40px 20px;
  text-align: center;
  color: #374151;
}

@media (max-width: 720px) {
  .mapbar__title {
    display: none;
  }

  .mapbar__nav a {
    padding: 6px 9px;
    font-size: 13.5px;
  }

  .mapbar__nav > ul > li:first-child {
    display: none;
  }
}

/* the site bar already carries the brand — the app's own logo chip would only cost map */
.reylo-map .search-top .brand {
  display: none;
}
