@font-face {
  font-family: "Basis";
  src: url("/fonts/Basis-Regular.woff2") format("woff2"),
    url("/fonts/Basis-Regular.woff") format("woff");
  /* url("/fonts/Basis-Regular.otf") format("opentype"); */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Basis";
  src: url("/fonts/Basis-Light.woff2") format("woff2"),
    url("/fonts/Basis-Light.woff") format("woff");
  /* url("/fonts/Basis-Regular.otf") format("opentype"); */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #fdf9ed;
  --background: black;
  --font-family: "Basis", sans-serif;
  --font-weight: 300;
  /* --transition: all 0.3s ease-in-out; */
}
.sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  background-color: black;
  border-right: 1px solid white;
  /* transition: width 1.5s ease !important; */
  overflow: visible;
}
.sidebar.collapsed {
  width: 40px;
}
@media (min-width: 768px) {
  .sidebar {
    /* top: 10px;
    bottom: 10px; */
    transition: width 500ms;
    border-right: 0.5px solid white;
    padding: 1rem;
    gap: 1rem;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .sidebar {
    width: 400px;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .sidebar {
    width: 500px;
  }
}
@media (min-width: 1200px) {
  .sidebar {
    width: 600px;
  }
}

.sidebar-left {
  left: 0;
}
@media (min-width: 768px) {
  .sidebar-left {
    left: 0;
  }
}

.sidebar-right {
  right: 0;
}
@media (min-width: 768px) {
  .sidebar-right {
    right: 10px;
  }
}

.sidebar-tabs {
  top: 0;
  bottom: 0;
  height: 100%;
  width: 60px;
  background-color: black;
}

/* .sidebar-noheader {
  padding-right: 16px;
} */

.sidebar-tabs,
.sidebar-tabs > ul {
  position: absolute;
  width: 40px;
  margin: 0;
  padding: 0;
  list-style-type: none;
}
.sidebar-tabs > li,
.sidebar-tabs > ul > li {
  width: 100%;
  height: 40px;
  color: black;
  font-size: 12pt;
  overflow: hidden;
  transition: all 80ms;
}
.sidebar-tabs > li:hover,
.sidebar-tabs > ul > li:hover {
  color: #141204;
  background-color: black;
}
.sidebar-tabs > li.active,
.sidebar-tabs > ul > li.active {
  color: #141204;
  background-color: black;
}
.sidebar-tabs > li.disabled,
.sidebar-tabs > ul > li.disabled {
  color: rgba(51, 51, 51, 0.4);
}
.sidebar-tabs > li.disabled:hover,
.sidebar-tabs > ul > li.disabled:hover {
  background: transparent;
}
.sidebar-tabs > li.disabled > a,
.sidebar-tabs > ul > li.disabled > a {
  cursor: default;
}
.sidebar-tabs > li > a,
.sidebar-tabs > ul > li > a {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 40px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}
.sidebar-tabs > ul + ul {
  bottom: 0;
}

.sidebar-content {
  position: absolute;
  height: 100%;
  width: calc(100% - 40px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
  top: 0;
  bottom: 0;
  background-color: black;
  flex-direction: column;
}

.sidebar-left .sidebar-content {
  left: 40px;
  right: 0px;
}
.sidebar-right .sidebar-content {
  left: 0;
  right: 40px;
}
.sidebar.collapsed > .sidebar-content {
  overflow-y: hidden;
}

.sidebar-pane {
  display: none;
  left: 0;
  right: 0;
  box-sizing: border-box;
  padding: 10px 0px;
}

.sidebar-pane.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-height: 0;
}

@media (min-width: 768px) and (max-width: 991px) {
  .sidebar-pane {
    min-width: 265px;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .sidebar-pane {
    min-width: 350px;
  }
}
@media (min-width: 1200px) {
  .sidebar-pane {
    min-width: 420px;
  }
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  position: relative;
}
.triangle-left {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #f0ede7;
  cursor: pointer;
  margin-left: auto;
}

.sidebar-close {
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  text-align: center;
  cursor: pointer;
}
.sidebar-left .sidebar-close {
  right: 0;
}
.sidebar-right .sidebar-close {
  left: 0;
}

.sidebar-left ~ .sidebar-map {
  margin-left: 40px;
}
@media (min-width: 768px) {
  .sidebar-left ~ .sidebar-map {
    margin-left: 0;
  }
}

.sidebar-right ~ .sidebar-map {
  margin-right: 40px;
}
@media (min-width: 768px) {
  .sidebar-right ~ .sidebar-map {
    margin-right: 0;
  }
}

.sidebar.leaflet-touch {
  box-shadow: none;
}
@media (min-width: 768px) {
  .sidebar {
    border-radius: 4px;
  }
  .sidebar.leaflet-touch {
    box-shadow: none;
  }
}

@media (min-width: 768px) {
  .sidebar-left ~ .sidebar-map .leaflet-left {
    transition: left 500ms;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .sidebar-left ~ .sidebar-map .leaflet-left {
    left: 315px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .sidebar-left ~ .sidebar-map .leaflet-left {
    left: 400px;
  }
}

@media (min-width: 1200px) {
  .sidebar-left ~ .sidebar-map .leaflet-left {
    left: 470px;
  }
}

@media (min-width: 768px) {
  .sidebar-left.collapsed ~ .sidebar-map .leaflet-left {
    left: 50px;
  }
}

@media (min-width: 768px) {
  .sidebar-right ~ .sidebar-map .leaflet-right {
    transition: right 500ms;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .sidebar-right ~ .sidebar-map .leaflet-right {
    right: 315px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .sidebar-right ~ .sidebar-map .leaflet-right {
    right: 400px;
  }
}

@media (min-width: 1200px) {
  .sidebar-right ~ .sidebar-map .leaflet-right {
    right: 470px;
  }
}

@media (min-width: 768px) {
  .sidebar-right.collapsed ~ .sidebar-map .leaflet-right {
    right: 50px;
  }
}

/* Menu_styling  */
#level_1_menu_group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transform: translateX(-20px); /* 整体向左移动 */
}
.level_1_menu {
  text-decoration: none;
  position: relative;
  padding-bottom: 5px;
  color: #fdf9ed;
  font-size: 18px;
  font-family: "Basis", sans-serif;
  text-align: left;
  /* padding-left: 140px; */
  display: block;
}

#year-display {
  color: #fdf9ed;
  position: relative;
  display: block;
  font-family: "Basis", sans-serif;
  font-size: 18px;
  padding-bottom: 5px;
  transform: translateY(5px);
}

.line {
  padding: 0;
  text-align: center;
  background-color: #fdf9ed;
  opacity: 1;
}

/* Content_container_styling  */

#spilhaus_sidebar {
  display: block;
}
#explore_container {
  display: block;
  margin-top: 15px;
}
#about_map_text {
  width: 550px;
  color: #f0ede7;
  font-family: "Basis", sans-serif;
  line-height: 1.6;
  letter-spacing: 0.2px;
  font-size: 13px;
  padding-top: 6px;
  padding-right: 30px;
}

/* WGS Sidebar Part */
/* 可滚动内容区 */

#scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Chrome / Edge / Safari */
#scroll-area::-webkit-scrollbar {
  width: 1px;
}

#scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

#scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

#scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

#wgs_sidebar {
  padding-right: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* .data_container {
  height: 80px;
  padding-right: 40px;
} */

#time-control {
  position: relative;
  background: transparent;
  padding: 0;
  color: white;
  width: 100%;
  margin-bottom: 0px;
}

