/* --------------------------------------------------
   Base Typography & Page
-------------------------------------------------- */

body {
  font-family: "Lato", sans-serif;
  background: #fafafa;
  margin: 0;
  padding: 0;
  color: #2a2a2a;
}

h1 {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  color: #004f9e; /* primary blue */
}

/* --------------------------------------------------
  Header & Footer
-------------------------------------------------- */
.assistant-header {
  background: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}

.assistant-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand: echo main nav without shouting */
.assistant-brand {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #004f9e;
  text-transform: uppercase;
  font-size: 1rem;
}

/* Back link: utility, not nav */
.assistant-back {
  font-size: 0.85rem;
  color: #666;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.assistant-back:hover {
  color: #004f9e;
  text-decoration: underline;
}

.assistant-header::before {
  content: "";
  display: block;
  height: 2px;
  background: #03ade8;
}

.site-footer {
  margin-top: 64px;
  background: #4D4D4D;          /* dark neutral */
  color: #ffffffcc;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px 40px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 1.0rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-nav a {
  color: #ffffffcc;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-meta {
  font-size: 1.0rem;
  color: #ffffffcc;
}

.footer-meta strong {
  color: #ffffffcc;
  font-weight: 700;
}

.welcome {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}

.welcome p {
  font-size: 0.95rem;   /* down from ~1rem+ */
  color: #555;          /* lighter than body text */
  line-height: 1.55;
}

/* --------------------------------------------------
   App Layout
-------------------------------------------------- */

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* --------------------------------------------------
   Starter Questions / Orientation
-------------------------------------------------- */

.starter-questions {
  margin-bottom: 20px;
  margin-left: 16px;
}

.starter-intro {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #555;
}

.starter-question {
  display: block;
  background: none;
  border: none;
  padding: 6px 0;
  text-align: left;
  cursor: pointer;
  color: #004f9e; /* light blue accent */
  font-weight: 500;
}

.starter-question:hover {
  text-decoration: underline;
  color: #003a75; /* primary blue on hover */
}

/* --------------------------------------------------
   Chat Container (Workspace)
-------------------------------------------------- */

#chat {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  height: 60vh;
  overflow-y: auto;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px #e6e6e6; /* soft boundary, not a box */
}

/* --------------------------------------------------
   Chat Bubbles
-------------------------------------------------- */

.bubble {
  padding: 14px 18px;
  margin: 8px 0;
  border-radius: 10px;
  max-width: 80%;
  line-height: 1.55;
  white-space: normal;
  background: #ffffff;
}

/* --------------------------------------------------
   Bubble Content Refinement
-------------------------------------------------- */

.bubble p {
  margin: 6px 0;
}

.bubble ul {
  margin: 8px 0 8px 20px;
  padding: 0;
}

.bubble li {
  margin-bottom: 4px;
}

.bubble strong {
  font-weight: 700;
}

/* User message */
.bubble.user {
  align-self: flex-end;
  background: #f0f6ff; /* very light blue */
  border: 1px solid #d6e6fb;
}

.bubble.user p {
  margin-bottom: 2px;
}

/* Assistant message */
.bubble.assistant {
  align-self: flex-start;
  border-left: 3px solid #03ade8; /* guidance cue */
}

/* Normalize assistant list rendering */

.bubble.assistant ul {
  margin: 6px 0 8px 20px;
  padding: 0;
}

.bubble.assistant li {
  margin: 0;
  line-height: 1.35; /* key fix */
}

/* Controlled spacing between bullets */
.bubble.assistant li + li {
  margin-top: 6px;
}

/* Loading */
.bubble.loading {
  opacity: 0.6;
  font-style: italic;
  position: relative;
}

.bubble.loading::after {
  content: "…";
  display: inline-block;
  width: 1em;
  animation: ellipsis 2.2s infinite;
}

@keyframes ellipsis {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

/* --------------------------------------------------
   Input Row
-------------------------------------------------- */

#chat-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

/* Input spans full width on row 1 */
#chat-form input {
  grid-column: 1 / 2;
  grid-row: 1;
  width: 100%;
  box-sizing: border-box;
}

/* Send button on row 1, right aligned */
#send-btn {
  grid-column: 2;
  grid-row: 1;
}

/* Clear chat next to Send */
.clear-chat {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.85rem;
  justify-self: center;
  color: #777;
  cursor: pointer;
}

.clear-chat:hover {
  text-decoration: underline;
}

#chat-form input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  #chat-form {
    grid-template-columns: 1fr;
  }

  #chat-form input {
    grid-column: 1;
  }

  #send-btn {
    grid-column: 1;
    width: 100%;
  }

  .clear-chat {
    grid-column: 1;
    text-align: center;
  }
}

#message {
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  font-family: "Lato", sans-serif;
  background: #ffffff;
}

#message::placeholder {
  color: #999;
}

#message:focus {
  outline: none;
  border-color: #004f9e; /* primary blue */
}

/* --------------------------------------------------
   Send Button
-------------------------------------------------- */

#send-btn {
  background: #004f9e; /* primary blue */
  color: #ffffff;
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease;
}

#send-btn:hover {
  background: #ef8f2f; /* orange accent on hover */
}

#send-btn:active {
  transform: translateY(1px);
}

/* --------------------------------------------------
   Logging Note
-------------------------------------------------- */

.logging-note {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

/* --------------------------------------------------
   Concierge link
-------------------------------------------------- */

.upgrade-links {
  margin-top: 24px;
  text-align: center;
  font-size: 0.95rem;
  color: #555;
}

.upgrade-links span {
  color: #666;
}

.upgrade-links a {
  color: #3b6fa8;
  text-decoration: none;
  font-weight: 500;
  margin: 0 8px;
}

.upgrade-links a:hover {
  color: #ef8f2f;
  text-decoration: underline;
}
