/* ========================= ABOUT PAGE - Mind360 ========================= */

.chat-section {
  position: relative;
  background: rgba(235, 243, 250, 1);
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 4rem) 0;
  overflow-x: hidden;
}

.chat-page-title {
  font-family: var(--heading-font, 'Playfair Display', serif);
  text-align: center;
  color: #5351a1;
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  margin-bottom: 3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.chat-wrapper {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1.5rem 4rem 1.5rem;
}

/* --- Row Layouts & "Spring Bounce" Animation --- */

.msg-row {
  display: flex;
  width: 100%;
  align-items: flex-end;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

.user-row {
  justify-content: flex-start;
  transform: translate3d(-80px, 50px, 0) scale(0.8);
}

.bot-row {
  justify-content: flex-end;
  transform: translate3d(80px, 50px, 0) scale(0.8);
}

.msg-row.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* --- Avatar Styling --- */

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(83, 81, 161, 0.12);
  overflow: hidden;
  background: #fff;
  backface-visibility: hidden;
}

.bot-avatar {
  background: #fff;
  border: 1px solid rgba(83, 81, 161, 0.1);
}

/* UPDATED CSS for the new logo image */
.bot-avatar img {
  width: 100%;
  /* Changed from 65% to 100% */
  height: 100%;
  /* Changed from auto to 100% */
  object-fit: cover;
  /* Ensures the square image fills the circle perfectly */
}

.user-avatar {
  background: #5351a1;
  color: #fff;
}

.user-avatar .material-icons {
  font-size: 26px;
}

/* --- Bubble Styling --- */

.bubble {
  max-width: 75%;
  padding: 1.25rem 1.6rem;
  font-family: var(--body-font, sans-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  position: relative;
  box-shadow: 0 4px 15px rgba(83, 81, 161, 0.08);
}

.user-bubble {
  background: #5351a1;
  color: #fff;
  border-radius: 20px 20px 20px 4px;
}

.bot-bubble {
  background: #F6F5FD;
  color: #2c2c2c;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px 20px 4px 20px;
}

.sender-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #5351a1;
  margin-bottom: 6px;
  letter-spacing: 0.6px;
  opacity: 0.9;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .chat-wrapper {
    padding: 0 1rem 3rem 1rem;
    gap: 1.2rem;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .bubble {
    max-width: 82%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .user-row {
    transform: translate3d(-30px, 30px, 0) scale(0.9);
  }

  .bot-row {
    transform: translate3d(30px, 30px, 0) scale(0.9);
  }

  .msg-row.active {
    transform: translate3d(0, 0, 0) scale(1);
  }
}