#timeSlider {
  -webkit-appearance: none; /* 去掉默认样式 */
  appearance: none;
  width: 100%;
  height: 10px; /* ★★★ 调整粗细：越小越细 */
  background: transparent; /* 轨道颜色 */
  /* border-radius: 0.5px;
  outline: none;
  cursor: pointer; */
}

/* 控制 Chrome / Safari / Edge 的轨道 */
#timeSlider::-webkit-slider-runnable-track {
  height: 9px;
  border: 1px solid #4f9cfb;
  border-radius: 10px;
  background: transparent;
}

/* 控制 Firefox 的轨道 */
#timeSlider::-moz-range-track {
  height: 9px;
  border: 1px solid #4f9cfb;
  border-radius: 10px;
  background: transparent;
}

/* 控制 Chrome / Safari / Edge 的滑块外观 */
#timeSlider::-webkit-slider-thumb {
  /* 圆*/
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid #4f9cfb;
  border-radius: 50%;
  background: #141204;
  margin-top: -6.6px; /* 让圆心和轨道对其 */
  cursor: pointer;
}

/* 控制 Firefox 的滑块外观 */
#timeSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 1px solid #4f9cfb;
  border-radius: 50%;
  background: #141204;
  cursor: pointer;
}

/* filter 卡 */
#filter-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.8rem 1rem;
  font-size: 14px;
  width: 100%;
  margin-top: 15px;
}

#filter-card > * {
  grid-row: auto;
  grid-column: auto;
}

