/* =====================================================
   PLANY · COMPONENTES
   ===================================================== */

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  padding: 16px 24px;
  border-radius: var(--r-pill);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-align: center;
  line-height: 1.1;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--naranja); color: #fff; box-shadow: var(--sh-cta); }
.btn--primary:hover { background: #ff5a1f; }
.btn--grad { background: var(--grad-marca); color: #fff; box-shadow: var(--sh-cta); }
.btn--block { width: 100%; }
.btn--lg { padding: 18px 28px; font-size: 17px; }
.btn--ghost {
  background: transparent; color: var(--naranja);
  border: 1.5px solid rgba(255,107,53,0.4);
}
.btn--ghost:hover { background: rgba(255,107,53,0.07); }
.btn--dark { background: var(--carbon); color: #fff; }
.btn--pro { background: var(--amarillo); color: var(--carbon); }
.btn--pro:hover { background: #ffc41f; }

/* latido sutil de "tocá acá" en la acción principal */
.hint-pulse { animation: hintpulse 2.4s ease-in-out infinite; }
@keyframes hintpulse {
  0%, 100% { transform: scale(1); box-shadow: var(--sh-cta); }
  50% { transform: scale(1.015); box-shadow: 0 14px 32px -6px rgba(255,107,53,.6); }
}

/* botón flotante de avance (demo) */
.cta-dock {
  flex: 0 0 auto;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--crema) 60%, rgba(255,245,236,0));
}
.theme-dark .cta-dock { background: linear-gradient(to top, var(--dark-bg) 60%, rgba(21,21,31,0)); }

/* ---------- CHIPS ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;            /* NUNCA encoger → el label no se corta a media palabra (scrollea entero) */
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all .18s ease;
  border: 1.5px solid transparent;
}
/* chips claros */
.chip--light { background: #fff; border-color: var(--gray-200); color: var(--gray-700); }
.chip--light.is-active { background: var(--naranja); border-color: var(--naranja); color: #fff; }
/* chips oscuros */
.chip--dark { background: var(--dark-surface-2); color: var(--dark-text); }
.chip--dark.is-active { background: var(--crema); color: var(--carbon); }

/* chips de atributos del local (cocina + servicios): ficha, lista, pin del mapa */
.vchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.vchip { font-size: 11px; font-weight: 700; color: var(--carbon); background: #FFF0E6; border: 1px solid #ffe0cc; border-radius: 999px; padding: 3px 9px; white-space: nowrap; line-height: 1.3; }
.vchips--detail { margin-top: 8px; }
.vchips--detail .vchip { font-size: 12px; padding: 5px 11px; background: var(--crema); border-color: #eadfd5; }
/* chips de respuesta (sugerencias de Nia) */
.chip--reply {
  background: #fff;
  border: 1.5px solid #eadfd5;
  color: var(--carbon);
  font-size: 13.5px;
  padding: 10px 16px;
}
.chip--reply:hover { border-color: var(--naranja); color: var(--naranja); }

.chip-row { display: flex; gap: 9px; flex-wrap: wrap; }
/* categorías de la home: SIEMPRE wrap (nunca scroll/corte). A 393px caen a una 2da fila, completas. */
.cat-row { flex-wrap: wrap; row-gap: 9px; overflow: visible; -webkit-mask-image: none; mask-image: none; }
/* scroll horizontal prolijo: peek del siguiente chip + fade suave en el borde derecho (lee como "deslizá para más") */
.chip-row--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scroll-padding-right: 24px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
.chip-row--scroll::-webkit-scrollbar { height: 0; }

/* ---------- AVATAR DE NIA ---------- */
.nia-av {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-marca);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 800;
  font-size: 16px; position: relative;
}
.nia-av::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #2ecc71; border: 2px solid var(--dark-bg);
  animation: online-pulse 2s ease-out infinite;
}
@keyframes online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,.6); }
  70% { box-shadow: 0 0 0 6px rgba(46,204,113,0); }
}
.nia-av--sm { width: 28px; height: 28px; font-size: 13px; }
.nia-av--lg { width: 56px; height: 56px; font-size: 24px; }
.nia-av--onlight::after { border-color: var(--crema); }

/* ---------- BURBUJAS DE CHAT ---------- */
.msg-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: flex-end; }
.msg-row--me { flex-direction: row-reverse; }
.bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.bubble--nia { background: var(--dark-surface-2); color: var(--dark-text); border-bottom-left-radius: 6px; }
.bubble--me  { background: var(--grad-calido); color: #fff; border-bottom-right-radius: 6px; }
.bubble strong { font-weight: 700; }
.bubble .accent { color: var(--amarillo); font-weight: 700; }
.bubble--nia .accent { color: var(--naranja); }

/* indicador "escribiendo…" */
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,245,236,0.6);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- CARD DE LOCAL (foto + tratamiento) ---------- */
.venue-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
  transition: transform .16s ease, box-shadow .2s ease;
}
.venue-card:active { transform: scale(0.985); }
.venue-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.venue-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* degradé arriba para legibilidad del texto sobre la foto */
.venue-card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.34) 0%, transparent 30%, transparent 62%, rgba(0,0,0,0.32) 100%);
}
.venue-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(255,255,255,0.92); color: var(--carbon);
  padding: 5px 10px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px;
}
.venue-card__badge--nia { background: var(--carbon); color: #fff; }
.venue-card__badge--live { background: var(--magenta); color: #fff; }
.venue-card__rating {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.92); color: var(--carbon);
  padding: 5px 9px; border-radius: var(--r-pill);
}
.venue-card__body { padding: 14px 16px 16px; }
.venue-card__name {
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 4px;
}
.venue-card__meta {
  font-size: 13px; color: var(--gray-500); font-weight: 500;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.venue-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); }
