/**
 * TypeBot v5 - Julia (Consultora Financeira)
 * All values baked-in. No var() dependencies.
 * Font: DM Sans | Header: #15803d | Bg: #fafcfb
 * Buttons: WHITE with green hover (presell style)
 */

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

body {
  font-family: 'DM Sans', sans-serif;
  background: #fafcfb;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.chat-container {
  width: 100%;
  max-width: 420px;
  height: 90vh;
  max-height: 700px;
  background: #fafcfb;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}

/* Header */
.chat-header {
  background: #15803d;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #dcfce7;
  flex-shrink: 0;
  position: relative;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid #15803d;
}

.header-info { display: flex; flex-direction: column; }
.header-info .name { color: #ffffff; font-weight: 600; font-size: 14.5px; }
.header-info .status { color: #ffffff; opacity: 0.85; font-size: 12px; }

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafcfb;
}

.chat-messages > * { flex-shrink: 0; }

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 3px; }

/* Bubbles */
.message {
  max-width: 80%;
  padding: 13px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: fadeInUp 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

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

@keyframes spin { to { transform: rotate(360deg); } }

.message.bot {
  background: #fff;
  color: #1f2937;
  align-self: flex-start;
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}

.message.user {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  align-self: flex-end;
  border-radius: 18px 4px 18px 18px;
  font-weight: 500;
}

/* Media */
.message.image, .message.bot.image { padding: 0; background: transparent; box-shadow: none; border: none; max-width: 300px; }
.message.image img, .message.bot.image img { width: 100%; max-width: 300px; height: auto; border-radius: 12px; display: block; }

.message.audio, .message.bot.audio { padding: 0; background: transparent; box-shadow: none; border: none; max-width: 336px; min-width: 240px; }

.wa-audio-player {
  --player-color-featured: #22c55e;
  --player-color-background: #d7fee4;
  --player-color-text: #1a1a1a;
  --player-percent-played: 0;
  --player-current-time: "00:00";
  --player-current-date-time: "00:00";
  background: #d7fee4;
  display: inline-flex;
  min-width: 240px;
  width: 336px;
  max-width: 100%;
  border-radius: 0.4rem;
  padding: 0.4rem;
  user-select: none;
  font-family: 'DM Sans', sans-serif;
}

.wa-audio-player .wa-player { flex: 1; display: flex; }
.wa-audio-player .wa-player .wa-btn-play { outline: none; appearance: none; cursor: pointer; background: none; border: 0; padding: 0 0.8rem 0 0.4rem; }
.wa-audio-player .wa-player .wa-btn-play:disabled { cursor: default; }
.wa-audio-player .wa-player .wa-btn-play svg { color: #1a1a1a; opacity: 0.8; display: none; }
.wa-audio-player .wa-player .wa-btn-play .wa-icon-play { display: inline-block; }
.wa-audio-player.wa-playing .wa-player .wa-btn-play .wa-icon-play { display: none; }
.wa-audio-player.wa-playing .wa-player .wa-btn-play .wa-icon-pause { display: inline-block; }
.wa-audio-player.wa-loading .wa-player .wa-btn-play .wa-icon-play { display: none; }
.wa-audio-player.wa-loading .wa-player .wa-btn-play .wa-icon-loop { display: inline-block; }

@keyframes waLoad { to { transform: rotate(360deg); } }
.wa-audio-player.wa-loading .wa-player .wa-btn-play { pointer-events: none; }
.wa-audio-player.wa-loading .wa-player .wa-btn-play .wa-icon-loop { animation: waLoad 1s linear infinite; }

.wa-audio-player .wa-player .wa-timeline { flex: 1; display: flex; flex-direction: column; position: relative; padding-bottom: 0.2rem; }
.wa-audio-player .wa-player .wa-timeline .wa-line { --line-height: 0.24rem; flex: 1; display: flex; align-items: center; position: relative; }
.wa-audio-player .wa-player .wa-timeline .wa-line:before { content: ""; width: var(--player-percent-played); position: absolute; background: #22c55e; height: var(--line-height); border-radius: calc(var(--line-height) / 2); }
.wa-audio-player .wa-player .wa-timeline .wa-line input[type="range"] { flex: 1; all: unset; appearance: none; background-color: initial !important; border: none; outline: none; width: 100%; position: relative; }
.wa-audio-player .wa-player .wa-timeline .wa-line input[type="range"]::-webkit-slider-thumb { appearance: none; background: #22c55e; width: 0.9rem; height: 0.9rem; border-radius: 50%; margin-top: calc(var(--line-height, 0.24rem) * -1.4); }
.wa-audio-player .wa-player .wa-timeline .wa-line input[type="range"]::-moz-range-thumb { appearance: none; border: 0; background: #22c55e; width: 0.9rem; height: 0.9rem; border-radius: 50%; }
.wa-audio-player .wa-player .wa-timeline .wa-line input[type="range"]::-webkit-slider-runnable-track { background: rgba(0, 0, 0, 0.15); height: var(--line-height); border-radius: calc(var(--line-height) / 2); }
.wa-audio-player .wa-player .wa-timeline .wa-line input[type="range"]::-moz-range-track { background: rgba(0, 0, 0, 0.15); height: var(--line-height); border-radius: calc(var(--line-height) / 2); }
.wa-audio-player .wa-player .wa-timeline .wa-data { display: flex; align-items: center; justify-content: space-between; font-size: 0.68rem; color: #1a1a1a; position: absolute; width: 100%; bottom: 0; }
.wa-audio-player .wa-player .wa-timeline .wa-data .wa-current-time::before { content: var(--player-current-time); }
.wa-audio-player .wa-player .wa-timeline .wa-data .wa-time { display: flex; align-items: center; }
.wa-audio-player .wa-player .wa-timeline .wa-data .wa-time::before { content: var(--player-current-date-time); }
.wa-audio-player .wa-user { position: relative; width: 55px; height: 55px; margin-left: 1.4rem; flex-shrink: 0; }
.wa-audio-player .wa-user img { width: 55px; height: 55px; border-radius: 50%; object-fit: cover; }
.wa-audio-player .wa-user .wa-mic-icon { position: absolute; left: 0; bottom: 0; color: #15803d; transform: translateX(-50%); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }

/* Video */
.message.video, .message.bot.video { padding: 0; background: transparent; box-shadow: none; border: none; max-width: 400px; width: 100%; }
.message.video video, .message.bot.video video { width: 100%; max-width: 400px; height: auto; border-radius: 12px; display: block; }
.message.video > div, .message.bot.video > div { width: 100%; max-width: 400px; border-radius: 12px; overflow: hidden; }
.message.video iframe, .message.bot.video iframe { width: 100%; height: 100%; border: none; display: block; }

/* Embed */
.message.embed, .message.bot.embed { padding: 0; background: transparent; box-shadow: none; border: none; max-width: 100%; width: 100%; }
.message.embed iframe, .message.bot.embed iframe { width: 100%; border: none; display: block; border-radius: 8px; }

/* Typing */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 4px 18px 18px 18px;
  align-self: flex-start;
  animation: fadeInUp 0.3s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #c0c0c0;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input */
.chat-input {
  padding: 15px 20px;
  background: #fff;
  display: flex;
  gap: 10px;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.chat-input input {
  flex: 1;
  padding: 10px 16px;
  height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  color: #1f2937;
  font-size: 14.5px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 150ms ease;
}

.chat-input input:focus { border-color: #15803d; }
.chat-input input::placeholder { color: #9ca3af; }

.chat-input button {
  padding: 14px 20px;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 150ms ease;
}

.chat-input button:hover { background: #166534; }

/* ===== BUTTONS (PRESELL STYLE: white bg, green hover) ===== */
.chat-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  flex-shrink: 0;
}

.chat-buttons:empty { display: none; }

.option-btn {
  padding: 14px 16px;
  background: #fff;
  color: #1f2937;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-btn:hover {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(34,197,94,0.08);
  transform: translateY(-1px);
}

.option-btn:active { transform: scale(0.985); background: #dcfce7; }

.opt-num {
  width: 28px;
  height: 28px;
  background: #f0fdf4;
  border: 1.5px solid #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #16a34a;
}

.opt-text {
  font-size: 14.5px;
  color: #1f2937;
  font-weight: 500;
  line-height: 1.35;
}

/* Image Buttons */
.image-buttons-container { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.image-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  cursor: pointer;
  transition: all 150ms ease;
  text-align: left;
  width: 100%;
}
.image-option-btn:hover { border-color: #22c55e; background: #f0fdf4; }
.image-option-btn:active { transform: scale(0.98); }
.image-option-btn img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.image-btn-content { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.image-btn-label { font-size: 12px; font-weight: 600; color: #1f2937; line-height: 1.3; }
.image-btn-sublabel { font-size: 11px; color: #15803d; font-weight: 500; }

/* Message Groups */
.message-group { display: flex; gap: 8px; align-items: flex-end; align-self: flex-start; max-width: 90%; flex-shrink: 0; }
.message-group-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.message-group-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-group-content { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }

/* ==================== VERIFICATION ==================== */
@keyframes vbPopIn { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes vbFadeSlide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

.verification-box { width: 100%; max-width: 340px; font-family: 'DM Sans', sans-serif; display: flex; flex-direction: column; background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; padding: 20px; align-self: flex-start; animation: fadeInUp 0.4s ease; box-shadow: 0 2px 12px rgba(0,0,0,0.04); flex-shrink: 0; }
.vb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.vb-header-left { display: flex; align-items: center; gap: 6px; }
.vb-header-title { font-size: 14px; font-weight: 700; color: #1f2937; }
.vb-header-percent { font-size: 14px; color: #15803d; font-weight: 700; background: #f0fdf4; padding: 2px 8px; border-radius: 6px; }
.vb-progress-bar { height: 5px; background: #e5e7eb; border-radius: 4px; margin-bottom: 16px; overflow: hidden; }
.vb-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #15803d, #22c55e); border-radius: 4px; transition: width 0.5s ease; }
.vb-steps { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vb-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: transparent; border-radius: 10px; border: 1px solid transparent; transition: all 0.3s ease; }
.vb-step.active { background: #fafcfb; border: 1px solid #dcfce7; }
.vb-step.done { background: #f0fdf4; border: 1px solid #dcfce7; }
.vb-step-num { width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #6b7280; flex-shrink: 0; transition: all 0.3s ease; }
.vb-step.active .vb-step-num { background: #dcfce7; color: #15803d; }
.vb-step.done .vb-step-num { background: #15803d; color: #fff; }
.vb-step-check { opacity: 0; transition: all 0.3s ease; flex-shrink: 0; }
.vb-step.done .vb-step-check { opacity: 1; animation: vbPopIn 0.3s ease; }
.vb-step-info { flex: 1; min-width: 0; }
.vb-step-label { font-size: 11px; color: #6b7280; }
.vb-step-value { font-size: 13px; color: #1f2937; font-weight: 600; opacity: 0; transition: opacity 0.3s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-step.done .vb-step-value { opacity: 1; }
.vb-loading { display: none; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 16px; padding: 40px 0; }
.vb-loading.show { display: flex; }
.vb-loading-spinner { width: 32px; height: 32px; border: 3px solid #e5e7eb; border-top-color: #15803d; border-radius: 50%; animation: spin 0.8s linear infinite; }
.vb-loading-text { color: #6b7280; font-size: 13px; font-weight: 500; }
.vb-data { display: none; flex-direction: column; flex: 1; animation: vbFadeSlide 0.4s ease; }
.vb-data.show { display: flex; }
.vb-data-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px; background: #dcfce7; border-radius: 12px; }
.vb-data-header-icon { width: 36px; height: 36px; border-radius: 50%; background: #15803d; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vb-data-header-title { font-size: 13px; font-weight: 700; color: #166534; }
.vb-data-header-subtitle { font-size: 11px; color: #22c55e; }
.vb-data-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.vb-data-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #fafcfb; border-radius: 8px; border: 1px solid #f0f0f0; }
.vb-data-item-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280; }
.vb-data-item-value { font-size: 12px; color: #1f2937; font-weight: 600; text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.vb-steps-phase { display: flex; flex-direction: column; flex: 1; }
.vb-steps-phase.vb-hide { display: none; }

/* ==================== ANALYSIS ==================== */
.analysis-box { width: 100%; max-width: 340px; background: #fafcfb; border-radius: 16px; padding: 24px; border: 1px solid #f0f0f0; align-self: flex-start; animation: fadeInUp 0.4s ease; flex-shrink: 0; }
.ab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ab-header-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.ab-header-percent { font-size: 20px; font-weight: 700; color: #15803d; }
.ab-progress-bar { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; margin-bottom: 24px; }
.ab-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #15803d, #22c55e); border-radius: 4px; transition: width 1s ease; }
.ab-steps { display: flex; flex-direction: column; gap: 6px; }
.ab-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 10px; border: 1px solid #f0f0f0; transition: all 0.3s ease; }
.ab-step.done { background: #dcfce7; border-color: #bbf7d0; }
.ab-step-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f0f0f0; color: #6b7280; font-size: 12px; font-weight: 600; transition: all 0.3s ease; flex-shrink: 0; }
.ab-step.done .ab-step-icon { background: #15803d; color: #fff; }
.ab-step-label { font-size: 13px; color: #6b7280; font-weight: 400; transition: all 0.3s ease; flex: 1; }
.ab-step.done .ab-step-label { color: #166534; font-weight: 500; }
.ab-step-check { color: #15803d; font-size: 12px; opacity: 0; transition: opacity 0.3s ease; }
.ab-step.done .ab-step-check { opacity: 1; }
.ab-spinner { width: 14px; height: 14px; border: 2px solid #6b7280; border-top-color: #15803d; border-radius: 50%; animation: spin 0.8s linear infinite; }
.ab-check-svg { width: 14px; height: 14px; }
.ab-mensagem-final { margin-top: 20px; padding: 14px; background: linear-gradient(135deg, #15803d, #22c55e); border-radius: 10px; text-align: center; color: #fff; font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(10px); transition: all 0.4s ease; }
.ab-mensagem-final.show { opacity: 1; transform: translateY(0); }

/* ==================== SLIDER ==================== */
.slider-box { width: 100%; max-width: 340px; background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; padding: 24px 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); text-align: left; align-self: flex-start; animation: fadeInUp 0.4s ease; flex-shrink: 0; }
.sb-title { font-size: 16px; font-weight: 700; color: #1f2937; margin-bottom: 2px; }
.sb-subtitulo { font-size: 13px; color: #9ca3af; margin-bottom: 20px; }
.sb-valor-destaque { text-align: center; margin-bottom: 20px; padding: 16px 0; background: #fafcfb; border-radius: 12px; border: 1px solid #f0f0f0; }
.sb-valor-prefix { font-size: 14px; font-weight: 500; color: #6b7280; margin-right: 2px; }
.sb-valor-display { font-size: 32px; font-weight: 700; color: #166534; }
.sb-slider-container { margin-bottom: 24px; }
.sb-slider { width: 100%; height: 8px; border-radius: 8px; -webkit-appearance: none; appearance: none; cursor: pointer; outline: none; background: linear-gradient(to right, #22c55e 0%, #e5e7eb 0%); }
.sb-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #22c55e; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.sb-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #22c55e; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.sb-slider:disabled { opacity: 0.6; cursor: not-allowed; }
.sb-slider-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #9ca3af; }
.sb-parcelas-titulo { font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.sb-parcelas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.sb-parcela-btn { padding: 10px 8px; background: #fff; border: 1.5px solid #e8e8e8; border-radius: 10px; font-size: 14px; font-weight: 600; color: #1f2937; cursor: pointer; transition: all 150ms ease; font-family: 'DM Sans', sans-serif; }
.sb-parcela-btn:hover { border-color: #22c55e; background: #fafcfb; }
.sb-parcela-btn.active { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.sb-parcela-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sb-info-juros { background: #fafcfb; border-radius: 12px; padding: 14px; margin-bottom: 20px; border: 1px solid #f0f0f0; }
.sb-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-align: center; }
.sb-info-item { padding: 0 10px; }
.sb-info-item:first-child { padding-left: 0; }
.sb-info-item:last-child { border-left: 1px solid #e5e7eb; padding-right: 0; }
.sb-info-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.sb-info-value { font-size: 18px; font-weight: 700; color: #1f2937; }
.sb-btn-confirmar { width: 100%; padding: 16px; background: #15803d; color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 150ms ease; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sb-btn-confirmar:hover:not(:disabled) { background: #166534; }
.sb-btn-confirmar:disabled { opacity: 0.7; cursor: not-allowed; }
.sb-btn-confirmar.hide { display: none; }
.sb-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
.sb-sucesso { background: #f0fdf4; border: 1px solid #dcfce7; color: #166534; padding: 16px; border-radius: 12px; font-weight: 600; font-size: 15px; display: none; text-align: center; }
.sb-sucesso.show { display: block; }

/* ==================== RECEIPT ==================== */
.receipt-box { position: relative; width: 100%; max-width: 340px; font-family: 'Courier New', monospace; align-self: flex-start; animation: fadeInUp 0.4s ease; flex-shrink: 0; }
.rc-recibo { background: #fff; padding: 24px 20px 30px; position: relative; border-radius: 8px 8px 0 0; }
.rc-header { border-bottom: 2px dashed #e5e7eb; padding-bottom: 16px; margin-bottom: 16px; text-align: center; }
.rc-subtitle { font-size: 10px; color: #6b7280; text-transform: uppercase; letter-spacing: 2px; }
.rc-title { font-size: 18px; font-weight: 700; color: #1f2937; margin-top: 4px; }
.rc-dots { font-size: 10px; color: #6b7280; margin-top: 4px; }
.rc-dados { margin-bottom: 16px; }
.rc-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.rc-label { font-size: 11px; color: #6b7280; }
.rc-value { font-size: 12px; font-weight: 600; color: #1f2937; text-align: right; max-width: 200px; word-break: break-word; }
.rc-linha-tracejada { border-top: 1px dashed #e5e7eb; margin: 16px 0; }
.rc-linha-dupla { border-top: 2px dashed #e5e7eb; margin: 16px 0; }
.rc-composicao-title { font-size: 10px; color: #6b7280; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.rc-item-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.rc-item-nome { font-size: 11px; color: #6b7280; }
.rc-item-valor { font-size: 11px; color: #1f2937; }
.rc-total-box { display: flex; justify-content: space-between; align-items: center; background: #fafcfb; padding: 12px; border-radius: 4px; border: 1px dashed #e5e7eb; }
.rc-total-label { font-size: 12px; font-weight: 600; color: #1f2937; }
.rc-total-value { font-size: 22px; font-weight: 700; color: #15803d; }
.rc-codigo-barras { margin-top: 20px; text-align: center; }
.rc-barras { display: flex; justify-content: center; gap: 2px; margin-bottom: 6px; }
.rc-barra { height: 30px; background: #1f2937; }
.rc-codigo-numero { font-size: 9px; color: #6b7280; letter-spacing: 2px; }
.rc-papel-rasgado { position: relative; height: 20px; overflow: hidden; }
.rc-papel-rasgado svg { display: block; }
.rc-bolinhas { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.rc-bolinhas-esq { left: -6px; }
.rc-bolinhas-dir { right: -6px; }
.rc-bolinha { width: 12px; height: 12px; border-radius: 50%; background: #fafcfb; border: 1px solid #fafcfb; }

/* Error */
.error-message { background: #ef4444 !important; color: #fff !important; }

/* PIX Checkout */
.pix-checkout-container { width: 100%; max-width: 100%; margin: 10px 0; border-radius: 12px; animation: fadeInUp 0.4s ease; height: 600px; }
.pix-checkout-container iframe { display: block; background: #fff; width: 100%; height: 100%; }

/* Date separator */
.date-sep {
  text-align: center;
  margin: 8px 0 12px;
  font-size: 11px;
  color: #b0b0b0;
  font-weight: 500;
}

/* Sender labels */
.sender {
  font-size: 11px;
  font-weight: 600;
  color: #b0b0b0;
  margin-bottom: 2px;
  padding: 0 2px;
  letter-spacing: 0.3px;
}

.bot-sender { color: #16a34a; }
.user-sender { color: #b0b0b0; text-align: right; }

/* Timestamps */
.msg-time {
  font-size: 10px;
  color: #c0c0c0;
  margin-top: 3px;
  padding: 0 2px;
}

.msg-time.right { text-align: right; }

/* User message wrap */
.msg-wrap.user-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  animation: fadeInUp 0.3s ease;
}

/* Redirect loader */
#redirect-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fafcfb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#redirect-loader.visible { opacity: 1; visibility: visible; }
#redirect-loader p { font-size: 14px; color: #6b7280; font-weight: 500; transition: opacity 0.3s; }

.ld-dots { display: flex; gap: 6px; }
.ld-dots span { width: 10px; height: 10px; background: #22c55e; border-radius: 50%; animation: ldBounce 1.2s infinite; }
.ld-dots span:nth-child(2) { animation-delay: 0.15s; }
.ld-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ldBounce { 0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; } 40% { transform: scale(1); opacity: 1; } }

/* Mobile */
@media (max-width: 768px) {
  body { padding: 0; }
  .chat-container { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; border: none; }
  .chat-messages { padding: 15px 12px 100px 12px; }
  .message { max-width: 88%; }
  .message.bot { max-width: 88%; }
  .image-option-btn img { width: 50px; height: 50px; }
  .image-btn-label { font-size: 12px; }
  .image-btn-sublabel { font-size: 10px; }
  .option-btn { padding: 12px 14px; }
}

@media (max-width: 400px) {
  .message { max-width: 92%; }
  .option-btn { padding: 11px 12px; gap: 10px; }
  .opt-num { width: 24px; height: 24px; font-size: 11px; }
  .opt-text { font-size: 13px; }
}
