/* public/style.css */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: black;
    color: white;
}

#form-container {
    text-align: center;
}

#form-container form {
    background-color: black;
    border-radius: 25px;
    padding: 25px 25px;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    text-align: center;
}

#form-container form h1 {
    margin-bottom: 15px;
    color: #4b4b4b;
}

#form-container label {
    font-size: 1.1em;
    color: #555;
}

#form-container input {
    display: block;
    padding: 10px 10px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#form-container button {
    background-color: #2b2b2b;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 15px;
}

#form-container button:hover {
    background-color: rgb(20, 20, 20);
}

#map-container, #list-container {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

#showListBtn, #backToMapBtn {
    position: absolute;
    bottom: 2vh;
    left: 20px;
    background-color: #2b2b2b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index:9999;
}

#showListBtn:hover, #backToMapBtn:hover {
    background-color: #2b2b2b;
}

#list-container {
    background-color: black;
    overflow-y: auto;
}

#list-container h2 {
    text-align: center;
    margin-top: 10px;
}

#peopleList {
    list-style: none;
    padding: 0;
}

#peopleList li {
    display: flex;
    justify-content: space-between;  /* push chat button to right */
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

#peopleList li .info {
    display: flex;
    gap: 15px; /* space between name and distance */
    align-items: center;
}

#peopleList li .name {
    font-weight: 600;
}

#peopleList li .distance {
    color: #666;
}

#peopleList li .chat-btn {
    padding: 6px 12px;
    cursor: pointer;
}


.green {
    color: green;
}

.chat-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    color: white;
    z-index: 10000;
}

.chat-window h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #ccc;
    text-align: center;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    background-color: #111;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.message-bubble {
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 5px 0;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-input {
    width: calc(100% - 90px);
    padding: 8px;
    background-color: #000;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    margin-right: 5px;
}

.send-btn, .close-btn {
    background-color: #2b2b2b;
    color: white;
    border: none;
    padding: 8px 10px;
    font-size: 0.9em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-btn:hover, .close-btn:hover {
    background-color: #1e1e1e;
}

.chat-window .close-btn {
    margin-top: 5px;
    width: 100%;
}

.popup-chat-btn, .chat-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #1e90ff;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 2px 5px rgba(30, 144, 255, 0.4);
  text-align: center;
  user-select: none;
}

.popup-chat-btn:hover {
  background: #1c7ed6;
  box-shadow: 0 4px 10px rgba(28, 126, 214, 0.6);
}

.popup-chat-btn:active {
  background: #1558b0;
  box-shadow: inset 0 2px 5px rgba(21, 88, 176, 0.7);
  transform: translateY(1px);
}