/* Reset and base styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f9fafb;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* Link */

a {
  color: black;
  text-decoration: none;
}

/* Chat container */
.chat-container {
  display: flex;
  flex-direction: column;
  background-image: url("../images/logo-transparent.png");
  background-color: white;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  width: 100%;
  max-width: 600px;
  height: 90vh;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
}

/* Chat messages area */
.chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Message bubbles */
.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  white-space: pre-line;
}

.bot {
  align-self: flex-start;
  background: #e5e7eb;
}

.user {
  align-self: flex-end;
  background: #3b82f6;
  color: #fff;
}

/* Input area */
.input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: #fff;
  gap: 8px;
}

.input-area input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.input-area button {
  padding: 10px 20px;
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.input-area button:hover {
  background: #2563eb;
}

/* Details button inside bot message */
.details-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.details-btn:hover {
  background: #2563eb;
}

/* Popup modal styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h2 {
  font-size: 18px;
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
  color: #333;
}

.document-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

/* Responsive layout */
@media (max-width: 768px) {
  .chat-container {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .input-area button {
    padding: 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .message {
    font-size: 13px;
  }

  .input-area input {
    font-size: 12px;
  }
}

/* chat.html */

#btn-informasi-penyakit,
#btn-konsultasi-gejala {
  width: 150px;
  padding: 10px;
  margin: 5px 0 2.5px 0;
  border: none;
  border-radius: 10px;
  background-color: skyblue;
  color: white;
}

#btn-informasi-penyakit:hover,
#btn-konsultasi-gejala:hover {
  background-color: deepskyblue;
}
