/**
 * BandstandHUB — Map View
 * Full-screen map + sliding bottom sheet (venue | gig)
 */

body.bsh-map-page {
  background: #000;
}

body.bsh-map-page .bsh-map-page-main,
body.bsh-map-page .bsh-home.bsh-map-page-main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.bsh-map-page .bsh-map-page-hero {
  display: none;
}

body.bsh-map-page .bsh-explorer--map-page {
  padding: 0;
}

body.bsh-map-page .bsh-explorer--map-page > .bsh-explorer-inner {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
}

body.bsh-map-page .bsh-explorer--map-page .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

body.bsh-map-page .bsh-explorer--map-page .bsh-filter-layout {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

/* Do NOT pad .bsh-layout — that inset the map and left a black strip on the right */
body.bsh-map-page .bsh-explorer--map-page .bsh-layout {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  width: 100%;
  max-width: none;
}

body.bsh-map-page .bsh-explorer--map-page .bsh-results-wrap,
body.bsh-map-page .bsh-explorer--map-page .bsh-results-split--map-page,
body.bsh-map-page .bsh-explorer--map-page .bsh-results-col--map {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.bsh-map-page .bsh-explorer--map-page .bsh-explorer-title {
  display: none;
}

body.bsh-map-page .bsh-results-split--map-page {
  display: block !important;
  min-height: 0;
}

body.bsh-map-page .bsh-results-col--map {
  min-height: 0;
  display: flex;
}

body.bsh-map-page .bsh-map-stack--page {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100dvh - 160px);
  height: calc(100dvh - 160px);
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: #050508;
}

body.bsh-map-page .bsh-map-page-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 10px 12px;
  min-height: 64px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(16, 175, 239, 0.45);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

body.bsh-map-page .bsh-map-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #ca59dd;
  background: #ca59dd;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

body.bsh-map-page .bsh-map-page-back:hover {
  background: #b84dcb;
  color: #fff !important;
}

body.bsh-map-page .bsh-map-gig-rail-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.bsh-map-page .bsh-map-gig-rail__count,
body.bsh-map-page .bsh-map-page-toolbar .bsh-results-count {
  flex: 0 0 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.bsh-map-page .bsh-map-gig-rail {
  position: relative;
  min-width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 229, 0, 0.28);
  overflow: hidden;
}

body.bsh-map-page .bsh-map-gig-rail__track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #00e500 rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

body.bsh-map-page .bsh-map-gig-rail__track::-webkit-scrollbar {
  height: 4px;
}

body.bsh-map-page .bsh-map-gig-rail__track::-webkit-scrollbar-thumb {
  background: #00e500;
  border-radius: 999px;
}

body.bsh-map-page .bsh-map-gig-rail__track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

body.bsh-map-page .bsh-map-gig-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  max-width: 220px;
  margin: 0;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(0, 229, 0, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

body.bsh-map-page .bsh-map-gig-chip:hover {
  border-color: #00e500;
  background: rgba(0, 229, 0, 0.12);
}

body.bsh-map-page .bsh-map-gig-chip.is-active {
  border-color: #00e500;
  background: rgba(0, 229, 0, 0.2);
  box-shadow: 0 0 0 1px rgba(0, 229, 0, 0.35);
}

body.bsh-map-page .bsh-map-gig-chip__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e500;
  box-shadow: 0 0 8px rgba(0, 229, 0, 0.75);
}

body.bsh-map-page .bsh-map-gig-chip__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.bsh-map-page .bsh-map-gig-rail__empty {
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

body.bsh-map-page .bsh-map-page-toolbar .bsh-check--happening {
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
  font-size: 0.8rem;
  white-space: nowrap;
}

body.bsh-map-page .bsh-map-stack--page #bshMap.bsh-map {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  height: 100% !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
}

/* —— Right drawer: flush to viewport right (fixes first-open black gap) —— */
body.bsh-map-page #bshMapDetail.bsh-map-sheet,
body.bsh-map-page #bshMapDetail.bsh-map-detail {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  z-index: 100040 !important;
  width: 340px !important;
  min-width: 300px !important;
  max-width: min(380px, 92vw) !important;
  max-height: none !important;
  height: auto !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column;
  border-radius: 14px 0 0 14px;
  border: 2px solid rgba(202, 89, 221, 0.55);
  border-right: none !important;
  background: #0a0a10;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.55);
  /* Use 100% of own width — avoid 110% first-paint glitch */
  transform: translate3d(100%, 0, 0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  visibility: visible;
  opacity: 1;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  will-change: transform;
}

body.bsh-map-page #bshMapDetail.bsh-map-sheet.is-open,
body.bsh-map-page #bshMapDetail.bsh-map-detail.is-open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

body.bsh-map-page .bsh-map-sheet__handle {
  display: none;
}

body.bsh-map-page .bsh-map-sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(202, 89, 221, 0.5);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

body.bsh-map-page .bsh-map-sheet__close:hover {
  background: #ca59dd;
  border-color: #ca59dd;
}

body.bsh-map-page .bsh-map-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.bsh-map-page #bshMapDetail > .bsh-map-detail__empty,
body.bsh-map-page .bsh-map-sheet__body > .bsh-map-detail__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  padding: 24px 16px;
}

