/*
 Theme Name:  Urbexmap Child
 Template:    astra
 Text Domain: urbexmap-child
*/

html, body {
  overflow: hidden;
}

#map {
  position: absolute;
  top: 80px;
  bottom: 0;
  right: 0;
  left: 0;
}

button {
  padding: 4px 6px;
}

 .leaflet-control-button {
  background-color: var(--ast-global-color-4);
  border-radius: 2px;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
  left: 2px;
}
.leaflet-control-button:hover {
  background-color: var(--ast-global-color-7);
}

.leaflet-control-button.toggled {
  background-color: var(--ast-global-color-3);
}

.hidden {
  display: none;
}

/* Safari margin fix */
@media screen and (max-width: 768px) {
  .ios-safari .leaflet-bottom.leaflet-left,
  .ios-safari .leaflet-bottom.leaflet-right {
    margin-bottom: 115px !important;
  }
}

/* Search field container */
.leaflet-search-container {
  position: absolute;
  left: 40px;
  background-color: var(--ast-global-color-4);
  padding: 3.3px;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: flex; /* Use flexbox for horizontal alignment */
  align-items: center; /* Center vertical alignment */
  gap: 5px; /* Space between input and button */
  display: none; /* Start hidden */
}

/* Search field input */
.leaflet-search-container .leaflet-search-input {
  width: 200px !important;
  height: 25px !important;
  border: 1px solid var(--ast-global-color-7) !important;
  border-radius: 5px !important;
  padding: 3.5px !important;
  font-size: 15px !important;
  color: var(--ast-global-color-3) !important;
  background: var(--ast-global-color-4) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Search button */
.leaflet-search-container .leaflet-search-button {
  background-color: var(--ast-global-color-0) !important;
  color: white !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 3px 6px !important;
  cursor: pointer !important;
  height: 23px !important;
  font-size: 15px !important;
  box-shadow: none !important;
}

.leaflet-search-container .leaflet-search-button:hover {
  background-color: var(--ast-global-color-1) !important;
}

.leaflet-control-draggablemarker {
  width: 100px;
  height: 30px;
  background-color: var(--ast-global-color-4);
  border-radius: 2px;
  text-align: center;
  line-height: 33px;
  cursor: pointer !important;
  font-size: 12px;
  color: var(--ast-global-color-8);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Style Chat */
.leaflet-chat-container {
  position: absolute;
  bottom: 40px;
  right: 0px;
  width: 375px;
  max-height: 500px;
  background-color: #212121;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.leaflet-chat-container.hidden {
  display: none;
}

/* Message box */
.leaflet-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 14px;
  background-color: #212121;
  color: #ececf1;
  max-height: 400px;
}

/* Scrollbar styling for dark theme */
.leaflet-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.leaflet-chat-messages::-webkit-scrollbar-track {
  background: #40414f;
}

.leaflet-chat-messages::-webkit-scrollbar-thumb {
  background: #565869;
  border-radius: 3px;
}

.leaflet-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #6c6d7a;
}

/* Styles for individual messages */
.chat-message {
  margin-bottom: 16px;
  line-height: 1.5;
}

.chat-message.user {
  background-color: #303030;
  color: #ececf1;
  padding: 12px 16px;
  border-radius: 18px;
  margin-left: 20%;
  word-wrap: break-word;
}

.chat-message.ai {
  color: #ececf1;
  padding: 8px 0;
  word-wrap: break-word;
}

.chat-message.error {
  background-color: #f56565;
  color: white;
  padding: 12px 16px;
  border-radius: 18px;
  margin: 0 auto;
  text-align: center;
  max-width: 80%;
}

/* Input wrapper */
.leaflet-chat-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #303030;
  border-radius: 24px;
  margin: 16px;
  padding: 4px;
}

.leaflet-chat-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 12px 16px !important;
  font-size: 16px !important;
  color: #ffffff !important;
  outline: none !important;
  resize: none;
  overflow-y: auto;
  font-family: inherit;
  line-height: 1.4;
  max-height: 150px;
  box-shadow: none !important;
}

.leaflet-chat-input::placeholder {
  color: #9d9d9d !important;
}

/* Send button */
.leaflet-chat-send-button {
  background-color: #19c37d !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  margin-right: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  transition: background-color 0.2s !important;
  box-shadow: none !important;
}

.leaflet-chat-send-button:hover {
  background-color: #0ea268 !important;
}

.leaflet-chat-send-button:disabled {
  background-color: #565869 !important;
  cursor: not-allowed !important;
}

.leaflet-chat-header {
  background-color: #171717;      /* dark bar */
  color: #fff;                 /* white text */
  font-size: 16px;
  font-weight: bold;
  padding: 8px 12px;
  border-bottom: 1px solid #444;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  text-align: center;
}

/* Container for suggestions */
.leaflet-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 10px 10px 0;  /* some space above, against the messages */
}

/* Style per suggestion button */
.leaflet-chat-suggestion {
  background: #303030;
  color: #9d9d9d;
  border-radius: 12px;
  border: 1px transparent;
  padding: 6px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.leaflet-chat-suggestion:hover {
  background: #5c5c5c;
}