
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  height: 100dvh;
  background: #f5f7fb;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.header {
  background: #ffffff;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* CHAT AREA */
.chat {
 flex: 1;
  min-height: 0;   /* IMPORTANT for flex scrolling */
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* MESSAGE */
.msg {
  max-width: 75%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease-in-out;
  word-wrap: break-word;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* USER */
.user {
  background: #2563eb;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

/* BOT */
.bot {
  background: #ffffff;
  color: #1f2937;
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  border: 1px solid #e5e7eb;
}

/* INPUT */
.input-box {
  display: flex;
  padding: 14px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.input-box input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  outline: none;
  font-size: 14px;
  background: #fff;
}

.input-box input:focus {
  border-color: #2563eb;
}

.input-box button {
  margin-left: 10px;
  padding: 12px 18px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.input-box button:hover {
  background: #1d4ed8;
}

/* TYPING */
.typing {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

/* ANIMATION */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* MOBILE */
@media(max-width:600px){
  .msg {
    max-width: 90%;
    font-size: 13px;
  }

  .input-box {
    padding: 10px;
  }

  .input-box input {
    font-size: 13px;
  }
}

.suggestions-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
   border-radius: 14px;
    animation: fadeIn 0.2s ease-in-out;
  word-wrap: break-word;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 75%;
    background: #fff;
     padding: 10px;
    margin: 8px 0;
}

.suggestions-title {
    font-size: 12px;
    color: #e71616;
    margin: 0 0 8px 2px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
}

.suggestion-item {
    background: #f5f5f5;
    border: 0.5px solid #ddd;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: #222;
    cursor: pointer;
    text-align: left;
    width: fit-content;       /* ← key: no full width */
    transition: background 0.15s;
}

.suggestion-item:hover {
    background: #ececec;
}

.suggestion-item:active {
    transform: scale(0.97);
}