.venue-card__why {
  margin-top: 12px; padding: 11px 13px;
  background: var(--crema); border-radius: var(--r-md);
  font-size: 13.5px; line-height: 1.45; color: var(--gray-700);
  display: flex; gap: 9px; align-items: flex-start;
}
.venue-card__why b { color: var(--naranja); font-weight: 700; }
.venue-card__tags { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px; font-weight: 600; color: var(--gray-600);
  background: var(--gray-100); padding: 4px 10px; border-radius: var(--r-pill);
}
.tag--live { background: var(--verde-bg); color: var(--verde); }

/* ---------- CARD genérica (clara) ---------- */
.card {
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); border: 1px solid var(--gray-100);
}

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
  flex: 0 0 auto;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(21,21,31,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--dark-line);
  position: relative;
}
.bottom-nav.on-light {
  background: rgba(255,255,255,0.94);
  border-top: 1px solid var(--gray-200);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.01em;
  color: rgba(255,245,236,0.5);
}
.bottom-nav.on-light .nav-item { color: var(--gray-500); }
.nav-item svg { width: 23px; height: 23px; }
.nav-item.is-active { color: var(--naranja); }
.nav-item--fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad-marca); color: #fff;
  align-items: center; justify-content: center;
  margin-top: -18px; box-shadow: var(--sh-cta); gap: 0;
}
.nav-item--fab svg { width: 26px; height: 26px; }

/* ---------- SECCIÓN / títulos ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-title {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em;
}
.section-link { font-size: 13px; font-weight: 700; color: var(--naranja); }

/* ---------- STEPPER (personas) ---------- */
.stepper { display: inline-flex; align-items: center; gap: 18px; }
.stepper button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--gray-300); color: var(--carbon);
  font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.stepper button:hover { border-color: var(--naranja); color: var(--naranja); }
.stepper .val { font-family: var(--font-display); font-weight: 800; font-size: 22px; min-width: 24px; text-align: center; }

/* ---------- SEGMENTED TOGGLE ---------- */
.segmented { display: flex; background: var(--gray-100); border-radius: var(--r-pill); padding: 4px; }
.segmented button {
  flex: 1; padding: 10px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--gray-600); transition: all .18s ease;
}
.segmented button.is-active { background: #fff; color: var(--naranja); box-shadow: var(--sh-sm); }

/* ---------- INFO VIVA (grid de estado del local) ---------- */
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-cell {
  background: #fff; border: 1px solid var(--gray-100); border-radius: var(--r-md);
  padding: 13px 14px;
}
.live-cell .lc-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 5px; }
.live-cell .lc-val { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.live-cell .lc-val.ok { color: var(--verde); }
.live-cell .lc-val.hot { color: var(--magenta); }

/* ---------- NOTA DE NIA (sobre claro) ---------- */
.nia-note {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255,107,53,0.08);
  border: 1px solid rgba(255,107,53,0.16);
  border-radius: var(--r-md); padding: 13px 14px;
  font-size: 14px; line-height: 1.5; color: var(--gray-700);
}
.nia-note b, .nia-note i { color: var(--naranja); font-weight: 700; }
.nia-note i { font-style: italic; }

/* ---------- AVATARES de amigas ---------- */
.ava {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff; flex: 0 0 auto;
  font-family: var(--font-display);
}
.ava--sm { width: 30px; height: 30px; font-size: 12px; }
.ava-stack { display: flex; }
.ava-stack .ava { border: 2.5px solid var(--crema); margin-left: -10px; }
.ava-stack .ava:first-child { margin-left: 0; }

/* ---------- back / header de pantalla clara ---------- */
.scr-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 6px 18px 10px;
}
.scr-header h1 { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-sm);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.theme-dark .icon-btn { background: var(--dark-surface-2); color: var(--crema); }

/* ---------- input de chat ---------- */
.chat-input {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--dark-bg); border-top: 1px solid var(--dark-line);
}
.chat-input .ci-field {
  flex: 1; background: var(--dark-surface-2); border-radius: var(--r-pill);
  padding: 13px 18px; color: var(--dark-muted); font-size: 14.5px;
}
.chat-input .ci-send {
  width: 44px; height: 44px; border-radius: 50%; background: var(--naranja);
  display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto;
}
/* DISCOVERY (chat de Nia) en CLARO → unificado con el chat del plan */
.theme-light .chat-header { border-bottom-color: var(--gray-200); }
.theme-light .chat-header__name { color: var(--carbon); }
.theme-light .bubble--nia { background: #fff; color: var(--carbon); border: 1px solid var(--gray-200); }
.theme-light .bubble--nia .accent { color: var(--naranja); }
.theme-light .chat-input { background: #fff; border-top-color: var(--gray-200); }
.theme-light .chat-input .ci-field { background: var(--crema); color: var(--gray-500); }

/* utilidades de espaciado por pantalla */
.pad { padding: 0 18px; }
.pad-lg { padding: 0 20px; }
.stack > * + * { margin-top: 14px; }

/* Íconos de línea inline (Recorrido 4b, 11/11): mismo trazo que la tarjeta; heredan el color del texto. */
.lico { flex: none; display: inline-block; vertical-align: -3px; margin-right: 5px; }
.vchip--ico { display: inline-flex; align-items: center; gap: 4px; }
.vchip--ico .lico { margin: 0; color: var(--gray-700); }
