/* ==========================================================================
   Ani AI Assistant — 2CLICK AMC V20 Light Green & Warm White Interface
   Matches the Global 2CLICK Design System (#176B4D, #FFFFFF, #FAFAF7, #E8F2EC)
   ========================================================================== */
#ani-widget-root {
  font-family: var(--font-sans, 'Plus Jakarta Sans', 'Inter', 'Manrope', 'Noto Sans Devanagari', 'CareHindi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  --ani-primary: #176B4D;
  --ani-primary-dark: #104C38;
  --ani-secondary: #2E8B64;
  --ani-bg-soft: #E8F2EC;
  --ani-bg-mint: #F2F7F3;
  --ani-bg-warm: #FAFAF7;
  --ani-surface: #FFFFFF;
  --ani-text-primary: #24332B;
  --ani-text-secondary: #68756D;
  --ani-border: #E2E8E3;
  --ani-success: #237A4B;
  --ani-warning: #B7791F;
  --ani-error: #C0392B;
}

/* Compact Floating Launcher */
.ani-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  background: var(--ani-primary);
  color: #FFFFFF;
  border: 1.5px solid var(--ani-primary-dark);
  border-radius: 9999px;
  box-shadow: 0 6px 20px rgba(16, 76, 56, 0.24);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}

.ani-launcher:hover {
  background: var(--ani-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(16, 76, 56, 0.3);
}

.ani-launcher:focus-visible {
  outline: 2.5px solid var(--ani-primary);
  outline-offset: 2px;
}

.ani-launcher-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.ani-avatar-svg {
  width: 20px;
  height: 20px;
}

.ani-launcher-online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background-color: #34D399;
  border: 2px solid var(--ani-primary);
  border-radius: 9999px;
}

.ani-launcher-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.ani-launcher-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
}

.ani-launcher-sub {
  font-size: 0.6875rem;
  color: #E8F2EC;
  font-weight: 500;
  line-height: 1.2;
}

/* Slide-Up Chat Panel */
.ani-panel {
  position: fixed;
  bottom: 82px;
  right: 22px;
  z-index: 95;
  width: 410px;
  max-width: calc(100vw - 28px);
  height: 610px;
  max-height: calc(100vh - 104px);
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(16, 76, 56, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ani-panel[hidden] {
  display: none !important;
}

/* Header */
.ani-header {
  padding: 12px 14px;
  background: var(--ani-primary);
  color: #FFFFFF;
  border-bottom: 1px solid var(--ani-primary-dark);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ani-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ani-brand-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

#ani-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ani-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

#ani-header-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.ani-verified-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.ani-header-status {
  font-size: 0.72rem;
  color: #E8F2EC;
  display: block;
}

.ani-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ani-lang-select {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  min-height: 30px;
  width: auto;
}

.ani-lang-select option {
  color: #24332B;
  background: #FFFFFF;
}

.ani-icon-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
}

.ani-icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* Quick Actions Bar in Header */
.ani-quick-bar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.ani-quick-bar button {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 26px;
}

.ani-quick-bar button:hover {
  background: #FFFFFF;
  color: var(--ani-primary);
}

/* Messages Stream */
.ani-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--ani-bg-warm);
}

.ani-bubble {
  display: flex;
  gap: 8px;
  max-width: 94%;
}

.ani-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ani-bubble.bot {
  align-self: flex-start;
  width: 100%;
}

.ani-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ani-bg-soft);
  color: var(--ani-primary);
  border: 1px solid var(--ani-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.ani-bubble-content {
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 0.84375rem;
  line-height: 1.5;
  color: var(--ani-text-primary);
  word-break: break-word;
  flex: 1;
}

.ani-bubble.bot .ani-bubble-content {
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(16, 76, 56, 0.05);
}

.ani-bubble.user .ani-bubble-content {
  background: var(--ani-primary);
  color: #FFFFFF;
  border: 0;
  border-top-right-radius: 4px;
  font-weight: 500;
  flex: initial;
}

/* Quick Action Chips inside Chat */
.ani-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ani-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  min-height: 30px;
  border-radius: 999px;
  background: var(--ani-bg-soft);
  color: var(--ani-primary);
  border: 1px solid rgba(23, 107, 77, 0.25);
  cursor: pointer;
}

