/* import some common fonts for modern website from google */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap");
/* @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;700&display=swap'); */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --border-radius: 8;
  /* --highlight-color: 188.74deg 94.5% 42.7%; */
  /* --highlight-color: 198.63deg 88.66% 48.43%; */
  --highlight-color: 180deg 98% 36%;
  --padding: 16px 18px;
  font-size: 20px;
}

@media screen and (max-width: 480px) {
  :root {
    --padding: 12px 14px;
  }
}

html,
body {
  height: 100%;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  background-color: #0a0a0a;
  color: #e5e5e5;
  line-height: 1.6;
  display: grid;
}

a {
  color: hsl(var(--highlight-color));
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.panel.left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  padding: 1rem;
}

/* Control Panel */
.controls {
  /* position: fixed;
      top: 20px;
      left: 20px; */
  width: 280px;
  background: linear-gradient(to bottom, #1a1a1a, #141414);
  border: 1px solid #2a2a2a;
  border-radius: calc(var(--border-radius) * 1px);
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.controls h3 {
  font-size: 13px;
  font-weight: 500;
  color: #a3a3a3;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.controls-header {
  padding: var(--padding);
  border-bottom: 1px solid #2a2a2a;
  background: hsl(var(--highlight-color) / 0.05);
}

.controls-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5f5f5;
  margin: 0;
}

.controls-section,
.controls-actions {
  padding: var(--padding);
  border-bottom: 1px solid #2a2a2a;
}

.controls-actions {
  display: flex;
  gap: 12px;
}

.controls-section:last-of-type {
  border-bottom: none;
}

/* Checkbox Styles */
/* .checkbox-group {
  padding-left: 4px;
} */

/* .checkbox-group:last-child {
  margin-bottom: 0;
} */

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: opacity 0.2s ease;
}

.checkbox-label:hover {
  opacity: 0.8;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid #404040;
  border-radius: calc(var(--border-radius) * 1px / 2);
  margin-right: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

input[type="checkbox"]:focus + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  outline: solid 1px white;
}

.checkbox-input:checked + .checkbox-custom {
  background-color: hsl(var(--highlight-color));
  border-color: hsl(var(--highlight-color));
}

.checkbox-input:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 15px;
  color: #e5e5e5;
  font-weight: 500;
}

/* Date Input Styles */
.date-group {
  margin-bottom: 16px;
}

.date-group:last-child {
  margin-bottom: 0;
}

.date-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #a3a3a3;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-input {
  width: 100%;
  padding: 10px 14px;
  background-color: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: calc(var(--border-radius) * 1px / 2);
  color: #e5e5e5;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  color-scheme: dark;
}

.date-input:hover {
  border-color: #404040;
}

