
/* style.css */

/* ─────────── Global Body Adjustment ─────────── */
body {
  padding-top: 64px;
}

/* ─────────── Splash Screen Styles (MODIFIED) ─────────── */
#splashScreen {
  position: fixed;
  top: 64px; 
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff; /* Use a solid white background now */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.4s ease;
}
#splashScreen.fade-out {
  opacity: 0;
}

.splash-card {
  width: 100%;
  max-width: 600px;
  padding: 1rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-card h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}
.splash-card p {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0 0 2rem;
}

/* The new all-in-one input bar style */
#splashInputArea {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px 8px 16px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#splashInputArea textarea {
  flex: 1;
  padding: 8px 0;
  margin: 0;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  resize: none;
  outline: none;
  text-align: left;
  /* Hide scrollbar that might appear */
  overflow: hidden;
}

#splashInputArea textarea::placeholder {
  color: #6b7280;
  opacity: 1;
}

#splashInputArea .icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
}
#splashInputArea .icon-btn:hover {
  color: #000;
}
#splashInputArea .icon-btn svg {
  width: 22px;
  height: 22px;
}
#splashInputArea #splashSend {
  font-size: 1.25rem;
}


.hidden { display: none !important; }

/* ───────────────────────────────────────────────────────────── */

/* ────────── Your Original Styles Below (UNCHANGED) ────────── */

/* reset & globals */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  width: 100%;
  height: 100%;
  font-family: sans-serif;
  background: #ffffff;
}

/* center panel */
#main {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  /* The height should fill the remaining space */
  height: calc(100vh - 64px); 
  margin: 0 auto; /* No top margin needed now */
  background: #ffffff;
  border: 1px solid #e1e1e6;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* header – no box */
#chatHeader {
  padding: 16px 0;       /* vertical padding only */
  text-align: center;
  background: transparent;/* remove white background */
  border-bottom: none;   /* remove border */
}
#chatTitle {
  font-size: 1.4rem;
  font-weight: bold;
  color: #000;
}

/* messages container */
#chatContainer {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* strip away bubble styling */
.message {
  display: block;
  padding: 0;
  margin: 0;
  background: none !important;
  border-radius: 0 !important;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* USER question: bold & black, right-aligned */
.message.user {
  align-self: flex-end;
  text-align: right;
  color: #000;
  font-weight: bold;
  margin: 4px 0;
}

/* assistant reply: left-aligned, slightly lower */
.message.bot {
  align-self: flex-start;
  text-align: left;
  color: #333333;
  margin: 8px 0 4px 0;
}

/* loading indicator */
#chatLoading {
  font-size: 0.9em;
  color: #666;
  display: none;
  margin-top: 4px;
}

/* input bar */
#inputArea {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #ffffff;
  border-top: 1px solid #e1e1e6;
  gap: 8px;
}
#chatInput {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e1e1e6;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 1rem;
  outline: none;
  color: #000;
}
#chatInput::placeholder {
  color: #888;
}
.icon-btn,
#sendBtn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #555;
  cursor: pointer;
}
.icon-btn:hover,
#sendBtn:hover {
  color: #000;
}
.icon-btn:disabled,
#sendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.icon-btn svg {
  width: 17.5px;
  height: 17.5px;
}

/* optional: slimmer scrollbar */
#chatContainer::-webkit-scrollbar {
  width: 6px;
}
#chatContainer::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
}

/* ---------- Mobile chat layout (≤ 640px) ---------- */

@media (max-width: 430px) {
  /* Navbar adjustments */
  nav {
    padding: 0.35rem 0.6rem;
  }
  nav img {
    height: 18px;
  }
  nav a, nav button {
    font-size: 12px;
    padding: 0.3rem 0.5rem;
  }

  /* Splash section smaller */
  .splash-container h1 {
    font-size: 1.4rem; /* reduced heading size */
  }
  .splash-container p {
    font-size: 0.9rem; /* slightly smaller subtext */
  }
  .chat-input {
    max-width: 85%; /* narrower input bar */
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem;
  }
}




