/* New header styles for NewMapUI */
.newHeaderGroup {
  flex-wrap: nowrap;
  max-width: 100vw;
  background: var(--header-bg);
  border-bottom: var(--header-border);
  box-shadow: var(--header-shadow);
}

/* Left sidebar overlay styles */
.leftSidebarOverlay {
  position: fixed;
  left: 20px;
  top: 110px;
  width: 300px;
  max-height: calc(100vh - 110px);
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-left-sidebar);
  border: var(--sidebar-border);
  border-radius: 10px;
  backdrop-filter: blur(var(--sidebar-blur));
  background-color: var(--left-sidebar-bg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.leftSidebarOverlay.collapsed {
  transform: translateX(-310px);
  opacity: 0;
}


/* Dedicated class to avoid relying on nested selector in modules checks */
.leftSidebarOverlayCollapsed {
  transform: translateX(-310px);
  opacity: 0;
}

/* Section heading styles */
.sectionHeading {
  margin: 0 0 1rem 0;
  color: var(--mantine-color-gray-1);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Zoom controls positioning */
.zoomControlsDynamic {
  position: fixed;
  top: 125px;
  z-index: var(--z-zoom-controls);
}

/* Details-style modal content hook for summary modal */
.detailsModalContent {
  background: var(--details-card-bg);
  border: var(--details-card-border);
  border-radius: 12px;
}

.detailsModalHeader {
  background: var(--header-tab-bg);
  border-bottom: var(--card-details-section-title-border);
}

.detailsModalTitle {
  color: white;
  text-shadow: var(--map-tab-text-shadow);
}

.detailsModalBody {
  padding-top: 2px;
}

/* Tile rendering container */
.tileRenderingContainer {
  position: relative;
}

.mainBackground {
  background: var(--main-bg);
  min-height: calc(100vh - 60px);
}

.tabsList {
  background: var(--map-tabs-bg);
  box-shadow: var(--map-tabs-shadow);
  padding-top: 8px !important;
  justify-content: flex-start !important;
  padding-left: 16px !important;
  align-items: center !important;
}

.tabsList::before {
  border-width: 0;
}

.tabsTab {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  text-shadow: var(--map-tab-text-shadow);
  border: var(--map-tab-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(15, 23, 42, 0.6);
  margin: 0 2px;
  position: relative;
  cursor: pointer;
  box-shadow: var(--map-tab-default-shadow);
  flex-grow: 0;
  flex-shrink: 0;
  width: auto;
}

.tabsTab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: var(--map-tab-hover-bg);
  border-color: var(--map-tab-hover-border);
  border-width: 1px;
  border-bottom: none;
  text-shadow: var(--map-tab-hover-text-shadow);
  box-shadow: var(--map-tab-hover-shadow);
}

.tabsTab[data-active="true"] {
  color: rgba(255, 255, 255, 1);
  background: var(--map-tab-active-bg);
  border-color: var(--map-tab-active-border);
  border-bottom: none;
  text-shadow: var(--map-tab-active-text-shadow);
}

.mapContainer {
  display: flex;
  height: 100%;
  background: var(--main-bg);
}

.mapArea {
  height: 100%;
  position: relative;
  overflow: auto;

}

/* When user is performing a two-finger gesture, let the page receive it */
:global(.mobile.pinch-zooming) .mapArea {
  pointer-events: none;
}

/* Adds space when movement banner is present so content isn't overlapped */
.mapAreaWithBanner {
  padding-top: 64px;
}

.sidebar {
  overflow: scroll;
  height: 100%;
  background: var(--sidebar-bg);
}

.sidebar.collapsedRight {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.playerCardsContainer {
  position: relative;
  min-height: 400px;
}

.playerCard {
  position: static;
  width: auto;
  visibility: visible;
  pointer-events: auto;
  z-index: var(--z-player-card);
}

.hoverInstructions {
  text-align: center;
  color: var(--mantine-color-gray-6);
}

.hoverInstructionsLine {
  margin-top: 8px;
  font-size: 12px;
}

.playersTabContent {
  height: 100%;
  overflow-y: scroll;
  padding: 16px;
}

/* Sci-fi segmented control styling, aligned with map tabs look */
.segmentedSciFiRoot {
  background: var(--map-tabs-bg);
  border: var(--map-tab-border);
  box-shadow: var(--map-tabs-shadow);
  padding: 4px;
  border-radius: 10px;
}

.segmentedSciFiControl {
  color: rgba(255, 255, 255, 0.75);
  text-shadow: var(--map-tab-text-shadow);
}

.segmentedSciFiLabel {
  font-weight: 700;
}

.segmentedSciFiIndicator {
  background: var(--map-tab-active-bg);
  border: var(--map-tab-active-border);
  box-shadow: var(--map-tab-hover-shadow);
}

/* Custom scrollbar styling for thematic blue-gray design */
:global(*::-webkit-scrollbar) {
  width: 16px;
  height: 16px;
}

:global(*::-webkit-scrollbar-track) {
  background: var(--scrollbar-track-bg);
  border-radius: 6px;
  border: var(--scrollbar-track-border);
}

:global(*::-webkit-scrollbar-thumb) {
  background: var(--scrollbar-thumb-bg);
  border-radius: 6px;
  border: var(--scrollbar-thumb-border);
  box-shadow: var(--scrollbar-thumb-shadow);
}

:global(*::-webkit-scrollbar-thumb:hover) {
  background: var(--scrollbar-thumb-hover-bg);
  box-shadow: var(--scrollbar-thumb-hover-shadow);
}

:global(*::-webkit-scrollbar-thumb:active) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.7) 0%, rgba(29, 78, 216, 0.8) 100%);
}

