html, body, #map {
  height: 98vh;
}

#chatButton {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0d6efd;
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 9999;
}

#chatWidget {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 300px;
  min-height: 300px;
  max-height: 500px;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 9999;
  font-family: "Segoe UI", sans-serif;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.chat-header {
  background: #0d6efd;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.chat-header button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.chat-status {
  background: #f1f1f1;
  font-size: 12px;
  color: #555;
  padding: 6px 12px;
  text-align: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f9f9f9;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.bot {
  background: #e5e5ea;
  align-self: flex-start;
  color: #000;
}

.chat-message.user {
  background: #0d6efd;
  color: #fff;
  align-self: flex-end;
}

.chat-input-box {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: #fff;
}

.chat-input-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 18px;
  font-size: 14px;
}

.chat-input-box button {
  background: #0d6efd;
  color: white;
  border: none;
  padding: 8px 14px;
  margin-left: 6px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
}
.chat-bubble {
    padding: 8px;
    margin: 5px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}
.chat-bubble.self {
    background-color: #DCF8C6;
    align-self: flex-end;
}
.chat-bubble.other {
    background-color: #FFF;
    align-self: flex-start;
}
.chat-messages {
    display: flex;
    flex-direction: column;
    height: 320px;
}
.chat-wrapper {
    display: flex;
    flex-direction: column;
    /*margin-bottom: 8px;*/
    /*max-width: 80%;*/
}

.chat-wrapper.self {
    align-items: flex-end;
}

.chat-wrapper.other {
    align-items: flex-start;
}

.chat-bubble {
    padding: 8px 12px;
    border-radius: 10px;
    background-color: #e1e1e1;
}

.chat-wrapper.self .chat-bubble {
    background-color: #d4f8d4;
}

.chat-sender {
    font-size: 10px;
    color: gray;
    margin-top: -5px;
    padding: 0px 10px;
}

select#nodeFollowSelect {
    padding: 6px;
    position: absolute;
    top: 17px;
    z-index: 9999;
    left: 60px;
}

.node-label {
    font-size: 12px;
    font-weight: bold;
    color: black;
    text-shadow: 1px 1px 2px white;
    white-space: nowrap;
    pointer-events: none; /* biar ga ganggu klik */
}

.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}
.alert-toast {
  background: #fff;
  border-left: 6px solid #e74c3c;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 14px;
  min-width: 260px;
  animation: fadeInUp 0.4s ease;
  position: relative;
}
.alert-toast h4 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: bold;
  color: #e74c3c;
}
.alert-toast .close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}
.alert-toast .close-btn:hover {
  color: #000;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}