.ani-chip:hover {
  background: var(--ani-primary);
  color: #FFFFFF;
}

/* Interactive Cards & Modules inside Chat */
.ani-module-card {
  margin-top: 10px;
  padding: 12px;
  background: var(--ani-bg-mint);
  border: 1px solid var(--ani-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ani-module-title {
  font-size: 0.78125rem;
  font-weight: 700;
  color: var(--ani-primary-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ani-badge-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ani-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
}

.ani-profile-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.ani-profile-pill {
  padding: 6px 8px;
  min-height: 32px;
  border-radius: 8px;
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  color: var(--ani-text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.ani-profile-pill:hover,
.ani-profile-pill.active {
  background: var(--ani-primary);
  color: #FFFFFF;
  border-color: var(--ani-primary);
}

.ani-pkg-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  font-size: 0.75rem;
  color: var(--ani-text-primary);
}

.ani-pkg-item-row.selected {
  background: var(--ani-bg-soft);
  border-color: var(--ani-primary);
}

.ani-rec-card {
  padding: 8px 10px;
  border-radius: 8px;
  background: #FDF6EA;
  border: 1px solid #F3D9A4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ani-rec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6B440B;
}

.ani-rec-desc {
  font-size: 0.72rem;
  color: var(--ani-text-secondary);
}

.ani-inline-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.ani-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.ani-inline-input {
  width: 100%;
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 36px;
  color: var(--ani-text-primary);
  font-size: 0.8125rem;
}

.ani-cta-primary {
  width: 100%;
  padding: 9px 12px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--ani-primary);
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-align: center;
}

.ani-cta-primary:hover {
  background: var(--ani-primary-dark);
}

.ani-solution-box {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--ani-surface);
  border: 1px solid var(--ani-border);
  font-size: 0.78125rem;
  color: var(--ani-text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ani-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ani-secondary);
  color: #FFFFFF;
  font-size: 0.78125rem;
  font-weight: 600;
  text-decoration: none;
}

/* Composer & Footer */
.ani-composer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--ani-surface);
  border-top: 1px solid var(--ani-border);
}

.ani-input {
  flex: 1;
  background: var(--ani-bg-warm);
  border: 1px solid var(--ani-border);
  border-radius: 8px;
  color: var(--ani-text-primary);
  font-size: 0.84375rem;
  padding: 8px 12px;
  min-height: 40px;
}

.ani-send-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 8px;
  background: var(--ani-primary);
  border: 0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ani-send-btn:hover {
  background: var(--ani-primary-dark);
}

.ani-footer {
  padding: 6px 12px 8px;
  background: var(--ani-bg-mint);
  border-top: 1px solid var(--ani-border);
  font-size: 0.6875rem;
  color: var(--ani-text-secondary);
  text-align: center;
}

/* Mobile Responsive — Never blocks booking button or bottom nav */
@media (max-width: 960px) {
  .ani-launcher {
    bottom: 74px;
    right: 14px;
    padding: 7px 13px 7px 8px;
  }
  .ani-launcher-avatar {
    width: 32px;
    height: 32px;
  }
  .ani-launcher-sub {
    display: none;
  }
  .ani-panel {
    bottom: 70px;
    right: 8px;
    left: 8px;
    width: auto;
    height: calc(100dvh - 86px);
    max-height: calc(100dvh - 86px);
    border-radius: 16px;
  }
}


.ani-verified-badge {
  white-space: nowrap;
}
.ani-quick-bar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ani-quick-bar::-webkit-scrollbar {
  display: none;
}
@media (max-width: 480px) {
  .ani-verified-badge {
    display: none;
  }
  .ani-header-status {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
  .ani-launcher {
    bottom: 70px;
    right: 12px;
    padding: 6px 12px 6px 7px;
    gap: 7px;
  }
  .ani-launcher-avatar {
    width: 28px;
    height: 28px;
  }
  .ani-launcher-title {
    font-size: 0.78rem;
  }
}


.ani-brand-identity {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.ani-brand-identity > div:last-child {
  min-width: 0;
  overflow: hidden;
}
.ani-header-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ani-header-controls {
  flex-shrink: 0;
}
