/* ================================================================
   planificador.css — v6
   ================================================================ */

/* ── Reset mínimo ── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

/* ── Hero — ocupa todo desde el header hasta el footer ── */
.hero-wrap {
  position: relative;
  height: calc(100vh - var(--header-h, 0px) - var(--footer-h, 0px));
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.hero-img {
  position: absolute;
  inset: 0;
  background-image: url('/images/Algarinejo.jpg');
  background-size: cover;
  background-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(20,12,6,.72) 0%,
    rgba(50,63,96,.52) 45%,
    rgba(207,82,69,.38) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 740px;
  padding: 0 1.5rem;
}
.hero-eyebrow {
  font-family: 'Amiri', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(255,255,255,.58);
  margin: 0 0 12px;
  letter-spacing: .06em;
}
.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  margin: 0 0 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,.28);
  font-family: 'Nunito Sans', sans-serif;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-em {
  font-family: 'Amiri', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #ffc4bb;
  white-space: nowrap;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.72);
  margin: 0 0 2rem;
  line-height: 1.6;
  font-family: 'Nunito Sans', sans-serif;
  overflow-wrap: break-word;
}

/* ── Buscador ── */
.search-bar {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 14px;
}
.search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.search-ico {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: #aaa;
  pointer-events: none;
  flex-shrink: 0;
}
.search-field {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  border: none;
  border-radius: 13px;
  font-size: 14px;
  font-family: 'Nunito Sans', sans-serif;
  color: #1e1e1e;
  background: white;
  outline: none;
  box-shadow: 0 6px 28px rgba(0,0,0,.22);
  transition: box-shadow .2s;
}
.search-field:focus {
  box-shadow: 0 6px 28px rgba(0,0,0,.22), 0 0 0 3px rgba(207,82,69,.28);
}
.search-field::placeholder { color: #bbb; }

.btn-search {
  height: 54px;
  padding: 0 22px;
  background: white;
  color: #323f60;
  border: none;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Nunito Sans', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(0,0,0,.18);
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-search:hover { background: #f0ece5; transform: translateY(-1px); }

/* Resultados */
.search-results {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  max-height: 460px;
  overflow-y: auto;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 2px; }
.result-card {
  background: white;
  border-radius: 10px;
  padding: 11px 16px;
  margin-bottom: 6px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 14px rgba(0,0,0,.13);
  transition: transform .15s, box-shadow .15s;
}
.result-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.result-type {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #cf5245;
  background: #fdf5f4;
  padding: 3px 7px;
  border-radius: 99px;
  white-space: nowrap;
  font-family: 'Nunito Sans', sans-serif;
  flex-shrink: 0;
}
.result-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e1e1e;
  font-family: 'Nunito Sans', sans-serif;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-arrow { color: #aaa; flex-shrink: 0; font-size: 13px; }
.search-msg {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-family: 'Nunito Sans', sans-serif;
  padding: 8px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: rgba(255,255,255,.85);
  border-radius: 50%;
  animation: search-spin .75s linear infinite;
  flex-shrink: 0;
}
@keyframes search-spin {
  to { transform: rotate(360deg); }
}
.btn-search:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
.search-ai-reply {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 8px;
  text-align: left;
}
.search-ai-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffc4bb;
  margin: 0 0 6px;
  font-family: 'Nunito Sans', sans-serif;
}
.search-ai-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,.92);
  margin: 0;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Botón planificador ── */
.btn-planner {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #cf5245;
  color: white;
  border: none;
  border-radius: 13px;
  padding: 0 28px;
  height: 54px;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Nunito Sans', sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(207,82,69,.44);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-planner:hover {
  background: #a8392e;
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(207,82,69,.52);
}
.btn-planner:focus-visible { outline: 3px solid white; outline-offset: 3px; }

/* ── Chips de tema en el hero ── */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.hero-chip {
  background: rgba(255,255,255,0.13);
  border: 1.5px solid rgba(255,255,255,0.48);
  color: white;
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 13px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .18s, border-color .18s, transform .15s;
  white-space: nowrap;
  line-height: 1.3;
}
.hero-chip:hover {
  background: rgba(255,255,255,0.26);
  border-color: rgba(255,255,255,0.85);
  transform: translateY(-1px);
}
.hero-chip:focus-visible { outline: 2px solid white; outline-offset: 3px; }

/* ── MODAL planificador ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  animation: fadeIn .2s ease;
}
.modal-overlay[hidden] { display: none !important; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-box {
  background: white;
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  animation: slideUp .25s ease;
}
.modal-header     { grid-column: 1 / -1; grid-row: 1; }
.modal-prog       { grid-column: 1 / -1; grid-row: 2; }
.modal-msgs       { grid-column: 1; grid-row: 3; min-height: 0; max-height: none; flex: none; border-right: 1px solid #f0ece5; }
.modal-typing     { grid-column: 1; grid-row: 4; border-right: 1px solid #f0ece5; }
.modal-input-zone { grid-column: 1; grid-row: 5; border-right: 1px solid #f0ece5; }
.modal-chips-sidebar { grid-column: 2; grid-row: 3 / 6; }
@keyframes slideUp { from{transform:translateY(28px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-header {
  background: #323f60;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-hinfo { display: flex; align-items: center; gap: 12px; }
.modal-av {
  width: 42px; height: 42px; border-radius: 10px;
  background: #cf5245; display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.modal-hname { font-size: 14px; font-weight: 800; color: white; margin: 0; font-family: 'Nunito Sans', sans-serif; }
.modal-hsub { font-family: 'Amiri', serif; font-style: italic; font-size: 12px; color: rgba(255,255,255,.5); margin: 0; }
.modal-header-btns { display: flex; align-items: center; gap: 6px; }
.modal-ctrl {
  background: rgba(255,255,255,.1); border: none; border-radius: 8px;
  color: rgba(255,255,255,.7); cursor: pointer; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.modal-ctrl:hover { background: rgba(255,255,255,.2); color: white; }

/* Progress bar modal */
.modal-prog {
  padding: 10px 20px;
  border-bottom: 1px solid #f0ece5;
  flex-shrink: 0;
  background: white;
}
.mp-track { display: flex; align-items: center; }
.mp-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: #aaa;
  font-family: 'Nunito Sans', sans-serif; white-space: nowrap;
  transition: all .3s;
}
.mp-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: #e2ddd6; color: #aaa;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0; transition: all .3s;
}
.mp-step.done { color: #596460; } .mp-step.done .mp-num { background: #596460; color: white; }
.mp-step.active { color: #cf5245; } .mp-step.active .mp-num { background: #cf5245; color: white; }
.mp-sep { flex: 1; height: 1px; background: #e2ddd6; min-width: 6px; }
.mp-label { display: none; }
@media(min-width:500px){ .mp-label { display: inline; } }

/* Mensajes modal */
.modal-msgs {
  flex: 1; padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 13px;
  min-height: 0; max-height: none;
  background: #faf8f5;
  scroll-behavior: smooth;
}
.modal-msgs::-webkit-scrollbar { width: 4px; }
.modal-msgs::-webkit-scrollbar-thumb { background: #e2ddd6; border-radius: 2px; }

.modal-typing { display: none; gap: 10px; align-items: center; padding: 0 18px 10px; }
.modal-typing.visible { display: flex; }

.modal-input-zone { border-top: 1px solid #e2ddd6; padding: 11px 13px; flex-shrink: 0; }
.modal-input-row { display: flex; gap: 9px; align-items: flex-end; }
.modal-textarea {
  flex: 1; border: 1.5px solid #e2ddd6; border-radius: 12px;
  padding: 10px 13px; font-size: 14px; font-family: 'Nunito Sans', sans-serif;
  color: #1e1e1e; resize: none; min-height: 44px; max-height: 100px;
  outline: none; transition: border-color .2s; background: #faf8f5; line-height: 1.5;
}
.modal-textarea:focus { border-color: #cf5245; background: white; }
.modal-textarea::placeholder { color: #bbb; }
.modal-btn-send {
  width: 44px; height: 44px; border-radius: 12px; background: #cf5245;
  border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s, transform .15s; flex-shrink: 0;
}
.modal-btn-send:hover { background: #a8392e; transform: scale(1.06); }
.modal-btn-send:disabled { background: #e2ddd6; cursor: not-allowed; transform: none; }

/* ── Chat flotante ── */
.fc-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Botón burbuja de chat — 72 × 72 ── */
.fc-btn {
  width: 72px;
  height: 72px;
  border-radius: 50% 50% 0% 50%;
  background: #323f60;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 24px rgba(50,63,96,.45);
  transition: background .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: visible;
}
.fc-btn-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.fc-btn:hover {
  background: #253050;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(50,63,96,.55);
}

/* Badge completamente eliminado */
.fc-badge { display: none !important; }

/* ── Panel del chat flotante ── */
.fc-panel {
  background: white;
  border-radius: 16px;
  width: 360px;
  position: fixed;
  bottom: 110px;
  right: 24px;
  top: auto;
  max-height: calc(100dvh - 126px);
  height: auto;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
  overflow: hidden;
  animation: slideUp .22s ease;
  transition: border-radius .22s, width .22s, height .22s;
}
.fc-panel[hidden] { display: none; }

.fc-header {
  background: #323f60;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.fc-hinfo { display: flex; align-items: center; gap: 11px; }
/* Avatar cuadrado redondeado */
.fc-av {
  width: 40px; height: 40px; border-radius: 10px;
  background: white; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.fc-name { font-size: 14px; font-weight: 800; color: white; margin: 0; font-family: 'Nunito Sans', sans-serif; }
.fc-sub { font-family: 'Amiri', serif; font-style: italic; font-size: 11px; color: rgba(255,255,255,.5); margin: 0; }

/* Lado derecho del header */
.fc-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badge de estado en línea */
.fc-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
}
.fc-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.7); flex-shrink: 0; }
.fc-online { font-size: 10px; color: rgba(255,255,255,.5); font-weight: 700; font-family: 'Nunito Sans', sans-serif; }

/* Controles cabecera */
.fc-ctrl-bar { display: flex; align-items: center; gap: 4px; }
.fc-ctrl {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.10); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75); transition: background .18s, color .18s;
  flex-shrink: 0; padding: 0;
}
.fc-ctrl:hover { background: rgba(255,255,255,.22); color: white; }
.fc-ctrl svg { width: 14px; height: 14px; pointer-events: none; }

/* ── Mensajes flotante ── */
.fc-msgs {
  flex: 1; padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(to bottom, #faf8f5, white);
  min-height: 0;
  scroll-behavior: smooth;
}
.fc-msgs::-webkit-scrollbar { width: 5px; }
.fc-msgs::-webkit-scrollbar-track { background: transparent; }
.fc-msgs::-webkit-scrollbar-thumb { background: #d0cbc3; border-radius: 3px; }
.fc-msgs::-webkit-scrollbar-thumb:hover { background: #b8b2aa; }

/* Chips rápidos */
.fc-chips {
  padding: 4px 16px 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid #f0ece5;
}
.fc-chip {
  padding: 5px 12px; border: 1.5px solid #e2ddd6; border-radius: 10px;
  font-size: 11px; font-weight: 700; color: #596460; background: white;
  cursor: pointer; transition: all .2s; white-space: nowrap;
  font-family: 'Nunito Sans', sans-serif;
}
.fc-chip:hover { border-color: #cf5245; color: #cf5245; background: #fdf5f4; }

.fc-typing { display: none; gap: 8px; align-items: center; padding: 0 16px 8px; }
.fc-typing.visible { display: flex; }
.fc-typing-text { font-size: 12px; color: #9ca3af; }

.fc-input-zone {
  border-top: 1px solid #e2ddd6; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px; flex-shrink: 0;
}
.fc-input-row { display: flex; gap: 8px; align-items: flex-end; }
.fc-textarea {
  flex: 1; border: 1.5px solid #e2ddd6; border-radius: 10px;
  padding: 9px 12px; font-size: 13px; font-family: 'Nunito Sans', sans-serif;
  color: #1e1e1e; resize: none; min-height: 40px; max-height: 90px;
  outline: none; transition: border-color .2s; background: #faf8f5; line-height: 1.5;
}
.fc-textarea:focus { border-color: #cf5245; background: white; }
.fc-textarea::placeholder { color: #6b6b6b; }
.fc-send {
  width: 40px; height: 40px; border-radius: 10px; background: #cf5245;
  border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s; flex-shrink: 0;
}
.fc-send:hover { background: #a8392e; }
.fc-send:disabled { background: #e2ddd6; cursor: not-allowed; }

/* Fila inferior del input: botón enviar (izq) + badge (dcha) */
.fc-input-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Badge chatbot flotante */
.fc-dev-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity .15s;
}
.fc-dev-link:hover { opacity: 1; }
.fc-dev-link span {
  font-size: 10px;
  color: #888;
  font-family: 'Nunito Sans', sans-serif;
  white-space: nowrap;
}
.fc-dev-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Badge planificador — dentro del footer */
.pm-dev-link {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity .15s;
  flex-shrink: 0;
}
.pm-dev-link:hover { opacity: 0.85; }
.pm-dev-link span {
  font-size: 10px;
  color: #888;
  font-family: 'Nunito Sans', sans-serif;
  white-space: nowrap;
}
.pm-dev-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media(max-width: 480px) {
  .pm-dev-link span { display: none; }
  .pm-dev-logo { height: 36px; }
}

/* Input footer (char count + hint) */
.fc-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}
.fc-char-count {
  font-size: 10px;
  color: #bbb;
  font-family: 'Nunito Sans', sans-serif;
  transition: color .2s;
}
.fc-char-count.warn { color: #cf5245; }
.fc-input-hint {
  font-size: 10px;
  color: #ccc;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Botones inline de respuesta rápida (modal) ── */
.m-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 4px;
}
.m-qr-btn {
  background: white;
  border: 1.5px solid #cf5245;
  color: #cf5245;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.m-qr-btn:hover { background: #cf5245; color: white; }
.m-qr-toggle.active { background: #cf5245; color: white; border-color: #cf5245; }

.m-btn-grid { flex-wrap: wrap; }
.m-pref-wrap { display: flex; flex-direction: column; gap: 10px; }
.m-confirm-btn {
  display: none;
  align-self: flex-start;
  align-items: center;
  background: #323f60;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 800;
  font-family: 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: background .15s;
}
.m-confirm-btn:hover { background: #1e2840; }

/* ── Slider de presupuesto ── */
.m-budget-wrap {
  background: white;
  border: 1.5px solid #e2ddd6;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
}
.m-budget-display {
  font-size: 28px;
  font-weight: 900;
  color: #cf5245;
  text-align: center;
  font-family: 'Nunito Sans', sans-serif;
  line-height: 1;
}
.m-budget-display .bv-unit {
  font-size: 14px;
  font-weight: 700;
  color: #aaa;
}
.m-budget-range {
  width: 100%;
  accent-color: #cf5245;
  cursor: pointer;
  height: 4px;
}
.m-budget-hints {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #bbb;
  font-family: 'Nunito Sans', sans-serif;
  margin-top: -6px;
}
.m-budget-btn { justify-content: center; margin-top: 2px; }

/* ── Sidebar de chips en el modal ── */
.modal-chips-sidebar {
  background: #faf8f5;
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid #f0ece5;
}
.mcs-title {
  font-size: 10px;
  font-weight: 800;
  color: #aaa;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-family: 'Nunito Sans', sans-serif;
}
.mcs-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: white;
  border: 1.5px solid #e2ddd6;
  color: #596460;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Nunito Sans', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, color .18s, background .18s;
  line-height: 1.3;
}
.mcs-btn:hover  { border-color: #cf5245; color: #cf5245; background: #fdf5f4; }
.mcs-btn.mcs-active {
  border-color: #cf5245;
  background: #cf5245;
  color: white;
}
.mcs-btn.mcs-active:hover { background: #a8392e; border-color: #a8392e; }
.mcs-emoji { font-size: 16px; flex-shrink: 0; }

/* ── Quick replies inline ── */
.fc-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 10px;
}
.fc-qr-btn {
  background: white;
  border: 1.5px solid #cf5245;
  color: #cf5245;
  border-radius: 20px;
  padding: 7px 15px;
  font-size: 13px;
  font-family: 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.3;
}
.fc-qr-btn:hover { background: #cf5245; color: white; }

/* ══════════════════════════════════════════════════════════════════
   ChatWindow.astro — estilos del componente incrustado
   ══════════════════════════════════════════════════════════════════ */

/* Progress bar (ChatWindow) */
.agent-progress {
  padding: 12px 20px;
  border-bottom: 1px solid #f0ece5;
  background: white;
}
.progress-track { display: flex; align-items: center; }
.p-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: #aaa;
  font-family: 'Nunito Sans', sans-serif; white-space: nowrap;
  transition: all .3s;
}
.p-step .num {
  width: 20px; height: 20px; border-radius: 50%;
  background: #e2ddd6; color: #aaa;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0; transition: all .3s;
}
.p-step .label { display: none; }
@media(min-width:500px) { .p-step .label { display: inline; } }
.p-step.done { color: #596460; } .p-step.done .num { background: #596460; color: white; }
.p-step.active { color: #cf5245; } .p-step.active .num { background: #cf5245; color: white; }
.p-sep { flex: 1; height: 1px; background: #e2ddd6; min-width: 6px; }

/* Chat section wrapper */
.chat-section {
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem 2rem;
}
.section-label {
  font-family: 'Amiri', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: #aaa;
  margin: 1.5rem 0 .75rem;
  text-align: center;
  letter-spacing: .04em;
}

/* Chat window */
.chat-window {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(50,63,96,.14);
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #ede9e3;
}

/* Topbar */
.chat-topbar {
  background: #323f60;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Avatar cuadrado redondeado */
.tb-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  background: #cf5245;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tb-info { flex: 1; min-width: 0; }
.tb-name { font-size: 14px; font-weight: 800; color: white; margin: 0; font-family: 'Nunito Sans', sans-serif; }
.tb-sub { font-family: 'Amiri', serif; font-style: italic; font-size: 11px; color: rgba(255,255,255,.5); margin: 0; }

/* Lado derecho del topbar */
.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Badge de estado */
.status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.7);
  flex-shrink: 0;
}
.status-txt {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  font-weight: 700;
  font-family: 'Nunito Sans', sans-serif;
}

/* Botón reiniciar — solo icono */
.btn-reset {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.10);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  transition: background .18s, color .18s;
  flex-shrink: 0; padding: 0;
}
.btn-reset:hover { background: rgba(255,255,255,.22); color: white; }
.btn-reset svg { pointer-events: none; }

/* Mensajes (ChatWindow) */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(to bottom, #faf8f5, white);
  min-height: 240px;
  max-height: 420px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: #e2ddd6; border-radius: 2px; }

/* Typing (ChatWindow) */
.typing-row {
  display: none;
  gap: 8px;
  align-items: center;
  padding: 0 16px 10px;
}
.typing-row.visible { display: flex; }
.typing-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #f9ecea;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.typing-dots {
  background: #f0ece5; border-radius: 16px; border-bottom-left-radius: 4px;
  padding: 9px 13px; display: flex; gap: 4px; align-items: center;
}
.typing-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: #aaa;
  animation: tdot 1.2s ease infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

/* Chips (ChatWindow) */
.chips-area {
  padding: 4px 16px 10px;
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid #f0ece5;
}
.chip {
  padding: 5px 13px;
  border: 1.5px solid #e2ddd6;
  border-radius: 10px;
  font-size: 11px; font-weight: 700; color: #596460;
  background: white; cursor: pointer;
  transition: all .2s; white-space: nowrap;
  font-family: 'Nunito Sans', sans-serif;
}
.chip:hover { border-color: #cf5245; color: #cf5245; background: #fdf5f4; }

/* Input zone (ChatWindow) */
.chat-input-zone {
  border-top: 1px solid #e2ddd6;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px; flex-shrink: 0;
}
.chat-input-row { display: flex; gap: 9px; align-items: flex-end; }
.chat-textarea {
  flex: 1; border: 1.5px solid #e2ddd6; border-radius: 12px;
  padding: 10px 13px; font-size: 14px; font-family: 'Nunito Sans', sans-serif;
  color: #1e1e1e; resize: none; min-height: 44px; max-height: 100px;
  outline: none; transition: border-color .2s; background: #faf8f5; line-height: 1.5;
}
.chat-textarea:focus { border-color: #cf5245; background: white; }
.chat-textarea::placeholder { color: #bbb; }
.btn-send {
  width: 44px; height: 44px; border-radius: 12px; background: #cf5245;
  border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s, transform .15s; flex-shrink: 0;
}
.btn-send:hover { background: #a8392e; transform: scale(1.05); }
.btn-send:disabled { background: #e2ddd6; cursor: not-allowed; transform: none; }

/* Input footer */
.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}
.char-count {
  font-size: 10px; color: #bbb;
  font-family: 'Nunito Sans', sans-serif;
  transition: color .2s;
}
.char-count.warn { color: #cf5245; }
.input-hint {
  font-size: 10px; color: #ccc;
  font-family: 'Nunito Sans', sans-serif;
}

/* ── Mensajes compartidos (msg bubbles) ── */
.msg { display: flex; gap: 8px; align-items: flex-start; animation: msgIn .24s ease both; }
@keyframes msgIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.msg.user { flex-direction: row-reverse; }
.msg-av {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; margin-top: 2px;
}
.msg.ia .msg-av { background: white; }
.msg.user .msg-av { background: #e8eaf0; }
.msg-body { max-width: 82%; display: flex; flex-direction: column; gap: 2px; }
.msg.user .msg-body { align-items: flex-end; }
.msg-bubble {
  padding: 9px 13px; border-radius: 16px; font-size: 13px;
  line-height: 1.65; word-wrap: break-word; font-family: 'Nunito Sans', sans-serif;
}
.msg.ia .msg-bubble { background: #f0ece5; color: #1e1e1e; border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: #cf5245; color: white; border-bottom-right-radius: 4px; }
.msg-bubble strong { font-weight: 800; }
.msg-bubble ul { margin: 5px 0 2px 14px; }
.msg-bubble li { margin-bottom: 3px; }
.msg-bubble a { color: #323f60; text-decoration: underline; }
.msg.user .msg-bubble a { color: rgba(255,255,255,.85); }
.msg-time { font-size: 9px; color: #bbb; padding: 0 2px; }
.msg.user .msg-time { text-align: right; }

/* Pills de sugerencias inline */
.msg-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.msg-pill {
  padding: 4px 11px;
  border: 1.5px solid #e2ddd6;
  border-radius: 99px;
  font-size: 11px; font-weight: 700; color: #596460;
  background: white; cursor: pointer;
  transition: all .18s; white-space: nowrap;
  font-family: 'Nunito Sans', sans-serif;
}
.msg-pill:hover { border-color: #cf5245; color: #cf5245; background: #fdf5f4; }

/* Typing compartido */
.t-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #f9ecea; display: flex; align-items: center;
  justify-content: center; font-size: 13px; flex-shrink: 0;
}
.t-dots {
  background: #f0ece5; border-radius: 16px; border-bottom-left-radius: 4px;
  padding: 9px 13px; display: flex; gap: 4px; align-items: center;
}
.t-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: #aaa;
  animation: tdot 1.2s ease infinite;
}
.t-dots span:nth-child(2){animation-delay:.2s}
.t-dots span:nth-child(3){animation-delay:.4s}
@keyframes tdot{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){
  .t-dots span,
  .typing-dots span { animation: none; }
}

/* Calendario */
.cal-wrap {
  background: white; border: 1px solid #e2ddd6; border-radius: 14px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(50,63,96,.12);
  overflow: hidden; width: 272px; max-width: 100%; user-select: none;
}
.cal-head { background: #323f60; color: white; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
.cal-nav { background: rgba(255,255,255,.12); border: none; color: white; cursor: pointer; width: 26px; height: 26px; border-radius: 6px; font-size: 16px; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .18s; }
.cal-nav:hover { background: rgba(255,255,255,.22); }
.cal-month { font-size: 13px; font-weight: 800; font-family: 'Nunito Sans', sans-serif; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; padding: 8px 6px 3px; }
.cal-dow { text-align: center; font-size: 9px; font-weight: 800; color: #aaa; letter-spacing: .05em; padding: 3px 0; text-transform: uppercase; font-family: 'Nunito Sans', sans-serif; }
.cal-day { text-align: center; font-size: 12px; font-weight: 600; border: none; background: none; cursor: pointer; border-radius: 6px; padding: 6px 2px; color: #1e1e1e; line-height: 1; font-family: 'Nunito Sans', sans-serif; transition: background .1s, color .1s; }
.cal-day:hover:not(:disabled) { background: #f9ecea; color: #cf5245; }
.cal-day:disabled { color: #ccc; cursor: default; }
.cal-day.today { font-weight: 900; color: #323f60; }
.cal-day.in-range { background: #f9ecea; color: #cf5245; border-radius: 0; }
.cal-day.rs,.cal-day.re { background: #cf5245; color: white; font-weight: 800; }
.cal-day.rs { border-radius: 6px 0 0 6px; } .cal-day.re { border-radius: 0 6px 6px 0; } .cal-day.rs.re { border-radius: 6px; }
.cal-legend { padding: 5px 10px 5px; font-size: 10px; color: #aaa; text-align: center; min-height: 24px; font-family: 'Nunito Sans', sans-serif; }
.cal-legend strong { color: #cf5245; }
.cal-confirm { display: none; width: calc(100% - 16px); margin: 0 8px 8px; background: #cf5245; color: white; border: none; border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 800; font-family: 'Nunito Sans', sans-serif; cursor: pointer; transition: background .18s; }
.cal-confirm.show { display: block; }
.cal-confirm:hover { background: #a8392e; }

/* sr-only */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ══════════════════════════════════════════════════════
   PM-* — Planificador Visual Multi-paso
══════════════════════════════════════════════════════ */

/* Overlay full-screen — controlado con el atributo hidden del DOM */
.pm-overlay { display: none; }
.pm-overlay:not([hidden]) {
  position: fixed; inset: 0; z-index: 10001;
  background: #fff;
  display: flex; align-items: stretch; justify-content: center;
}

/* Caja principal del modal — full screen */
.pm-box {
  background: #fff;
  border-radius: 0;
  width: 100%; max-width: 100%;
  height: 100dvh; max-height: 100dvh;
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ── Barra única: marca + pasos + acciones ── */
.pm-prog {
  padding: 10px max(16px, calc((100% - 960px) / 2 + 16px));
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #f0ece5;
}

/* Marca izquierda */
.pm-prog-brand {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; margin-right: 8px;
}
.pm-prog-brand-av {
  width: 36px; height: 36px; border-radius: 9px;
  background: #fff;
  border: 1.5px solid #e8e4dd;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pm-prog-brand-info { display: flex; flex-direction: column; }
.pm-prog-brand-name {
  font-size: 15px; font-weight: 800; color: #1e1e1e;
  font-family: 'Nunito Sans', sans-serif; line-height: 1.2; margin: 0;
}
.pm-prog-brand-dest {
  font-size: 11px; color: #7a7570;
  font-family: 'Nunito Sans', sans-serif; margin: 0;
}

/* Track de pasos (centro, ocupa el espacio restante) */
.pm-prog-track { display: flex; align-items: center; flex: 1; min-width: 0; }

/* Botones de acción derechos */
.pm-prog-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 8px; }
.pm-prog-act-btn {
  background: #fff; border: 1.5px solid #e8e4dd; border-radius: 9px;
  color: #5a5550; cursor: pointer; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, border-color .18s, color .18s;
}
.pm-prog-act-btn:hover { background: #f5f2ee; border-color: #d1cdc5; color: #1e1e1e; }
.pm-prog-act-btn svg { width: 18px; height: 18px; }
.pm-prog-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex: 0 0 auto;
}
.pm-prog-circle {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #d1cdc5;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #aaa;
  font-family: 'Nunito Sans', sans-serif;
  transition: all .25s;
}
.pm-prog-lbl {
  font-size: 10px; font-weight: 700; color: #aaa;
  font-family: 'Nunito Sans', sans-serif;
  text-align: center; white-space: nowrap;
  transition: color .25s;
}
.pm-prog-line {
  flex: 1; height: 2px; background: #e0dcd4;
  margin: 0 4px; margin-bottom: 18px;
  transition: background .25s;
}
.pm-prog-step.pm-prog-active .pm-prog-circle { border-color: #596460; background: #596460; color: #fff; }
.pm-prog-step.pm-prog-active .pm-prog-lbl { color: #596460; }
.pm-prog-step.pm-prog-done .pm-prog-circle { border-color: #cf5245; background: #cf5245; color: #fff; }
.pm-prog-step.pm-prog-done .pm-prog-lbl { color: #cf5245; }
.pm-line-done { background: #cf5245; }

/* ── Steps container ── */
.pm-steps {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
  padding: 16px 24px 12px;
  scroll-behavior: smooth;
  max-width: 960px; width: 100%; margin: 0 auto; align-self: center;
  box-sizing: border-box;
}
.pm-panel { display: flex; flex-direction: column; gap: 18px; }
.pm-hidden { display: none !important; }

/* ── Section titles ── */
.pm-sec-title {
  font-size: 18px; font-weight: 900; color: #1e1e1e;
  font-family: 'Nunito Sans', sans-serif; margin: 0 0 2px;
}
.pm-sec-sub {
  font-size: 13px; color: #7a7570;
  font-family: 'Nunito Sans', sans-serif; margin: 0 0 12px;
}
.pm-sec-block { display: flex; flex-direction: column; gap: 6px; }
.pm-sec-center { text-align: center; }

/* ── Paso 1: layout 2 cols ── */
.pm-s1-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px; align-items: start;
}
.pm-s1-left { display: flex; flex-direction: column; gap: 14px; }
.pm-s1-right { display: flex; flex-direction: column; gap: 18px; }

/* Calendario embebido */
.pm-cal-host {
  background: #fff; border-radius: 12px;
  border: 1px solid #e8e4dd;
  overflow: hidden;
}
.pm-date-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid #e8e4dd; border-radius: 10px;
  padding: 10px 12px;
}
.pm-date-field { flex: 1; text-align: center; }
.pm-date-lbl { font-size: 9px; font-weight: 800; color: #aaa; text-transform: uppercase; letter-spacing: .06em; font-family: 'Nunito Sans', sans-serif; }
.pm-date-val { font-size: 14px; font-weight: 800; color: #323f60; font-family: 'Nunito Sans', sans-serif; min-height: 20px; }
.pm-date-sep { font-size: 18px; color: #d1cdc5; }

/* Tarjetas de viajero */
.pm-traveler-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 8px;
}
.pm-traveler-card {
  border: 2px solid #e8e4dd; border-radius: 12px;
  padding: 12px 8px; text-align: center; cursor: pointer;
  transition: all .18s; background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pm-traveler-card:hover { border-color: #596460; background: #f5f7f5; }
.pm-traveler-card.pm-traveler-sel { border-color: #596460; background: #596460; }
.pm-traveler-card.pm-traveler-sel .pm-traveler-lbl { color: #fff; }
.pm-traveler-emoji { font-size: 24px; line-height: 1; }
.pm-traveler-lbl { font-size: 12px; font-weight: 800; color: #3a3632; font-family: 'Nunito Sans', sans-serif; }

/* Chips de intereses */
.pm-interests-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.pm-interest-chip {
  border: 1.5px solid #e0dcd4; border-radius: 20px;
  padding: 6px 12px; font-size: 12px; font-weight: 700;
  color: #5a5550; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; transition: all .15s; background: #fff;
  user-select: none;
}
.pm-interest-chip:hover { border-color: #596460; color: #596460; }
.pm-interest-chip.pm-interest-sel { background: #596460; border-color: #596460; color: #fff; }

/* ── Paso 2: países ── */
.pm-country-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  max-width: 480px; margin: 0 auto;
}
.pm-country-card {
  border: 2px solid #e8e4dd; border-radius: 12px;
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all .18s; background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.pm-country-card input[type="radio"] { display: none; }
.pm-country-card:hover { border-color: #cf5245; }
.pm-country-card.pm-country-sel { border-color: #cf5245; background: #fdf2f1; }
.pm-country-flag { font-size: 28px; line-height: 1; }
.pm-country-lbl { font-size: 11px; font-weight: 800; color: #5a5550; font-family: 'Nunito Sans', sans-serif; }
.pm-country-more-wrap { grid-column: 1 / -1; margin-top: 4px; }
.pm-more-label { font-size: 13px; font-weight: 700; color: #7a7570; font-family: 'Nunito Sans', sans-serif; display: block; margin-bottom: 6px; }

/* Campos de formulario */
.pm-field-row { display: flex; flex-direction: column; gap: 4px; }
.pm-label { font-size: 12px; font-weight: 800; color: #5a5550; font-family: 'Nunito Sans', sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.pm-input, .pm-textarea {
  border: 1.5px solid #e0dcd4; border-radius: 10px;
  padding: 10px 13px; font-size: 14px; font-family: 'Nunito Sans', sans-serif;
  color: #1e1e1e; outline: none; transition: border-color .15s;
  background: #fff; width: 100%; box-sizing: border-box;
}
.pm-input:focus, .pm-textarea:focus { border-color: #323f60; }
.pm-textarea { resize: vertical; min-height: 70px; }

/* Chips de transporte */
.pm-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-transport-chip {
  border: 1.5px solid #e0dcd4; border-radius: 20px;
  padding: 7px 14px; font-size: 12px; font-weight: 700;
  color: #5a5550; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; transition: all .15s; background: #fff;
}
.pm-transport-chip:hover { border-color: #323f60; color: #323f60; }
.pm-transport-chip.pm-transport-sel { background: #323f60; border-color: #323f60; color: #fff; }

/* Presupuesto */
.pm-s2-bottom { margin-top: 8px; display: flex; flex-direction: column; gap: 16px; }
.pm-budget-wrap { display: flex; flex-direction: column; gap: 6px; }
.pm-budget-disp { font-size: 24px; font-weight: 900; color: #cf5245; font-family: 'Nunito Sans', sans-serif; }
.pm-budget-unit { font-size: 13px; color: #aaa; }
.pm-budget-range { width: 100%; accent-color: #cf5245; cursor: pointer; }
.pm-budget-hints { display: flex; justify-content: space-between; font-size: 10px; color: #bbb; font-family: 'Nunito Sans', sans-serif; }

/* ── Paso 3: Descubre ── */
.pm-tab-row {
  display: flex; gap: 0; border-bottom: 2px solid #e8e4dd;
  margin-bottom: 16px;
}
.pm-tab {
  padding: 8px 18px; font-size: 13px; font-weight: 700;
  color: #7a7570; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .15s;
}
.pm-tab:hover { color: #323f60; }
.pm-tab.pm-tab-active { color: #cf5245; border-bottom-color: #cf5245; }

.pm-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 14px;
}
.pm-disc-card {
  border: 1px solid #e8e4dd; border-radius: 14px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .18s;
}
.pm-disc-card:hover { box-shadow: 0 8px 24px rgba(50,63,96,.1); }
.pm-disc-img {
  height: 130px; background-size: cover; background-position: center;
  position: relative; flex-shrink: 0;
}
.pm-disc-img-empty { background: #f0ece5; }
.pm-disc-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 36px; opacity: .4;
}
.pm-disc-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pm-disc-title { font-size: 13px; font-weight: 800; color: #1e1e1e; font-family: 'Nunito Sans', sans-serif; line-height: 1.3; }
.pm-disc-excerpt { font-size: 11px; color: #7a7570; font-family: 'Nunito Sans', sans-serif; line-height: 1.4; flex: 1; }
.pm-disc-actions { display: flex; gap: 6px; margin-top: auto; }
.pm-disc-link {
  flex: 1; text-align: center; padding: 6px 8px; border-radius: 7px;
  border: 1.5px solid #e0dcd4; font-size: 11px; font-weight: 700;
  color: #5a5550; font-family: 'Nunito Sans', sans-serif;
  text-decoration: none; transition: all .15s;
}
.pm-disc-link:hover { border-color: #323f60; color: #323f60; }
.pm-disc-add {
  flex: 1; text-align: center; padding: 6px 8px; border-radius: 7px;
  border: none; background: #596460; font-size: 11px; font-weight: 800;
  color: #fff; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; transition: background .15s;
}
.pm-disc-add:hover { background: #3e4a46; }
.pm-disc-added { background: #c8e6c9 !important; color: #2e7d32 !important; cursor: default !important; }
.pm-loading {
  text-align: center; padding: 32px; font-size: 13px; color: #aaa;
  font-family: 'Nunito Sans', sans-serif;
}
.pm-empty {
  text-align: center; padding: 24px; font-size: 13px; color: #bbb;
  font-family: 'Nunito Sans', sans-serif; grid-column: 1/-1;
}

/* ── Paso 4: Resumen + contacto ── */
.pm-s4-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  align-items: start;
}
.pm-s4-left, .pm-s4-right { display: flex; flex-direction: column; gap: 14px; }

.pm-summary {
  background: #fff; border: 1.5px solid #e8e4dd; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.pm-sum-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-sum-lbl {
  font-size: 11px; font-weight: 800; color: #aaa;
  font-family: 'Nunito Sans', sans-serif;
  text-transform: uppercase; letter-spacing: .05em;
  flex: 0 0 80px;
}
.pm-sum-val {
  font-size: 13px; font-weight: 700; color: #1e1e1e;
  font-family: 'Nunito Sans', sans-serif; flex: 1;
  overflow-wrap: break-word; word-break: break-word;
}

/* Toggle email / WhatsApp */
.pm-ctog-wrap { display: flex; gap: 6px; }
.pm-ctog {
  flex: 1; padding: 9px; border-radius: 9px;
  border: 1.5px solid #e0dcd4; background: #fff;
  font-size: 12px; font-weight: 800; color: #7a7570;
  font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; text-align: center; transition: all .15s;
}
.pm-ctog:hover { border-color: #596460; color: #596460; }
.pm-ctog.pm-ctog-active { background: #596460; border-color: #596460; color: #fff; }

/* Términos */
.pm-terms-lbl {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: #7a7570; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; line-height: 1.4;
}
.pm-check { flex-shrink: 0; margin-top: 2px; accent-color: #cf5245; }
.pm-link { color: #cf5245; text-decoration: underline; }

/* Errores inline */
.pm-err-msg { font-size: 12px; color: #cf5245; font-family: 'Nunito Sans', sans-serif; }
.pm-step-err {
  display: none;
  background: #fdf2f1; border: 1px solid #f5c6c1; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; color: #a8392e;
  font-family: 'Nunito Sans', sans-serif; margin-bottom: 4px;
}

/* Botón enviar */
.pm-btn-send {
  width: 100%; padding: 14px; border-radius: 12px;
  border: none; background: #cf5245; color: #fff;
  font-size: 15px; font-weight: 900; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; transition: background .18s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.pm-btn-send:hover { background: #a8392e; }
.pm-btn-send:disabled { opacity: .75; cursor: not-allowed; }
.pm-btn-send.loading { pointer-events: none; }
.pm-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: pm-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

/* Caja de éxito */
.pm-success-box {
  text-align: center; padding: 32px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.pm-success-icon { font-size: 48px; }
.pm-success-title { font-size: 20px; font-weight: 900; color: #1e1e1e; font-family: 'Nunito Sans', sans-serif; }
.pm-success-sub { font-size: 14px; color: #7a7570; font-family: 'Nunito Sans', sans-serif; }
.pm-success-again {
  margin-top: 4px; background: none; border: 1.5px solid #cf5245;
  color: #cf5245; border-radius: 10px; padding: 9px 22px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: 'Nunito Sans', sans-serif; transition: all .18s;
}
.pm-success-again:hover { background: #cf5245; color: white; }

/* ── Footer / navegación ── */
.pm-footer {
  flex-shrink: 0;
  padding: 7px max(24px, calc((100% - 960px) / 2 + 24px));
  border-top: 1px solid #f0ece5;
  background: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pm-btn-back, .pm-btn-next {
  padding: 10px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 800; font-family: 'Nunito Sans', sans-serif;
  cursor: pointer; transition: all .18s;
}
.pm-btn-back {
  border: 1.5px solid #e0dcd4; background: #fff; color: #5a5550;
}
.pm-btn-back:hover { border-color: #323f60; color: #323f60; }
.pm-btn-next {
  border: none; background: #cf5245; color: #fff;
}
.pm-btn-next:hover { background: #a8392e; }

/* Dots de progreso */
.pm-dots { display: flex; gap: 6px; align-items: center; }
.pm-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d1cdc5; transition: background .2s;
}
.pm-dot-on { background: #cf5245; }

/* ── Autocompletado alojamiento ── */
.pm-suggest-box {
  display: none;
  position: absolute; z-index: 200;
  background: #fff;
  border: 1.5px solid #e0dcd4;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(50,63,96,.1);
  width: 100%; max-height: 240px; overflow-y: auto;
  left: 0; top: 100%;
}
.pm-field-row { position: relative; }
.pm-suggest-item {
  padding: 10px 14px;
  font-size: 13px; font-family: 'Nunito Sans', sans-serif;
  color: #3a3632; cursor: pointer;
  border-bottom: 1px solid #f5f2ee;
  transition: background .12s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-suggest-item:last-child { border-bottom: none; }
.pm-suggest-item:hover { background: #f9f6f1; color: #cf5245; }

/* ── Responsive pm-* ── */
@media(max-width: 760px) {
  .pm-s1-layout { grid-template-columns: 1fr; }
  .pm-s4-layout { grid-template-columns: 1fr; }
  .pm-country-grid { grid-template-columns: repeat(3,1fr); }
  .pm-cards-grid { grid-template-columns: repeat(2,1fr); }
  .pm-prog-lbl { display: none; }
  .pm-steps { padding: 16px; max-height: calc(100dvh - 115px); }
}
@media(max-width: 480px) {
  .pm-country-grid { grid-template-columns: repeat(3,1fr); }
  .pm-cards-grid { grid-template-columns: 1fr; }
  .pm-traveler-grid { grid-template-columns: repeat(2,1fr); }
  .pm-prog { padding: 8px 12px; gap: 8px; }
  .pm-prog-brand-info { display: none; }
  .pm-footer { padding: 8px 16px; }
  /* Botones de contacto: 2×2 en lugar de 4 en fila */
  .pm-ctog-wrap { flex-wrap: wrap; }
  .pm-ctog { flex: 0 0 calc(50% - 3px); min-width: 0; }
  .pm-sec-title { font-size: 16px; }
  .pm-success-title { font-size: 17px; }
}

/* ── Responsive ── */
@media(max-width:900px){
  .fc-wrap{ bottom: 20px; }
  .fc-panel{ bottom: 106px; max-height: min(540px, calc(100dvh - 130px)); }
}
@media(max-width:640px){
  .search-bar{flex-direction:column}
  .btn-search{height:50px;width:100%;justify-content:center}
  .btn-planner{height:50px;width:100%;justify-content:center}
  .hero-chips { gap: 8px; margin-top: 16px; }
  .hero-chip { font-size: 12px; padding: 7px 14px; }
  .hero-sub { font-size: 14px; }
  .fc-wrap{ right:14px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .fc-panel{width:calc(100vw - 28px); right:14px; left:14px; bottom: max(102px, calc(env(safe-area-inset-bottom, 0px) + 86px)); max-height: min(500px, calc(100dvh - env(safe-area-inset-bottom, 0px) - 130px));}
  .hero-title{font-size:1.75rem}
  .fc-qr-btn { font-size: 12px; padding: 6px 12px; }
  .modal-box {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto auto;
  }
  .modal-msgs       { border-right: none; }
  .modal-typing     { border-right: none; }
  .modal-input-zone { grid-row: 5; border-right: none; }
  .modal-chips-sidebar {
    grid-column: 1; grid-row: 6;
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    padding: 10px 13px; gap: 8px;
    border-left: none; border-top: 1px solid #f0ece5;
  }
  .mcs-title { display: none; }
  .mcs-btn { white-space: nowrap; flex-shrink: 0; padding: 7px 12px; font-size: 12px; }
  .chat-section { padding: 0 .75rem 1.5rem; }
  .chat-messages { max-height: 320px; }
}
@media(max-width:400px){
  .fc-wrap{ right:10px; bottom: 14px; }
  .fc-btn{ width: 64px; height: 64px; }
  .fc-btn-logo{ width: 26px; height: 26px; }
  .pm-country-grid{ grid-template-columns: repeat(2,1fr); }
  /* Hero */
  .hero-title { font-size: 1.5rem; }
  .hero-eyebrow { font-size: 12px; }
  .hero-sub { font-size: 13px; margin: 0 0 1.2rem; }
  .hero-content { padding: 0 1rem; }
  .hero-chips { margin-top: 12px; gap: 6px; }
  .hero-chip { padding: 6px 12px; font-size: 11px; }
  .btn-planner { font-size: 13px; padding: 0 16px; }
  /* Modal */
  .pm-steps { padding: 12px 14px; max-height: calc(100dvh - 105px); }
  .pm-sec-title { font-size: 15px; }
  .pm-sec-sub { font-size: 12px; }
  .pm-btn-back, .pm-btn-next { padding: 9px 16px; font-size: 13px; }
}
@media(max-width:360px){
  .hero-title { font-size: 1.35rem; }
  .hero-sub { font-size: 12.5px; }
  .pm-prog { padding: 6px 10px; gap: 6px; }
  .pm-footer { padding: 6px 10px; }
  .pm-steps { padding: 10px 12px; max-height: calc(100dvh - 100px); }
  .pm-btn-back, .pm-btn-next { padding: 8px 14px; font-size: 12px; }
  .pm-ctog { font-size: 11px; padding: 8px 6px; }
  .pm-tab { padding: 8px 12px; font-size: 12px; }
  .search-results { max-height: 320px; }
}