body.bsh-map-page .bsh-map-detail__empty .fa-music {
  color: #10afef;
  font-size: 1.35rem;
}

body.bsh-map-page .bsh-map-detail__empty p {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Index-style venue card stacked top→bottom inside drawer */
body.bsh-map-page .bsh-map-drawer-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #0a0a10;
  overflow: hidden;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-venue-layout {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  gap: 0;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-venue-aside {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: 0 0 auto;
  width: 100% !important;
  max-width: none !important;
  padding: 10px 10px 8px;
  padding-right: 40px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(202, 89, 221, 0.35);
}

body.bsh-map-page .bsh-map-drawer-card .bsh-venue-photo,
body.bsh-map-page .bsh-map-drawer-card .bsh-venue-photo img {
  width: 100%;
  max-height: 130px;
  object-fit: cover;
  border-radius: 8px;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-venue-gigs {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 10px 12px;
  box-sizing: border-box;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-venue-gig-filters {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-gig-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-gig-more-row {
  flex: 0 0 auto;
  margin-top: 8px;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-gig.is-map-focus {
  outline: 2px solid #00e500;
  outline-offset: 2px;
  border-radius: 10px;
}

/* Compact drawer text so more gigs fit */
body.bsh-map-page .bsh-map-drawer-card .bsh-vi-venue-name {
  font-size: 1rem;
}

body.bsh-map-page .bsh-map-drawer-card .bsh-vi-line {
  margin-bottom: 4px;
}

/* Homepage Map View button */
.bsh-map-view-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #10afef;
  background: #000;
  color: #10afef !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  box-shadow: none;
  opacity: 1;
}

.bsh-map-view-link:hover,
.bsh-map-view-link:focus {
  background: rgba(16, 175, 239, 0.18);
  color: #fff !important;
  text-decoration: none !important;
}

.bsh-map-view-link::before,
.bsh-map-view-link::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 991px) {
  body.bsh-map-page #bshMapDetail.bsh-map-sheet,
  body.bsh-map-page #bshMapDetail.bsh-map-detail {
    width: min(86vw, 340px) !important;
    min-width: 0 !important;
    max-width: 360px !important;
  }
}

@media (max-width: 767px) {
  .bsh-map-view-link span {
    display: none;
  }

  body.bsh-map-page .bsh-map-stack--page {
    min-height: calc(100dvh - 220px);
    height: calc(100dvh - 220px);
  }

  body.bsh-map-page #bshMapDetail.bsh-map-sheet,
  body.bsh-map-page #bshMapDetail.bsh-map-detail {
    width: min(90vw, 320px) !important;
    max-width: 320px !important;
    border-radius: 12px 0 0 12px;
  }

  body.bsh-map-page .bsh-map-drawer-card .bsh-venue-photo,
  body.bsh-map-page .bsh-map-drawer-card .bsh-venue-photo img {
    max-height: 100px;
  }

  body.bsh-map-page .bsh-map-page-toolbar .bsh-map-page-back span {
    display: none;
  }

  body.bsh-map-page .bsh-map-gig-chip {
    max-width: 160px;
    font-size: 0.72rem;
  }
}

@media (min-width: 992px) {
  body.bsh-map-page .bsh-map-stack--page {
    min-height: calc(100dvh - 140px);
    height: calc(100dvh - 140px);
    border-radius: 0;
    border: none;
  }

  body.bsh-map-page #bshMapDetail.bsh-map-sheet,
  body.bsh-map-page #bshMapDetail.bsh-map-detail {
    width: 340px !important;
    min-width: 320px !important;
    max-width: 380px !important;
  }
}