.filter-select {
  width: 200px;
  height: 30px;
  line-height: 30px; /* ★ 文本垂直居中 */
  text-transform: capitalize !important;
  padding: 0px 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none !important;
  border: 0.5px solid #fdf9ed;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Basis", sans-serif;
  text-align: center;
  color: #fdf9ed;
  background: rgba(253, 249, 237, 0.1);
  cursor: pointer;
}

.filter-select:hover {
  background: rgba(255, 255, 255, 1);
  color: #000;
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 10px #4f9cfb;
}

.inactive {
  opacity: 0.4;
  pointer-events: none;
}

/* Clean Filters Buttons */
.btn-clean,
.btn-ocean {
  width: 90px;
  height: 30px;
  line-height: 30px; /* ★ 文本垂直居中 */
  padding: 0px 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 0.5px solid #fdf9ed;
  border-radius: 4px;
  font-size: 12px;
  font-family: "Basis", sans-serif;
  text-align: center;
  color: #fdf9ed;
  background: rgba(253, 249, 237, 0.1);
}

.btn-clean:hover {
  background: rgba(255, 255, 255, 1);
  color: #000;
}

#choose_style {
  position: relative;
  top: 10px;
  right: 10px;
  padding: 8px;
  /* width: 250px; */
  font-size: 12px;
  /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2); */
}

#area_info {
  color: white;
  padding-top: 8px;
  font-family: var(--font-family);
}

.country-image {
  width: 300px;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 6px;
}

/* point message below - generate through JS script  */
/* palace info picture  */
#data_query_window {
  padding-top: 0px;
  font-size: 14px; /* ★ 最大字号 */
  line-height: 1.4; /* 可读性 */
  font-family: "Basis", sans-serif;
  color: #fdf9ed;
}

#data_query_window h3 {
  font-size: 16px; /* 比正文稍大 */
  font-weight: 400;
  margin-bottom: 6px;
}

#data_query_window h4 {
  font-size: 14px; /* 正文大小 */
  margin-bottom: 6px;
}

#data_query_window h5 {
  font-size: 13px;
  margin-bottom: 10px;
}

#data_query_window p {
  font-size: 12px; /* 正文 */
  margin-top: 5px;
  margin-bottom: 15px;
  max-width: 100%; /* 你 JS 里写的 max-width 可搬到 CSS */
}

.dots {
  display: flex;
  gap: 8px;
  padding-left: 42%;
  padding-top: 8px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: #333;
  cursor: pointer;
}
.dot.active {
  background: #bbb;
}

/* .carousel {
  position: relative;
  font-family: "Basis", sans-serif;
  font-weight: 300;
} */

.carousel .img-wrapper {
  width: 510px;
  height: 280px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #040404; /* 如果小图留空区域，会显示这个背景 */
  border-radius: 6px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  color: rgb(10, 10, 10);
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.carousel-arrow.left {
  left: 0px;
}

.carousel-arrow.right {
  right: 8px;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* footer and back button  */
#sidebar-footer {
  flex-shrink: 0; /* ★ 防止被挤压 */
  padding-bottom: 10px;
  padding-top: 6px;
}

.menu-divider {
  height: 0.7px;
  background-color: white;
  margin-top: 10px;
  margin-bottom: 3px;
}

#level_2_menu_group {
  padding-top: 10px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 40px;
  cursor: pointer;
  font-size: 14px;
  font-family: "Basis", sans-serif;
  color: white;
  padding-bottom: 10px;
  padding-right: 50px;
}

/* 所有状态默认白色，没有下划线 */
.level_2_menu,
.level_2_menu:link,
.level_2_menu:visited,
.level_2_menu:active,
.level_2_menu:focus {
  color: white;
  text-decoration: none !important;
}

/* hover、active、focus → 蓝色 */
.level_2_menu:hover,
.level_2_menu:active,
.level_2_menu:focus {
  color: #4f9cfb;
}

#back {
  position: relative;
  padding-right: 15px; /* 给箭头留空间 */
}

#back::after {
  content: "->"; /* ← 换成别的箭头 */
  font-size: 16px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: inherit; /* 和 Back 同颜色 */
  transition: color 0s ease;
  color: white;
  background-color: black;
}

/* Hover 需要同步：文字变色 → 箭头也跟着变色 */
#back:hover {
  color: #4f9cfb; /* 你的 hover 颜色 */
}

#back:hover::after {
  color: #4f9cfb; /* 箭头跟着变色 */
}

.triangle-right {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid white;
  cursor: pointer;
  margin-top: 22px;
}
