:root {
  --mita-navy: #0B1F3A;
  --mita-navy-soft: #1B3A6B;
  --mita-green: #10B981;
  --mita-green-soft: #34D399;
  --mita-surface: rgba(255,255,255,0.86);
  --mita-border: rgba(11,31,58,0.12);
  --mita-shadow: 0 26px 80px rgba(11,31,58,0.2);
  --mita-shadow-mobile: 0 18px 60px rgba(11,31,58,0.28);
}

.mita-chatbot-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  font-family: 'Inter', sans-serif;
}

.mita-chatbot-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--mita-green) 0%, var(--mita-green-soft) 100%);
  box-shadow: 0 16px 40px rgba(16,185,129,0.35);
  cursor: pointer;
  transform: scale(0.7);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  animation: mita-float-launcher 3.2s ease-in-out infinite;
}

.mita-chatbot-launcher.is-visible {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.mita-chatbot-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 56px rgba(16,185,129,0.46);
}

.mita-chatbot-launcher-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.mita-chatbot-launcher-icon svg {
  width: 22px;
  height: 22px;
}

.mita-chatbot-launcher-label {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mita-chatbot-unread {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: white;
  color: var(--mita-green);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(11,31,58,0.18);
}

.mita-chatbot-window {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(50vw, 520px);
  height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(248,249,252,0.88));
  box-shadow: var(--mita-shadow);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(24px);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 2100;
}

.mita-chatbot-window.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.mita-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--mita-green) 0%, var(--mita-green-soft) 100%);
  color: white;
}

.mita-chatbot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mita-chatbot-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(11,31,58,0.16);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mita-chatbot-brand h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.mita-chatbot-brand p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
}

.mita-chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mita-chatbot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mita-chatbot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1fae5;
  box-shadow: 0 0 0 0 rgba(209,250,229,0.8);
  animation: mita-pulse-dot 1.6s infinite;
}

.mita-chatbot-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mita-chatbot-close svg {
  width: 18px;
  height: 18px;
}

.mita-chatbot-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(248,250,252,0.75), rgba(255,255,255,0.96));
}

.mita-chatbot-message {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(10px);
  animation: mita-fade-slide 0.35s ease forwards;
}

.mita-chatbot-message.is-user {
  justify-content: flex-end;
}

.mita-chatbot-message.is-user .mita-chatbot-bubble {
  background: linear-gradient(135deg, var(--mita-navy) 0%, var(--mita-navy-soft) 100%);
  color: white;
  border-top-right-radius: 8px;
}

.mita-chatbot-bubble {
  max-width: min(82%, 320px);
  padding: 12px 14px;
  border-radius: 18px 18px 18px 8px;
  background: white;
  box-shadow: 0 10px 26px rgba(11,31,58,0.08);
  color: var(--mita-navy);
  font-size: 0.95rem;
  line-height: 1.55;
  border: 1px solid rgba(11,31,58,0.06);
}

.mita-chatbot-message.is-user .mita-chatbot-bubble {
  border-top-left-radius: 18px;
  border-top-right-radius: 8px;
}

.mita-chatbot-message.is-bot .mita-chatbot-bubble {
  border-top-left-radius: 8px;
}

.mita-chatbot-avatar-bot {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--mita-green), var(--mita-green-soft));
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(16,185,129,0.24);
}

.mita-chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
}

.mita-chatbot-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mita-green);
  animation: mita-bounce-dot 1.2s infinite ease-in-out;
}

.mita-chatbot-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.mita-chatbot-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.mita-chatbot-step-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.14);
}

.mita-chatbot-step-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--mita-navy);
  font-weight: 800;
}

.mita-chatbot-step-card p {
  margin: 0 0 10px;
  color: var(--mita-navy-soft);
  font-size: 0.88rem;
}

.mita-chatbot-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mita-chatbot-option-btn,
.mita-chatbot-next-btn,
.mita-chatbot-submit-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 13px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.2));
  color: var(--mita-green);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mita-chatbot-option-btn:hover,
.mita-chatbot-next-btn:hover,
.mita-chatbot-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(16,185,129,0.16);
}

