/* ================================================================
   SANTVAL LODGE — Chatbot Val
   ================================================================ */

.cb-float {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
}

/* ── Burbuja de bienvenida ──────────────────────────────────── */
.cb-bubble-label {
  background: #2f4530;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  padding: .45rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(47,69,48,.3);
  animation: cb-slidein .5s ease;
  transition: opacity .4s;
}
@keyframes cb-slidein {
  from { opacity:0; transform: translateX(-10px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ── Botón toggle ───────────────────────────────────────────── */
.cb-toggle-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #2f4530;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 18px rgba(47,69,48,.35);
  transition: background .2s, transform .2s;
}
.cb-toggle-btn:hover { background: #b06432; transform: scale(1.05); }

/* ── Panel ──────────────────────────────────────────────────── */
.cb-panel {
  position: fixed;
  bottom: 5.5rem;
  left: 2rem;
  width: 340px;
  max-height: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.93) translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s;
  z-index: 8999;
}
.cb-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ─────────────────────────────────────────────────── */
.cb-header {
  background: #2f4530;
  padding: .9rem 1.1rem;
  display: flex; align-items: center; gap: .7rem;
  flex-shrink: 0;
}
.cb-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(175,200,49,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #afc831; flex-shrink: 0;
}
.cb-header-info { flex: 1; }
.cb-name {
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem; font-weight: 600; color: #fff;
  line-height: 1.2;
}
.cb-status {
  font-family: 'Montserrat', sans-serif;
  font-size: .68rem; color: rgba(255,255,255,.6);
}
.cb-close {
  background: none; border: none;
  color: rgba(255,255,255,.6); cursor: pointer;
  font-size: .9rem; padding: .25rem;
  transition: color .2s; flex-shrink: 0;
}
.cb-close:hover { color: #fff; }

/* ── Mensajes ───────────────────────────────────────────────── */
.cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: .9rem;
  display: flex; flex-direction: column; gap: .6rem;
  background: #f5f7f2;
  scroll-behavior: smooth;
}
.cb-messages::-webkit-scrollbar { width: 4px; }
.cb-messages::-webkit-scrollbar-thumb { background: rgba(47,69,48,.2); border-radius: 2px; }

.cb-msg { display: flex; }
.cb-msg--bot  { justify-content: flex-start; }
.cb-msg--user { justify-content: flex-end; }

.cb-bubble {
  max-width: 82%;
  padding: .6rem .85rem;
  border-radius: 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem; line-height: 1.55;
}
.cb-msg--bot .cb-bubble {
  background: #fff;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.cb-msg--user .cb-bubble {
  background: #2f4530;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ── Typing indicator ───────────────────────────────────────── */
.cb-dots { display: flex; gap: 4px; align-items: center; height: 14px; }
.cb-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(26,26,26,.3);
  animation: cb-bounce .9s infinite ease-in-out;
}
.cb-dots span:nth-child(2) { animation-delay: .15s; }
.cb-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%          { transform: translateY(-5px); }
}

/* ── Quick replies ──────────────────────────────────────────── */
.cb-quick-replies {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .4rem .9rem .7rem;
  background: #f5f7f2;
  flex-shrink: 0;
}
.cb-qr-btn {
  padding: .4rem .8rem;
  border: 1.5px solid #2f4530; border-radius: 20px;
  background: #fff; color: #2f4530;
  font-family: 'Montserrat', sans-serif;
  font-size: .74rem; font-weight: 600;
  cursor: pointer; transition: background .2s, color .2s;
}
.cb-qr-btn:hover { background: #2f4530; color: #fff; }
.cb-qr-btn--primary {
  background: #b06432; border-color: #b06432; color: #fff;
}
.cb-qr-btn--primary:hover { background: #7d9729; border-color: #7d9729; }
.cb-qr-btn--danger  {
  border-color: #d15468; color: #d15468;
}
.cb-qr-btn--danger:hover  { background: #d15468; color: #fff; }

/* ── Input area ─────────────────────────────────────────────── */
.cb-input-area {
  display: flex; gap: .5rem;
  padding: .65rem .9rem;
  border-top: 1px solid rgba(133,185,117,.18);
  background: #fff;
  flex-shrink: 0;
}
.cb-input {
  flex: 1;
  border: 1.5px solid rgba(133,185,117,.35); border-radius: 20px;
  padding: .45rem .85rem;
  font-family: 'Montserrat', sans-serif; font-size: .8rem; color: #1a1a1a;
  outline: none; transition: border-color .2s;
  background: #fff;
}
.cb-input:focus { border-color: #2f4530; }
.cb-input::placeholder { color: rgba(26,26,26,.35); }
.cb-input:disabled { background: rgba(0,0,0,.03); cursor: not-allowed; }

.cb-send-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: #2f4530; color: #fff; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0; transition: background .2s;
}
.cb-send-btn:hover { background: #b06432; }
.cb-send-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Date picker inline ─────────────────────────────────────── */
.cb-date-input {
  width: 100%; padding: .45rem .7rem;
  border: 1.5px solid rgba(133,185,117,.35); border-radius: 8px;
  font-family: 'Montserrat', sans-serif; font-size: .8rem; color: #1a1a1a;
  background: #fff; box-sizing: border-box; margin-top: .4rem;
}
.cb-date-input:focus { outline: none; border-color: #2f4530; }

/* ── Room cards ─────────────────────────────────────────────── */
.cb-room-card {
  border: 1.5px solid rgba(133,185,117,.3);
  border-radius: 10px; overflow: hidden; background: #fff;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.cb-room-card:hover {
  border-color: #2f4530;
  box-shadow: 0 3px 12px rgba(47,69,48,.12);
}
.cb-room-img { height: 80px; overflow: hidden; }
.cb-room-img img { width: 100%; height: 100%; object-fit: cover; }
.cb-room-info { padding: .5rem .7rem .3rem; }
.cb-room-type {
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: #afc831; margin-bottom: .1rem;
}
.cb-room-name {
  font-family: 'Montserrat', sans-serif;
  font-size: .8rem; font-weight: 600; color: #2f4530; margin-bottom: .2rem;
}
.cb-room-price {
  font-family: 'Montserrat', sans-serif;
  font-size: .74rem; color: rgba(26,26,26,.55);
}
.cb-room-price strong { color: #b06432; }
.cb-room-select-btn {
  display: block; width: 100%;
  padding: .4rem;
  background: #2f4530; color: #fff; border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: background .2s;
}
.cb-room-select-btn:hover { background: #b06432; }

/* ── Confirmation box ───────────────────────────────────────── */
.cb-confirm-box {
  background: rgba(175,200,49,.07);
  border: 1.5px solid rgba(133,185,117,.35);
  border-radius: 8px; padding: .6rem .75rem; margin-top: .5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .76rem; color: #1a1a1a; line-height: 1.8;
}
.cb-confirm-ref {
  display: inline-block;
  background: #2f4530; color: #afc831;
  font-family: 'Montserrat', sans-serif;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  padding: .2rem .6rem; border-radius: 4px;
  margin: .25rem 0; vertical-align: middle;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cb-panel {
    left: .75rem; right: .75rem;
    width: auto; bottom: 4.75rem;
    max-height: 70vh;
  }
  .cb-float { left: .75rem; bottom: 1.25rem; }
}