:global(*::-webkit-scrollbar-corner) {
  background: var(--scrollbar-corner-bg);
}

/* Firefox scrollbar styling */
:global(*) {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color-thumb) var(--scrollbar-color-track);
}

/* Vaporwave (TRON) decorative effects - only when theme is active */
:global(.theme-vaporwavetheme) .mapArea {
  position: relative;
}

:global(.theme-vaporwavetheme) .mapArea::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 6px);
  mix-blend-mode: lighten;
  opacity: 0.12;
}

:global(.theme-vaporwavetheme) .tabsTab {
  text-shadow: 0 0 6px rgba(255, 0, 170, 0.5), 0 0 12px rgba(0, 240, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 10px rgba(0, 0, 0, 0.3);
}

:global(.theme-vaporwavetheme) .tabsTab::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 0, 170, 0.95), rgba(0, 240, 255, 0.95));
  opacity: 0;
  transform: scaleX(0.5);
  transition: transform 0.2s ease, opacity 0.2s ease;
  filter: drop-shadow(0 0 6px rgba(255, 0, 170, 0.6)) drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

:global(.theme-vaporwavetheme) .tabsTab:hover::after,
:global(.theme-vaporwavetheme) .tabsTab[data-active="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

:global(.theme-vaporwavetheme) .tabsTab:hover,
:global(.theme-vaporwavetheme) .tabsTab[data-active="true"] {
  animation: vw-pulse-soft 6s ease-in-out infinite alternate;
}

:global(.theme-vaporwavetheme) .tabsList {
  position: relative;
}

:global(.theme-vaporwavetheme) .tabsList::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 0, 170, 0.8), rgba(0, 240, 255, 0.8));
  box-shadow: 0 0 8px rgba(255, 0, 170, 0.35), 0 0 10px rgba(0, 240, 255, 0.25);
  opacity: 0.6;
  animation: vw-border-breathe 8s ease-in-out infinite;
}

:global(.theme-vaporwavetheme) .leftSidebarOverlay {
  box-shadow:
    0 12px 40px rgba(255, 0, 170, 0.14),
    0 8px 28px rgba(0, 240, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

:global(.theme-vaporwavetheme) .leftSidebarOverlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(350px 140px at 0% 0%, rgba(255, 0, 170, 0.14), transparent 70%),
    radial-gradient(350px 140px at 100% 0%, rgba(0, 240, 255, 0.12), transparent 70%);
  mix-blend-mode: screen;
}


/* Movement banner - MUCH more prominent and theme-colored */
.movementBanner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-movement-banner);
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  background: var(--movement-banner-bg);
  border-bottom: var(--movement-banner-border);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset,
    0 0 22px 2px color-mix(in srgb, var(--movement-banner-glow) 60%, transparent);
  animation: movement-banner-pulse 3.6s ease-in-out infinite;
}

.movementBannerTitle {
  color: var(--movement-banner-title-color);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.35);
}

.movementBannerTargetName {
  color: var(--movement-banner-accent-color);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--movement-banner-glow) 65%, transparent),
    0 1px 2px rgba(0, 0, 0, 0.75);
}

/* Compact movement box pinned to bottom-left */
.movementBox {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: var(--z-movement-box);
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  background: var(--movement-banner-bg);
  border: var(--movement-banner-border);
  border-radius: var(--mantine-radius-md);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset,
    0 0 22px 2px color-mix(in srgb, var(--movement-banner-glow) 60%, transparent);
  animation: movement-banner-pulse 3.6s ease-in-out infinite;
}