.mita-chatbot-option-btn.is-selected {
  background: linear-gradient(135deg, var(--mita-green), var(--mita-green-soft));
  color: white;
}

.mita-chatbot-footer {
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(11,31,58,0.06);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
}

.mita-chatbot-input-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mita-chatbot-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mita-chatbot-input-row input,
.mita-chatbot-input-row textarea {
  flex: 1;
  width: 100%;
  border: 1px solid rgba(11,31,58,0.12);
  border-radius: 16px;
  padding: 12px 14px;
  background: white;
  color: var(--mita-navy);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(11,31,58,0.04);
}

.mita-chatbot-input-row textarea {
  min-height: 92px;
  resize: vertical;
}

.mita-chatbot-input-row input:focus,
.mita-chatbot-input-row textarea:focus {
  border-color: rgba(16,185,129,0.48);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.mita-chatbot-next-btn,
.mita-chatbot-submit-btn {
  flex-shrink: 0;
  min-width: 92px;
  background: linear-gradient(135deg, var(--mita-green), var(--mita-green-soft));
  color: white;
}

.mita-chatbot-summary {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(255,255,255,0.9));
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--mita-navy);
}

.mita-chatbot-summary h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.mita-chatbot-summary p {
  margin: 0 0 8px;
  color: var(--mita-navy-soft);
  line-height: 1.55;
}

.mita-chatbot-summary .mita-chatbot-summary-list {
  margin: 10px 0 0;
  padding-left: 16px;
  color: var(--mita-navy-soft);
}

.mita-chatbot-summary .mita-chatbot-summary-list li {
  margin-bottom: 6px;
}

.mita-chatbot-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  border: none;
  padding: 14px 16px;
  border-radius: 16px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--mita-green), var(--mita-green-soft));
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 12px 26px rgba(16,185,129,0.24);
}

.mita-chatbot-whatsapp-btn:hover {
  transform: translateY(-2px);
}

.mita-chatbot-cta-card {
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(255,255,255,0.96));
  border: 1px solid rgba(16,185,129,0.18);
  color: var(--mita-navy);
}

.mita-chatbot-cta-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.mita-chatbot-cta-card p {
  margin: 0 0 10px;
  color: var(--mita-navy-soft);
  line-height: 1.6;
}

.mita-chatbot-office-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(11,31,58,0.08);
  background: rgba(255,255,255,0.76);
  margin-bottom: 12px;
}

.mita-chatbot-office-card h5 {
  margin: 0 0 6px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--mita-navy);
}

.mita-chatbot-office-card p {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.mita-chatbot-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mita-chatbot-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mita-green), var(--mita-green-soft));
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(16,185,129,0.2);
}

.mita-chatbot-action-btn-secondary {
  background: linear-gradient(135deg, var(--mita-navy), var(--mita-navy-soft));
  box-shadow: 0 10px 20px rgba(11,31,58,0.16);
}

.mita-chatbot-action-btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #1EA952);
}

@keyframes mita-float-launcher {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes mita-fade-slide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mita-bounce-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@keyframes mita-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(209,250,229,0.8); }
  70% { box-shadow: 0 0 0 8px rgba(209,250,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(209,250,229,0); }
}

@media (max-width: 640px) {
  .mita-chatbot-widget {
    right: 10px;
    bottom: 10px;
    left: auto;
    width: auto;
    max-width: none;
    margin: 0;
  }

  .mita-chatbot-window {
    width: min(92vw, 360px);
    height: min(82vh, 575px);
    max-width: 360px;
    max-height: 82vh;
    border-radius: 22px;
    box-shadow: var(--mita-shadow-mobile);
  }

  .mita-chatbot-launcher {
    width: auto;
    justify-content: center;
    padding: 12px 14px;
  }

  .mita-chatbot-header {
    padding: 14px 14px;
  }

  .mita-chatbot-body {
    padding: 14px;
  }

  .mita-chatbot-footer {
    padding: 10px 10px 12px;
  }

  .mita-chatbot-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mita-chatbot-next-btn,
  .mita-chatbot-submit-btn {
    width: 100%;
    min-width: auto;
  }
}
