/* ---------- GLOBAL ---------- */
* {
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #333;
}

/* ---------- MODAL ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  padding: 28px 24px;
  border-radius: 14px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: fadeInScale 0.3s ease;
}


.modal-content h3 {
  margin-top: 0;
  color: #c0392b;
}

.modal-content button {
  margin-top: 18px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #2c5364;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- NAVBAR ---------- */
.navbar {
  background: rgba(255,255,255,0.95);
  padding: 14px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.navbar h1 {
  font-size: 18px;
  margin: 0;
  color: #203a43;
}

.logout-btn {
  background: #b02a37;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* ---------- LANGUAGE SELECT ---------- */
#output_lang {
  margin-left: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  margin-top: 25px;
  font-size: 12px;
  color: #777;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

footer img {
  height: 32px;
}

/* ---------- BUTTONS ---------- */
button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #2c5364;
  color: white;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: #203a43;
}

/* ---------- MEDICAL ASSISTANT ---------- */
.container {
  padding: 25px;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.panel {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.chat-container {
  flex: 1;
  min-width: 420px;
}

.result-container {
  flex: 1;
  min-width: 420px;
}

.messages {
  height: 120px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 10px;
  background: #fafafa;
  margin-bottom: 12px;
}

textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 10px;
  resize: vertical;
}

.fieldlarge textarea {
  height: 200px;
}

.input-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ---------- SPEAKER VIEW ---------- */
.speaker-view {
  max-height: 680px;
  max-width: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speaker {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 80%;
}

.speaker.doctor {
  align-self: flex-start;
  background: #e3f2fd;
  border-left: 5px solid #1976d2;
}

.speaker.patient {
  align-self: flex-end;
  background: #fce4ec;
  border-right: 5px solid #c2185b;
}

.speaker strong {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
}

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

.navbar-dropdown-area label {
  margin: 0;
}
