:root {
  --button-color: rgba(105, 135, 196, 1);
  --button-hover: rgba(67, 82, 112, 1);
  --button-active: rgba(168, 192, 240, 1);
  --highlight: rgba(112, 39, 69, .6);
  --chat-user: rgba(53, 59, 70, 1);
  --chat-bot: rgba(229, 232, 237, 1);
  --background-base: rgba(248, 248, 248, 1);
  --title: rgba(18, 46, 111, 1);
  --text-color: rgba(35, 46, 51, 1);
}

/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-base);
  /* overflow: hidden; */
}

.app-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  /* padding: 20px; */
}

/* Overlay styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(253, 253, 253, 0.9); */
  background-image: url('../images/boston-map.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay-content {
  text-align: center;
  color: var(--text-color);
  max-width: 700px;
  padding: 30px;
}

.overlay-heading {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 40px;
  line-height: 1.2;
  letter-spacing: -2px;
}

.overlay-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.overlay-btn {
  padding: 15px 30px;
  font-size: 1.2rem;
  border: none;
  border-radius: 8px;
  background-color: var(--button-color);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.overlay-btn:hover {
  background-color: var(--button-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.overlay-btn:active {
  background-color: var(--button-active) transform: translateY(0);
}


.background-map {
  position: absolute;
  width: 100%;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Header styles */
.app-header {
  /* Using closest approximation to color(display-p3 0.073 0.18 0.435) */
  padding: 20px 20px 0 20px;
  margin: 0 20px 0 20px;
}

.app-header-title {
  font-size: 48px;
  font-weight: bold;
  letter-spacing: -2px;
  color: var(--title);
}

/* Responsive container layout */
.responsive-container {
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Chat container styles */
.chat-main-container {
  flex: 1;
  min-width: 300px;
  background-color: rgba(255, 255, 255, 0.4);
  padding: 15px;
  height: 80vh;
  min-height: 400px;
  /* border-top: 1px solid var(--highlight);
  border-bottom: 2px solid var(--highlight); */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(70, 11, 38, 0.2);
  transition: all 0.3s ease;
}


/* Map container styles */
.map-main-container {
  flex: 1;
  min-width: 300px;
  height: 80vh;
  min-height: 400px;
  background-color: rgba(255, 255, 255, 0.4);
  padding: 15px 15px 5px 15px;
  display: flex;
  flex-direction: column;
  /* border-top: 1px solid var(--highlight);
  border-bottom: 2px solid var(--highlight); */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(70, 11, 38, 0.2);
  transition: all 0.3s ease;
  /* position: relative;  */
}

.map-main-container.focused,
.chat-main-container.focused {
  /* box-shadow: 0 0 0 3px #2563eb, 0 4px 10px rgba(0, 0, 0, 0.1); */
}

.chat-messages-wrapper {
  background-color: var(--background-base);
  border-radius: 4px;
  border: 1px solid var(--highlight);
  margin-bottom: 15px;
  overflow: scroll;
  height: calc(100% - 70px);
}

/* Slider container */
.slider-container {
  margin-top: 10px;
  margin-bottom: -10px;
  padding-bottom: 0;
}

.selector-label {
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.date-range-text {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* Map container */
.map-div {
  width: 100%;
  height: calc(100% - 70px);
  position: relative;
  overflow: hidden;
  background-color: var(--background-base);
  border-radius: 4px;
  border: 1px solid var(--highlight);
}

#hexbin-map {
  position: absolute !important;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Chat styles */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: var(--background-base);
  /* border-radius: 4px;
  border: 1px solid #ddd; */
  margin-bottom: 15px;
}

.chat-input-container {
  display: flex;
  gap: 10px;
}

.chat-input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid var(--highlight);
  border-radius: 4px;
}

.chat-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.send-btn {
  padding: 10px 15px;
  background-color: var(--button-color);
  color: white;
  border: 1px solid var(--button-active);
  border-radius: 4px;
  cursor: pointer;
}

.send-btn:hover {
  border: 1px solid var(--button-active);
  background-color: var(--button-hover);
}

.send-btn:active {
  border-color: var(--button-color);
  background-color: var(--button-active);
}

/* Chat message styles */
.user-message,
.bot-message {
  padding: 10px;
  border-radius: 4px;
  max-width: 100%;
}

.user-message {
  margin-bottom: -5px;

}

.bot-message {
  margin-bottom: 20px;
}

.user-message {
  background-color: var(--chat-user);
  color: var(--background-base);
  font-weight: bold;
  margin-left: auto;
  font-size: 1.2em;
}

.bot-message {
  background-color: var(--chat-bot);
  font-weight: 400;
  margin-right: auto;
  color: var(--text-color);
  font-size: 1.2em;
}

/* Spinner styles */
#spinner-container {
  padding-top: 20px;
}

/* Custom styling for the slider */
.rc-slider-rail {
  background-color: var(--background-base);
  height: 4px;
}

.rc-slider-track {
  background-color: #666;
  height: 4px;
}

.rc-slider-handle {
  border: 1px solid var(--button-active);
  background-color: var(--button-color);
  border-radius: 4px;
  width: 15px;
  height: 45px;
  margin-top: -15px;
}

.rc-slider-handle:hover {
  border: 1px solid var(--button-active);
  background-color: var(--button-hover);
}

.rc-slider-handle:active {
  border-color: var(--button-color);
  background-color: var(--button-active);
  width: 30px;
  height: 30px;
  margin-top: -12px;
}

.rc-slider-mark {
  top: 18px;
}

.rc-slider-mark-text {
  font-size: 14px;
  color: #666;
}

/* Style for year markers (major ticks) */
.rc-slider-dot:nth-of-type(12n+1) {
  width: 2px;
  height: 12px;
  bottom: -4px;
  margin-left: -1px;
  border-radius: 0;
  border: none;
  background-color: #333;
}

/* Style for month markers (minor ticks) */
.rc-slider-dot {
  width: 1px;
  height: 6px;
  bottom: -2px;
  margin-left: -0.5px;
  border-radius: 0;
  border: none;
  background-color: #999;
}

/* Date display styling */
.date-text {
  margin-top: 24px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-align: center;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  .responsive-container {
    flex-direction: column;
  }

  .map-main-container,
  .chat-main-container {
    width: 100%;
  }

  .chat-main-container {
    height: 400px;
  }

  .overlay-heading {
    font-size: 1.8rem;
  }

  .overlay-buttons {
    gap: 10px;
  }

  .overlay-btn {
    padding: 12px 20px;
    font-size: 1rem;
  }
}