:root {
  color-scheme: light;
  --page: #f4f7f5;
  --paper: #fbf7ec;
  --card: #ffffff;
  --text: #12231e;
  --muted: #66736f;
  --line: #dce6e1;
  --primary: #08704f;
  --primary-2: #0c8a63;
  --primary-dark: #064a37;
  --primary-soft: #e5f5ee;
  --lead-bubble: #dff7e6;
  --bot-bubble: #ffffff;
  --shadow: 0 28px 80px rgba(16, 49, 39, 0.2);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(8, 112, 79, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(202, 178, 102, 0.12), transparent 30%),
    var(--page);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.chat-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  width: min(100%, 820px);
  height: min(940px, calc(100vh - 36px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 17px;
  background:
    linear-gradient(135deg, rgba(6, 74, 55, 0.96), rgba(8, 112, 79, 0.98)),
    radial-gradient(circle at 82% 0, rgba(255, 255, 255, 0.18), transparent 34%);
  color: #fff;
}

.header-icon {
  position: relative;
  display: none;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.header-icon::before {
  position: absolute;
  inset: 10px 8px 10px 12px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(45deg);
  content: "";
}

.consultant-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: url("assets/avatar-dr-tiago-p.png") center / cover no-repeat;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  color: #fff;
  font-size: 0;
}

.consultant-avatar span {
  display: none;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-top: 35px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.consultant-info {
  min-width: 0;
}

.doctor-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.consultant-info h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 850;
  letter-spacing: 0;
}

.verified-mark {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9be36d;
}

.verified-mark::before {
  position: absolute;
  width: 9px;
  height: 5px;
  left: 5px;
  top: 6px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
  content: "";
}

.consultant-info p,
.consultant-info small {
  display: block;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
}

.consultant-info p {
  position: relative;
  padding-left: 16px;
  font-size: 0.98rem;
  font-weight: 650;
}

.consultant-info p::before {
  position: absolute;
  width: 9px;
  height: 9px;
  left: 0;
  top: 0.42em;
  border-radius: 50%;
  background: #9be36d;
  box-shadow: 0 0 0 4px rgba(155, 227, 109, 0.14);
  content: "";
}

.consultant-info small {
  font-size: 0.9rem;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.secure-dot {
  position: relative;
  width: 13px;
  height: 15px;
  border: 2px solid #baf7d9;
  border-radius: 8px 8px 9px 9px;
}

.secure-dot::before {
  position: absolute;
  width: 7px;
  height: 5px;
  left: 1px;
  top: -7px;
  border: 2px solid #baf7d9;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.trust-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(211, 202, 181, 0.58);
  background: rgba(251, 247, 236, 0.92);
  scrollbar-width: none;
}

.trust-strip::-webkit-scrollbar {
  display: none;
}

.trust-strip span {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 11px 8px 32px;
  border: 1px solid rgba(8, 112, 79, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.trust-strip span::before {
  position: absolute;
  width: 15px;
  height: 15px;
  left: 10px;
  top: 50%;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transform: translateY(-50%);
  content: "";
}

.trust-strip span::after {
  position: absolute;
  width: 6px;
  height: 3px;
  left: 15px;
  top: 50%;
  border-bottom: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
  transform: translateY(-70%) rotate(-45deg);
  content: "";
}

.chat-window {
  overflow-y: auto;
  padding: 22px 22px 18px;
  background:
    linear-gradient(rgba(251, 247, 236, 0.88), rgba(251, 247, 236, 0.92)),
    radial-gradient(circle at 18px 18px, rgba(8, 112, 79, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 38px 44px, rgba(177, 152, 84, 0.08) 0 1px, transparent 1px);
  background-size: auto, 46px 46px, 54px 54px;
  scroll-behavior: smooth;
}

.message-row {
  display: flex;
  width: 100%;
  margin: 0 0 12px;
  animation: messageIn 0.24s ease-out both;
}

.message-row.lead {
  justify-content: flex-end;
}

.bubble {
  position: relative;
  width: fit-content;
  max-width: min(78%, 430px);
  padding: 12px 14px 20px;
  border: 1px solid rgba(26, 58, 48, 0.08);
  border-radius: 12px;
  background: var(--bot-bubble);
  box-shadow: 0 8px 22px rgba(38, 49, 45, 0.09);
  color: #17231f;
  font-size: 0.98rem;
  line-height: 1.46;
}

.message-row.bot .bubble {
  border-top-left-radius: 3px;
}

.message-row.lead .bubble {
  border-top-right-radius: 3px;
  background: var(--lead-bubble);
  border-color: rgba(8, 112, 79, 0.14);
}

.bubble p {
  margin: 0;
}

.rich-text {
  display: grid;
  gap: 8px;
}

.rich-text p {
  margin: 0;
}

.rich-text strong {
  font-weight: 850;
}

.formatted-text {
  white-space: pre-line;
  line-height: 1.45;
}

.message-time {
  position: absolute;
  right: 10px;
  bottom: 5px;
  color: #7a8783;
  font-size: 0.68rem;
  line-height: 1;
}

.message-row.lead .message-time::after {
  margin-left: 4px;
  color: #34b7f1;
  font-weight: 900;
  letter-spacing: -3px;
  content: "✓✓";
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 230px;
  color: var(--primary-dark);
}

.typing strong {
  margin-right: 8px;
  font-size: 0.82rem;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: typing 1s infinite ease-in-out;
}

.typing span:nth-child(3) {
  animation-delay: 0.16s;
}

.typing span:nth-child(4) {
  animation-delay: 0.32s;
}

.options {
  display: grid;
  gap: 9px;
  width: min(78%, 430px);
  margin: 12px 0 12px;
  animation: messageIn 0.24s ease-out both;
}

.option-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px 12px 58px;
  border: 1px solid rgba(8, 112, 79, 0.21);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 18px rgba(38, 49, 45, 0.06);
  color: var(--primary-dark);
  font-weight: 850;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.option-button::before {
  position: absolute;
  width: 28px;
  height: 28px;
  left: 16px;
  top: 50%;
  border: 2px solid var(--primary);
  border-radius: 8px;
  transform: translateY(-50%);
  content: "";
}

.option-button[data-icon="bag"]::after,
.option-button[data-icon="lock"]::after,
.option-button[data-icon="check"]::after,
.option-button[data-icon="info"]::after,
.option-button[data-icon="edit"]::after {
  position: absolute;
  left: 25px;
  top: 50%;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.option-button[data-icon="bag"]::after {
  content: "";
  width: 12px;
  height: 8px;
  border: 2px solid var(--primary);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  transform: translate(-50%, -105%);
}

.option-button[data-icon="cart"]::before {
  border-radius: 4px;
  transform: translateY(-50%) skewX(-8deg);
}

.option-button[data-icon="cart"]::after {
  position: absolute;
  width: 22px;
  height: 3px;
  left: 19px;
  top: calc(50% + 15px);
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--primary) 0 3px, transparent 4px) left center / 10px 10px no-repeat,
    radial-gradient(circle, var(--primary) 0 3px, transparent 4px) right center / 10px 10px no-repeat;
  content: "";
}

.option-button[data-icon="health"]::before {
  border-radius: 50%;
}

.option-button[data-icon="health"]::after {
  position: absolute;
  width: 13px;
  height: 13px;
  left: 24px;
  top: 50%;
  border-right: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  transform: translate(-50%, -70%) rotate(45deg);
  content: "";
}

.option-button[data-icon="lock"]::after {
  content: "";
  width: 11px;
  height: 8px;
  border: 2px solid var(--primary);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transform: translate(-50%, -115%);
}

.option-button[data-icon="check"]::after {
  content: "✓";
}

.option-button[data-icon="info"]::after {
  content: "i";
}

.option-button[data-icon="edit"]::after {
  content: "↺";
}

.option-button:hover,
.option-button:focus-visible {
  border-color: rgba(8, 112, 79, 0.52);
  background: var(--primary-soft);
  box-shadow: 0 12px 24px rgba(8, 112, 79, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.media-stack {
  display: grid;
  gap: 12px;
  margin: 2px 0 0;
}

.media-card,
.social-proof {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(8, 112, 79, 0.13);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(38, 49, 45, 0.08);
}

.media-card {
  padding: 12px;
}

.media-kicker {
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.media-card strong,
.social-proof strong {
  color: var(--primary-dark);
  font-size: 0.98rem;
}

.media-card p,
.social-proof p {
  margin: 0;
  color: #2f3f3a;
  font-size: 0.84rem;
  line-height: 1.42;
}

.media-preview {
  position: relative;
  display: grid;
  min-height: 152px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(6, 74, 55, 0.86), rgba(21, 37, 32, 0.88)),
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.4) 0 11%, transparent 12%),
    linear-gradient(90deg, transparent 0 35%, rgba(255, 255, 255, 0.75) 35% 65%, transparent 65%);
}

.audio-card .media-preview {
  min-height: 88px;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 0 16px;
  background:
    linear-gradient(135deg, rgba(8, 112, 79, 0.1), rgba(202, 178, 102, 0.22)),
    #f6faf8;
}

.audio-card .media-preview::after {
  display: block;
  width: 100%;
  height: 42px;
  background:
    linear-gradient(90deg, transparent 0 3px, var(--primary) 3px 5px, transparent 5px 12px),
    linear-gradient(90deg, transparent 0 3px, rgba(8, 112, 79, 0.45) 3px 5px, transparent 5px 12px);
  background-size:
    12px 24px,
    12px 38px;
  background-position:
    0 9px,
    6px 2px;
  content: "";
}

.play-symbol {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  z-index: 1;
}

.play-symbol::before {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid var(--primary-dark);
  content: "";
}

.audio-card .play-symbol {
  width: 44px;
  height: 44px;
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(8, 112, 79, 0.2);
}

.audio-card .play-symbol::before {
  border-left-color: #fff;
}

.media-duration {
  position: absolute;
  right: 10px;
  bottom: 20px;
  z-index: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.audio-card .media-duration {
  right: 12px;
  bottom: 8px;
  background: transparent;
  color: var(--text);
}

.media-progress {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.audio-card .media-progress {
  right: 16px;
  left: 74px;
  background: rgba(8, 112, 79, 0.14);
}

.media-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #baf7d9;
}

.audio-card .media-progress span {
  background: var(--primary);
}

.media-action {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
}

.video-card.is-playing .media-preview {
  background:
    linear-gradient(150deg, rgba(6, 74, 55, 0.7), rgba(21, 37, 32, 0.82)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 14px, rgba(255, 255, 255, 0.14) 14px 15px);
}

.media-card.is-playing .play-symbol::before {
  width: 14px;
  height: 20px;
  margin-left: 0;
  border: 0;
  border-right: 5px solid var(--primary-dark);
  border-left: 5px solid var(--primary-dark);
}

.audio-card.is-playing .play-symbol::before {
  border-right-color: #fff;
  border-left-color: #fff;
}

.media-card.has-ended .media-progress span {
  width: 100%;
}

.social-proof {
  max-width: min(78%, 430px);
  padding: 14px;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar-stack span {
  width: 34px;
  height: 34px;
  margin-left: -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #f2d3bd 0 22%, transparent 23%),
    radial-gradient(circle at 50% 105%, #f2d3bd 0 36%, transparent 37%),
    linear-gradient(135deg, #0a6a4c, #d9efe7);
  box-shadow: 0 5px 12px rgba(20, 37, 31, 0.12);
}

.avatar-stack span:nth-child(2) {
  background:
    radial-gradient(circle at 50% 34%, #ddb79a 0 22%, transparent 23%),
    radial-gradient(circle at 50% 105%, #ddb79a 0 36%, transparent 37%),
    linear-gradient(135deg, #cab266, #f4efe0);
}

.avatar-stack span:nth-child(3) {
  background:
    radial-gradient(circle at 50% 34%, #c99578 0 22%, transparent 23%),
    radial-gradient(circle at 50% 105%, #c99578 0 36%, transparent 37%),
    linear-gradient(135deg, #143b31, #d9efe7);
}

.chat-input {
  padding: 12px 16px;
  border-top: 1px solid rgba(211, 202, 181, 0.58);
  background: rgba(251, 247, 236, 0.92);
}

.chat-input label {
  display: block;
  margin-bottom: 7px;
  color: #3b514a;
  font-size: 0.82rem;
  font-weight: 850;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.input-row input {
  min-width: 0;
  height: 50px;
  border: 1px solid #cddbd6;
  border-radius: 999px;
  padding: 0 17px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(8, 112, 79, 0.12);
}

.input-row button {
  min-width: 88px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.input-row button:disabled,
.option-button:disabled,
.media-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.input-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #b42318;
  font-size: 0.78rem;
}

.is-hidden {
  display: none;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes messageIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes mediaProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes videoEnding {
  from {
    width: 0;
  }
  to {
    width: 92%;
  }
}

@keyframes audioWaveProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes titlePulse {
  0%,
  100% {
    transform: scale(1);
    color: #075e54;
  }
  50% {
    transform: scale(1.035);
    color: #009b7c;
  }
}

@keyframes playPulse {
  0%,
  100% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 14px 34px rgba(0, 128, 105, 0.32);
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@media (min-width: 860px) {
  .app-shell {
    padding: 24px;
  }

  .chat-window {
    padding-right: 34px;
    padding-left: 34px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 0;
  }

  .chat-card {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .chat-header {
    gap: 10px;
    padding: 14px 12px;
  }

  .header-icon {
    display: block;
  }

  .consultant-avatar {
    width: 58px;
    height: 58px;
  }

  .consultant-avatar span {
    width: 22px;
    height: 22px;
    margin-top: 27px;
    font-size: 8px;
  }

  .consultant-info h1 {
    font-size: 1.28rem;
  }

  .consultant-info p {
    font-size: 0.86rem;
  }

  .consultant-info small {
    font-size: 0.78rem;
  }

  .secure-badge {
    padding: 7px;
    font-size: 0.7rem;
  }

  .trust-strip {
    padding: 10px 12px;
  }

  .chat-window {
    padding: 17px 10px 14px;
  }

  .bubble,
  .options,
  .social-proof {
    max-width: 88%;
  }

  .options {
    width: 88%;
  }

}

@media (max-width: 390px) {
  .secure-badge {
    display: none;
  }

  .bubble,
  .options,
  .social-proof {
    max-width: 92%;
  }

  .options {
    width: 92%;
  }
}

/* Refinamento inspirado no app de mensageria atual, sem uso de marca oficial. */
.chat-card {
  grid-template-rows: auto auto 1fr auto;
  width: min(100%, 560px);
  height: min(940px, calc(100vh - 28px));
  border-radius: 18px;
  background: #efe8dc;
}

.chat-header {
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  color: #121b19;
  box-shadow: 0 1px 3px rgba(18, 27, 25, 0.08);
  z-index: 2;
}

.header-icon {
  display: block;
}

.header-icon::before {
  border-color: #111816;
}

.consultant-avatar {
  width: 46px;
  height: 46px;
  border: 0;
  box-shadow: none;
}

.consultant-avatar span {
  width: 18px;
  height: 18px;
  margin-top: 22px;
  font-size: 7px;
}

.consultant-info h1 {
  font-size: 1.28rem;
  font-weight: 500;
}

.doctor-title {
  gap: 6px;
}

.verified-mark {
  width: 16px;
  height: 16px;
  background: #1da1f2;
}

.verified-mark::before {
  width: 7px;
  height: 4px;
  left: 4px;
  top: 5px;
}

.consultant-info p {
  padding-left: 0;
  color: #303a37;
  font-size: 0.82rem;
  font-weight: 400;
}

.consultant-info p::before {
  display: none;
}

.consultant-info small {
  display: none;
}

.secure-badge {
  margin-left: auto;
  border-color: rgba(8, 112, 79, 0.16);
  background: #eef8f3;
  color: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  color: #111816;
}

.action-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.action-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.trust-strip {
  gap: 6px;
  padding: 8px 10px;
  background: rgba(239, 232, 220, 0.96);
  border-bottom: 1px solid rgba(207, 199, 185, 0.55);
}

.trust-strip span {
  padding: 7px 10px 7px 28px;
  border-color: rgba(8, 112, 79, 0.12);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
}

.trust-strip span::before {
  left: 9px;
  width: 13px;
  height: 13px;
}

.trust-strip span::after {
  left: 13px;
}

.chat-window {
  padding: 12px 10px 12px;
  background-color: #efe8dc;
  background-image:
    linear-gradient(rgba(239, 232, 220, 0.84), rgba(239, 232, 220, 0.86)),
    url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c9c1b5' stroke-width='1.4' opacity='.42'%3E%3Cpath d='M18 20h18v14H18zM22 24h10M22 29h7'/%3E%3Cpath d='M78 18c7 0 13 5 13 12s-6 12-13 12-13-5-13-12 6-12 13-12z'/%3E%3Cpath d='M74 30h8M78 26v8'/%3E%3Cpath d='M20 76c0-8 7-15 15-15s15 7 15 15-7 15-15 15c-3 0-6-1-8-2l-9 3 3-8c-1-2-1-5-1-8z'/%3E%3Cpath d='M80 78h22v18H80zM85 83h12M85 89h8'/%3E%3Cpath d='M55 48l8 8-8 8-8-8zM96 52l7 3 3 7-7-3zM38 42l5-8 5 8z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
}

.date-separator {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 2px rgba(18, 27, 25, 0.08);
  color: #68706d;
  font-size: 0.78rem;
  font-weight: 700;
}

.message-row {
  margin-bottom: 7px;
}

.bubble {
  max-width: min(86%, 410px);
  padding: 8px 9px 18px;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(18, 27, 25, 0.15);
  font-size: 1rem;
}

.message-row.bot .bubble {
  border-top-left-radius: 0;
}

.message-row.lead .bubble {
  border-top-right-radius: 0;
  background: #d9fdd3;
}

.message-author {
  display: block;
  margin-bottom: 3px;
  color: #008069;
  font-size: 0.78rem;
  font-weight: 800;
}

.message-time {
  right: 7px;
  bottom: 4px;
  color: #66716e;
}

.typing {
  min-width: 198px;
  gap: 5px;
  color: #008069;
}

.typing strong {
  margin-right: 6px;
  font-weight: 700;
}

.typing span {
  background: #008069;
}

.options {
  width: min(86%, 410px);
  gap: 7px;
  margin-top: 8px;
}

.option-button {
  min-height: 48px;
  padding: 10px 13px 10px 52px;
  border-color: rgba(0, 128, 105, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(18, 27, 25, 0.13);
  color: #075e54;
  font-size: 0.95rem;
}

.option-button::before {
  left: 14px;
  width: 26px;
  height: 26px;
  border-color: #008069;
  border-radius: 6px;
}

.option-button:hover,
.option-button:focus-visible {
  background: #f3fbf8;
  border-color: rgba(0, 128, 105, 0.42);
  box-shadow: 0 4px 10px rgba(18, 27, 25, 0.1);
}

.message-row.rich-message .bubble {
  width: min(88%, 410px);
  max-width: min(88%, 410px);
  padding: 4px 4px 18px;
  overflow: hidden;
}

.media-stack {
  gap: 8px;
  margin: 0;
}

.chat-image-card {
  margin: 0;
}

.chat-image-card img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 6px;
}

.chat-image-card figcaption {
  margin: 8px 2px 0;
  color: #25322e;
  font-size: 0.88rem;
  line-height: 1.35;
}

.real-video-card {
  display: grid;
  gap: 9px;
  overflow: hidden;
}

.real-video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: #07110f;
}

.real-video-frame video {
  display: block;
  width: 100%;
  max-height: 430px;
  background: #07110f;
}

.real-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  animation: playPulse 1.15s ease-in-out infinite;
}

.real-video-play::before {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid #075e54;
  content: "";
}

.real-video-card.is-playing .real-video-play {
  opacity: 0.88;
  animation: none;
}

.real-video-card.is-playing .real-video-play::before {
  width: 18px;
  height: 24px;
  margin-left: 0;
  border: 0;
  border-right: 6px solid #075e54;
  border-left: 6px solid #075e54;
}

.real-video-duration {
  position: absolute;
  right: 9px;
  bottom: 18px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.ending-strip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.ending-strip span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #25d366;
}

.real-video-title,
.real-video-card p {
  margin-right: 6px;
  margin-left: 6px;
}

.real-video-title {
  display: inline-block;
  order: -1;
  margin-bottom: 1px;
  color: #075e54;
  font-size: 0.98rem;
  font-weight: 850;
  animation: titlePulse 1.15s ease-in-out infinite;
}

.real-video-card p {
  margin-top: 0;
  margin-bottom: 0;
  color: #25322e;
  font-size: 0.86rem;
  line-height: 1.4;
}

.real-video-action {
  min-height: 38px;
  margin: 0 6px 4px;
  border: 0;
  border-radius: 6px;
  background: #e9f7f2;
  color: #008069;
  font-weight: 850;
}

.real-audio-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 260px;
}

.real-audio-play {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #66716e;
}

.real-audio-play::before {
  position: absolute;
  left: 15px;
  top: 11px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  content: "";
}

.real-audio-card.is-playing .real-audio-play {
  background: #008069;
}

.real-audio-card.is-playing .real-audio-play::before {
  left: 13px;
  top: 10px;
  width: 12px;
  height: 18px;
  border: 0;
  border-right: 4px solid #fff;
  border-left: 4px solid #fff;
}

.real-audio-body {
  display: grid;
  gap: 5px;
}

.real-audio-body strong {
  color: #075e54;
  font-size: 0.9rem;
}

.real-audio-body p {
  margin: 0;
  color: #52605c;
  font-size: 0.78rem;
  line-height: 1.25;
}

.real-audio-wave {
  position: relative;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 3px, #c3cbc8 3px 5px, transparent 5px 10px),
    linear-gradient(90deg, transparent 0 3px, #d2d8d6 3px 5px, transparent 5px 10px);
  background-size:
    10px 18px,
    10px 28px;
  background-position:
    0 5px,
    5px 0;
}

.real-audio-wave span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background:
    linear-gradient(90deg, transparent 0 3px, #34b7f1 3px 5px, transparent 5px 10px),
    linear-gradient(90deg, transparent 0 3px, #008069 3px 5px, transparent 5px 10px);
  background-size:
    10px 18px,
    10px 28px;
  background-position:
    0 5px,
    5px 0;
}

.real-audio-duration {
  color: #66716e;
  font-size: 0.76rem;
}

.chat-check-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-check-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.28;
}

.chat-check-list li::before {
  position: absolute;
  left: 0;
  top: 0.08em;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 4px;
  background: #36c883;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  content: "✓";
}

.media-card,
.social-proof {
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  background: #fff;
}

.media-card {
  padding: 0 0 8px;
  overflow: hidden;
}

.forwarded-label {
  position: relative;
  display: block;
  margin: 6px 9px 4px;
  padding-left: 19px;
  color: #66716e;
  font-size: 0.78rem;
  font-style: italic;
}

.forwarded-label::before {
  position: absolute;
  left: 0;
  top: 2px;
  color: #66716e;
  font-style: normal;
  content: "↱";
}

.media-kicker {
  display: block;
  margin: 0 9px 7px;
  color: #008069;
  text-align: left;
  font-size: 0.82rem;
}

.media-card strong,
.media-card p {
  display: block;
  margin-right: 10px;
  margin-left: 10px;
}

.media-preview {
  min-height: 250px;
  margin: 0 4px 9px;
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(5, 32, 27, 0.25), rgba(5, 32, 27, 0.65)),
    radial-gradient(circle at 50% 24%, #d8b59b 0 12%, transparent 13%),
    radial-gradient(circle at 50% 105%, #d8b59b 0 26%, transparent 27%),
    linear-gradient(120deg, #214c3f, #c9d8cf 52%, #0a3a2e);
}

.video-card:nth-child(2) .media-preview {
  background:
    linear-gradient(145deg, rgba(5, 32, 27, 0.22), rgba(5, 32, 27, 0.58)),
    radial-gradient(circle at 50% 28%, #c08f73 0 13%, transparent 14%),
    radial-gradient(circle at 50% 105%, #c08f73 0 27%, transparent 28%),
    linear-gradient(120deg, #5b4141, #d7ccc1 52%, #533225);
}

.audio-card .media-preview {
  min-height: 76px;
  margin: 0 8px 9px;
  border-radius: 999px;
  grid-template-columns: 42px 1fr 38px;
  background: #f1f3f2;
}

.audio-card .media-preview::before {
  display: block;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #d8b59b 0 18%, transparent 19%),
    radial-gradient(circle at 50% 104%, #d8b59b 0 34%, transparent 35%),
    linear-gradient(135deg, #0a6a4c, #d9efe7);
  content: "";
}

.audio-card .media-preview::after {
  height: 34px;
  grid-column: 2;
  grid-row: 1;
  background:
    linear-gradient(90deg, transparent 0 2px, #b9c1bf 2px 5px, transparent 5px 10px),
    linear-gradient(90deg, transparent 0 2px, #c9d0ce 2px 5px, transparent 5px 10px);
  background-size:
    10px 18px,
    10px 30px;
  background-position:
    0 8px,
    5px 2px;
}

.audio-card .play-symbol {
  grid-column: 1;
  grid-row: 1;
  width: 30px;
  height: 30px;
  background: transparent;
  box-shadow: none;
}

.audio-card .play-symbol::before {
  border-top-width: 9px;
  border-bottom-width: 9px;
  border-left-width: 14px;
  border-left-color: #66716e;
}

.play-symbol {
  background: rgba(255, 255, 255, 0.82);
}

.media-duration {
  right: 9px;
  bottom: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.56);
}

.audio-card .media-duration {
  position: absolute;
  right: 58px;
  bottom: 8px;
  padding: 0;
  background: transparent;
  color: #66716e;
}

.media-progress {
  display: none;
}

.audio-card .media-progress {
  display: block;
  left: 58px;
  right: 52px;
  bottom: 17px;
  height: 3px;
  background: #d6dcda;
}

.media-action {
  margin: 0 10px;
  width: calc(100% - 20px);
  min-height: 38px;
  border-radius: 6px;
  background: #e9f7f2;
  color: #008069;
}

.social-proof {
  width: min(88%, 410px);
  max-width: min(88%, 410px);
  padding: 10px;
}

.chat-input {
  border-top: 1px solid rgba(207, 199, 185, 0.55);
  background: rgba(239, 232, 220, 0.96);
}

.chat-input {
  padding: 8px 9px;
}

.input-row input {
  height: 44px;
  border: 0;
  border-radius: 999px;
}

.input-row button {
  min-width: 78px;
  border-radius: 999px;
  background: #008069;
}

@media (min-width: 860px) {
  .chat-card {
    width: min(100%, 620px);
  }

  .chat-window {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 620px) {
  .chat-card {
    border-radius: 0;
  }

  .chat-header {
    padding: 8px 8px;
  }

  .secure-badge {
    display: none;
  }

  .bubble,
  .options {
    max-width: 92%;
  }

  .options {
    width: 92%;
  }

  .message-row.rich-message .bubble,
  .social-proof {
    width: 92%;
    max-width: 92%;
  }

  .media-preview {
    min-height: 360px;
  }

}

@media (max-width: 390px) {
  .header-actions {
    gap: 11px;
  }

  .consultant-info h1 {
    font-size: 1.08rem;
  }

  .consultant-info p {
    font-size: 0.76rem;
  }

  .media-preview {
    min-height: 310px;
  }
}
