/* =============================================================
   ns-chatbot.css — NuestroSí chat widget "Nova"
   Palette: #1d1b1a dark · #7a5642 coral · #fef8f5 cream
   ============================================================= */

/* ── FAB button ───────────────────────────────────────────── */
#ns-cb-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1d1b1a;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(29,27,26,.35);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  outline: none;
}
#ns-cb-fab:hover {
  background: #7a5642;
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(122,86,66,.4);
}
#ns-cb-fab:active { transform: scale(.96); }
#ns-cb-fab .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 1;
  transition: transform .2s ease;
}
#ns-cb-fab.is-active .material-symbols-outlined {
  transform: rotate(0deg);
}

/* Notification badge */
.ns-cb-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #7a5642;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* ── Chat panel ───────────────────────────────────────────── */
#ns-cb-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9000;
  width: 360px;
  max-height: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(29,27,26,.2), 0 2px 8px rgba(29,27,26,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
}
#ns-cb-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ───────────────────────────────────────────────── */
.ns-cb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1d1b1a;
  color: #fff;
  padding: 14px 16px;
  flex-shrink: 0;
}
.ns-cb-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ns-cb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7a5642;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Manrope', system-ui, sans-serif;
  flex-shrink: 0;
}
.ns-cb-name {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.ns-cb-status {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 1px;
}
.ns-cb-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.ns-cb-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.ns-cb-close .material-symbols-outlined { font-size: 20px; }

/* ── Messages area ────────────────────────────────────────── */
.ns-cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.ns-cb-messages::-webkit-scrollbar { width: 4px; }
.ns-cb-messages::-webkit-scrollbar-track { background: transparent; }
.ns-cb-messages::-webkit-scrollbar-thumb { background: #cec5ba; border-radius: 2px; }

/* Message rows */
.ns-cb-msg {
  display: flex;
  animation: cbMsgIn .22s ease;
}
.ns-cb-msg--bot { justify-content: flex-start; }
.ns-cb-msg--user { justify-content: flex-end; }
.ns-cb-msg--card { justify-content: stretch; }

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

/* Bubbles */
.ns-cb-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.52;
}
.ns-cb-msg--bot .ns-cb-bubble {
  background: #fef8f5;
  color: #1d1b1a;
  border: 1px solid #e8e2db;
  border-bottom-left-radius: 4px;
}
.ns-cb-msg--user .ns-cb-bubble {
  background: #2c2825;
  color: #f5f0eb;
  border-bottom-right-radius: 4px;
}

/* ── Option buttons ───────────────────────────────────────── */
.ns-cb-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px 2px;
  animation: cbMsgIn .22s ease;
}
.ns-cb-option-btn {
  padding: 7px 14px;
  background: #fff;
  color: #1d1b1a;
  border: 1.5px solid #cec5ba;
  border-radius: 100px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  white-space: nowrap;
}
.ns-cb-option-btn:hover:not(:disabled) {
  border-color: #685d4a;
  background: #fef8f5;
}
.ns-cb-option-btn.selected {
  background: #1d1b1a;
  border-color: #1d1b1a;
  color: #fff;
}
.ns-cb-option-btn:disabled {
  opacity: .45;
  cursor: default;
}
.ns-cb-continue-btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 16px;
  background: #685d4a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.ns-cb-continue-btn:hover:not(:disabled) { background: #7a5642; }
.ns-cb-continue-btn:disabled { opacity: .45; cursor: default; }

/* ── Recommendation card ──────────────────────────────────── */
.ns-cb-rec-card {
  background: #fef8f5;
  border: 1.5px solid #cec5ba;
  border-radius: 12px;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  animation: cbMsgIn .22s ease;
}
.ns-cb-rec-badge {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a5642;
  background: rgba(122,86,66,.1);
  border-radius: 100px;
  padding: 3px 10px;
  width: fit-content;
}
.ns-cb-rec-name {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: #1d1b1a;
  margin-top: 2px;
}
.ns-cb-rec-price {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1d1b1a;
}
.ns-cb-rec-validity {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  color: #7a5642;
  font-weight: 600;
  margin-top: -4px;
}
.ns-cb-rec-features {
  list-style: none;
  padding: 0;
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #e8e2db;
  padding-top: 8px;
}
.ns-cb-rec-features li {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  color: #4b463d;
  padding-left: 14px;
  position: relative;
}
.ns-cb-rec-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #685d4a;
  font-weight: 700;
  font-size: 11px;
}
.ns-cb-rec-extras-title {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #7a5642;
  margin-top: 4px;
}
.ns-cb-rec-extra {
  display: flex;
  justify-content: space-between;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  color: #4b463d;
  padding: 3px 0;
  border-bottom: 1px solid #e8e2db;
}
.ns-cb-rec-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid #1d1b1a;
  padding-top: 8px;
  margin-top: 4px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #4b463d;
}
.ns-cb-rec-total-price {
  font-size: 16px;
  font-weight: 700;
  color: #1d1b1a;
}
.ns-cb-cta-btn {
  width: 100%;
  padding: 11px 16px;
  background: #1d1b1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s, opacity .15s;
}
.ns-cb-cta-btn:hover { background: #685d4a; }
.ns-cb-see-plans {
  display: block;
  text-align: center;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #7a5642;
  text-decoration: none;
  margin-top: 2px;
  transition: opacity .15s;
}
.ns-cb-see-plans:hover { opacity: .75; text-decoration: underline; }

/* ── Footer ───────────────────────────────────────────────── */
.ns-cb-footer {
  padding: 8px 14px 10px;
  border-top: 1px solid #f0ebe5;
  flex-shrink: 0;
}
.ns-cb-footer-note {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 10px;
  color: #a89078;
  text-align: center;
  line-height: 1.4;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  #ns-cb-fab  { bottom: 16px; right: 16px; }
  #ns-cb-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  #ns-cb-panel.is-open { transform: translateY(0); }
}
