/* ── Mitra — VisionXEdu AI Assistant styles ── */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(145deg, #1a3a5c 0%, #2d6a9f 40%, #4a90c4 70%, #6db3d8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 32px;
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 32px;
  color: white;
}
.header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header p {
  font-size: 15px;
  opacity: 0.85;
  font-weight: 400;
}

/* ── Chat panel ── */
.panel {
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* ── Chat log ── */
#chatLog {
  height: 360px;
  overflow-y: auto;
  padding: 12px 8px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}
#chatLog::-webkit-scrollbar { width: 4px; }
#chatLog::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

.empty {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  text-align: center;
  margin-top: 130px;
  line-height: 1.6;
}

/* ── Bubbles ── */
.row { display: flex; }
.row.user { justify-content: flex-end; }
.row.bot  { justify-content: flex-start; }

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.row.user .bubble {
  background: rgba(255,255,255,0.9);
  color: #1a3a5c;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.row.bot .bubble {
  background: rgba(255,255,255,0.18);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-bottom-left-radius: 4px;
}
.bubble.error {
  background: rgba(220, 80, 80, 0.25);
  color: #ffd6d6;
  border: 1px solid rgba(220,80,80,0.3);
}

/* ── Typing indicator ── */
.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
}
.typing span {
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1);   }
}

/* ── Input row ── */
.inputRow {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 6px 6px 6px 14px;
}
.inputRow input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 14px;
  font-family: inherit;
}
.inputRow input::placeholder { color: rgba(255,255,255,0.55); }

button {
  padding: 9px 20px;
  background: white;
  border: none;
  border-radius: 10px;
  color: #1a3a5c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
button:hover    { opacity: 0.9; }
button:disabled { opacity: 0.45; cursor: default; }

.status {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  min-height: 16px;
  text-align: center;
}

.footer {
  margin-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-align: center;
  line-height: 2;
}
.footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
}
.footer a:hover {
  color: white;
  text-decoration: underline;
}
/* ── Branding footer ── 
.footer {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
} */

.disclaimer {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.80);
  text-align: center;
  max-width: 580px;
  line-height: 1.6;
}
.header .back-link {
  display: inline-block;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}
.header .back-link:hover {
  background: rgba(255,255,255,0.15);
}
