:root {
  --blue: #2e81ff;
  --muted: #65686b;
  --text: #182127;
}

body {
  font-family: "Inter", "sans-serif";
  color: var(--text);
}

/*map*/
#map {
  width: 100dvw;
  height: 100dvh;
  z-index: 1;
}

.glass-background {
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.map-control {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 120px;
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.map-control.map-control--history {
  top: 1rem;
  bottom: unset;
}

.map-control__button {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: transparent;
  border: none;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.7);
}

.map-control__button:hover {
  background-color: var(--text);
}

.map-control__button:hover .map-control__icon {
  color: white;
}

.map-control__icon {
  font-size: 1.5rem;
}

.map-sidebar {
  position: fixed;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 99;
}

.map-sidebar__header {
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  visibility: visible;
  opacity: 1;
}

.map-sidebar__toggler {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  outline: none;
}
.map-sidebar__toggler i {
  font-size: 24px;
}

.map-sidebar__content {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  opacity: 1;
  transition: all 300ms ease-in-out;
  transform: translateX(0);
}

.map-sidebar__content.hidden {
  visibility: hidden;
  opacity: 0;
  transition: all 300ms ease-in-out;
  transform: translateX(-50px);
}

.empty-state {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.empty-state__icon {
  background-color: var(--blue);
  padding: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.empty-state__icon i {
  font-size: 24px;
  color: white;
}

.map-sidebar__footer {
  height: fit-content;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 400ms ease-in-out;
  transform: translateX(0);
}

.map-sidebar__footer.hidden {
  visibility: hidden;
  opacity: 0;
  transition: all 350ms ease-in-out;
  transform: translateX(-50px);
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.color-box {
  width: 40px;
  height: 16px;
  border-radius: 6px;
  flex-shrink: 0;
}

.legend-item span {
  font-size: 14px;
  font-weight: 400;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}

.merah {
  background: #d32f2f;
}
.orange {
  background: #e87722;
}
.kuning {
  background: #f5c518;
}
.hijau {
  background: #4caf50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand__logo {
  width: 50px;
  height: 100%;
  aspect-ratio: 50/43;
  display: block;
  position: relative;
}

.brand__title {
  font-size: 1.5rem;
  margin-bottom: 0;
  text-transform: uppercase;
  font-family: "Bebas Neue", "sans-serif";
}

.brand__subtitle {
  font-size: 11px;
  margin-bottom: 0;
}

.layer-catalog {
  position: fixed;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  top: 120px;
  bottom: 16px;
  left: 432px;
  right: 106px;
  z-index: 2;
  border-radius: 1rem;
  padding: 1rem;
  transition: all 300ms ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.layer-catalog.hidden {
  visibility: hidden;
  opacity: 0;
  transition: all 300ms ease-in-out;
  transform: translateX(-50px);
}

.layer-catalog__close {
  height: 40px;
  width: 40px;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 8px;
}
.layer-catalog__close i {
  font-size: 24px;
}

.layer-catalog__content {
  display: flex;
  flex-grow: 1;
  gap: 1rem;
  height: 90%;
}

.layer-catalog__side {
  background-color: rgba(0, 0, 0, 0.025);
  border-radius: 1rem;
  width: 300px;
  padding: 1rem;
}

.layer-catalog__main {
  background-color: rgba(0, 0, 0, 0.025);
  border-radius: 1rem;
  flex-grow: 1;
  padding: 1rem;
  overflow: auto;
}

.catalog-tabs {
  gap: 8px;
}

.catalog-tabs .nav-link {
  padding: 1rem;
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--text);
  text-align: start;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.catalog-tabs .nav-link i {
  font-size: 24px;
}

.catalog-tabs .nav-link[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/*layer*/
.layer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  overflow-y: auto;
}
.layer-item {
  border-radius: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  gap: 1rem;
  align-items: center;
}
/*switch*/
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 29px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider::before {
  transform: translateX(19px);
}

/*timeline*/
.timeline {
  position: fixed;
  top: 1rem;
  left: 432px;
  right: 106px;
  height: 74px;

  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 200px;
  padding: 12px 1.5rem;

  display: flex;
  gap: 1rem;
  align-items: center;

  transition: all 300ms ease-in-out;
  transform: translateY(0);
  z-index: 8;
}

.timeline.hidden {
  visibility: hidden;
  opacity: 0;
  transition: all 300ms ease-in-out;
  transform: translateY(-50px);
}

.timeline__slider-wrapper {
  flex-grow: 1;
  overflow-x: auto;
}

.timeline__scroll {
  overflow-x: auto;
  width: 100%;
}

.timeline__track {
  position: relative;
  display: flex;
  flex-direction: column;
  width: max-content; /* 🔥 important */
  min-width: 100%;
}

.timeline__slider {
  width: 100%;
  appearance: none;
  height: 16px;
  background: var(--blue);
  border-radius: 16px;
  outline: none;
  margin-top: 12px;
  padding: 0 16px;
}

.timeline__slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 200px;
  cursor: pointer;
}

.timeline__labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: 0.7;
  gap: 16px;

  overflow-x: auto;
  scrollbar-width: none;
}

.timeline__label {
  text-align: center;
  min-width: 50px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

.timeline__year {
  text-align: center;
  margin-top: 6px;
  font-size: 14px;
  font-weight: bold;
  width: 50px;
}

.timeline-button {
  background-color: white;
  border-radius: 100px;
  border: none;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-slide-action {
  display: flex;
}

.basemap {
  position: fixed;
  bottom: 88px;
  right: 106px;

  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 8;
  border-radius: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 1rem;
  grid-template-rows: repeat(2, fit-content);
  padding: 1rem;
  z-index: 99;

  transition: all 300ms ease-in-out;
  transform: translateX(0);
}

.basemap.hidden {
  visibility: hidden;
  opacity: 0;
  transition: all 300ms ease-in-out;
  transform: translateX(16px);
}

.basemap__item {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
}

.basemap__item img {
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
  border-radius: 0.5rem;
}

.basemap__title {
  font-size: 0.75rem;
  text-align: center;
  width: 100%;
  margin-top: 4px;
  display: block;
}

.basemap__item--active {
  border-color: #4caf50;
}

/*btn*/
.btn-primary {
  --bs-btn-bg: var(--blue);
  --bs-btn-border-color: var(--blue);
  --bs-btn-color: #ffffff;

  --bs-btn-hover-bg: color-mix(in srgb, var(--blue) 80%, #000000);
  --bs-btn-hover-border-color: var(--blue);
  --bs-btn-hover-color: #ffffff;

  --bs-btn-focus-shadow-rgb: 79, 70, 229;

  --bs-btn-active-bg: color-mix(in srgb, var(--blue) 60%, #000000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--blue) 60%, #000000);
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);

  --bs-btn-disabled-bg: color-mix(in srgb, var(--blue) 50%, #000000);
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--blue) 50%, #000000);
  --bs-btn-disabled-color: #ffffff;
}

.text-muted {
  color: var(--muted);
}

.text-bebas {
  font-family: "Bebas Neue", "sans-serif";
}