.date-input:focus {
  outline: none;
  border-color: hsl(var(--highlight-color));
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: calc(var(--border-radius) * 1px / 2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: hsl(var(--highlight-color));
  color: white;
}

.btn-primary:hover {
  filter: brightness(0.8);
  /* transform: translateY(-1px); */
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: #262626;
  color: #e5e5e5;
  border: 1px solid #404040;
}

.btn-secondary:hover {
  background-color: #2a2a2a;
  border-color: #525252;
}

.btn-secondary:active {
  background-color: #1a1a1a;
}

/* Info Window */
.info-window {
  /* position: fixed;
      bottom: 20px;
      left: 20px;
      right: 20px; */
  width: 440px;
  max-width: calc(100% - 40px);
  background: linear-gradient(to bottom, #1a1a1a, #141414);
  border: 1px solid #2a2a2a;
  border-radius: calc(var(--border-radius) * 1px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  overflow: auto;
}

.info-window {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s;
  min-height: 200px; /* or min-height to reserve space */
}
.info-window.visible {
  visibility: visible;
  opacity: 1;
}

.info-content,
.info-window > div {
  padding: var(--padding);
}

.info-alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  background-color: hsl(var(--highlight-color) / 0.1);
  border: 1px solid hsl(var(--highlight-color) / 0.2);
  border-radius: calc(var(--border-radius) * 1px / 2);
  margin-bottom: 24px;
}

.info-icon {
  flex-shrink: 0;
  color: hsl(var(--highlight-color));
  margin-top: 2px;
}

.info-alert-text,
.info-window p {
  font-size: 14px;
  line-height: 1.6;
  color: #d4d4d4;
  margin: 0;
}

.info-title {
  font-size: 24px;
  font-weight: 600;
  color: #f5f5f5;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.info-description {
  font-size: 16px;
  color: #a3a3a3;
  margin-bottom: 24px;
  line-height: 1.6;
}

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

.info-instructions p {
  font-size: 15px;
  color: #d4d4d4;
  line-height: 1.6;
}

.info-note {
  padding: 12px 0;
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
  color: #a3a3a3;
}

.info-note strong {
  color: #e5e5e5;
}
.popup-content {
  line-height: initial;
}
.popup-content h3 {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.popup-content a {
  font-size: 0.75rem;
}
.popup-content details {
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  background: hsl(var(--highlight-color) / 0.05);
  padding: 0.5rem 0.5rem 0.15rem;
  border-radius: var(--border-radius);
}
.popup-content summary {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

/* Map */
.map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  padding: 5%;
}

.modal:target {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal iframe {
  border-radius: 3px;
  border: 1px solid #2a2a2a;
  border-radius: calc(var(--border-radius) * 1px);
}

blockquote {
  padding: 8px 10px 8px 20px;
  border-left: solid 4px hsl(var(--highlight-color));
  border-radius: 2px;
  margin: 1rem 0;
}

/* Fullscreen Loader */
.fullscreen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: hsl(var(--highlight-color));
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(24px, 0);
  }
}

@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0);
  }
}

/* scroller adjust with color */
/* x scrollbar styles */

::-webkit-scrollbar:horizontal {
  height: 4px;
}

::-webkit-scrollbar-track:horizontal {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb:horizontal {
  background: hsl(var(--highlight-color));
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:horizontal:hover {
  background: hsl(var(--highlight-color) / 0.8);
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--highlight-color));
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--highlight-color) / 0.8);
}
.maplibregl-canvas:focus-visible {
  outline: none;
}

.maplibregl-ctrl.maplibregl-ctrl-group {
  filter: invert(1);
  /* background-color: #141414; */
  border-radius: 2px;
  color: black;
  border: 1px solid #9a9a9a;
  box-shadow: none;
  border-radius: 6px;
  background: hsl(0deg 0% 90.2%);
}

.maplibregl-ctrl-top-right .maplibregl-ctrl {
  margin: 1rem 1rem 0 0;
}
.maplibregl-ctrl-bottom-left .maplibregl-ctrl {
  margin: 0 0 1rem 1rem;
}
.maplibregl-ctrl-bottom-right .maplibregl-ctrl {
  margin: 0 1rem 1rem 0;
}
.maplibregl-ctrl-bottom-right {
  bottom: 5px;
}

.btn-link {
  color: hsl(var(--highlight-color));
  background: none;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn-link:hover {
  text-decoration: underline;
  background: none;
}

/* Responsive Design */
/* Responsive Design */
@media (max-width: 480px) {
  .panel.left {
    padding: 0.5rem;
  }

  .maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin: 0.5rem 0.5rem 0 0;
  }
  .maplibregl-ctrl-bottom-left .maplibregl-ctrl {
    margin: 0 0 0.5rem 0.5rem;
  }
  .maplibregl-ctrl-bottom-right .maplibregl-ctrl {
    margin: 0 0.5rem 0.5rem 0;
  }
  .maplibregl-ctrl-bottom-right {
    bottom: 5px;
  }

  .controls {
    max-width: calc(100% - 40px);
  }

  .info-window {
    width: 100%;
    max-width: none;
    margin: 0 -0.5rem;
    position: absolute;
    top: 50%;
    height: 50vh;
    border-radius: 0;
  }

  /* .info-content {
    padding: 24px;
  }

  .info-title {
    font-size: 24px;
  } */
}

code {
  font-size: 0.9em;
  padding: 2px 4px;
  background-color: hsl(var(--highlight-color) / 0.15);
  border-radius: 4px;
}
