/* ===========================================================
   TECCIA Inmobiliaria · Simulación WhatsApp
   Tema: Dark · WhatsApp-style · Mobile-first
   =========================================================== */

:root {
  --bg-app: #0b141a;
  --bg-page: #050709;
  --bg-header: #202c33;
  --bg-chat: #0b141a;
  --bg-input: #202c33;
  --bg-bubble-out: #005c4b;
  --bg-bubble-in: #202c33;
  --bg-card: #1f2a30;
  --bg-card-hover: #283541;
  --bg-quick: #182229;

  --text-primary: #e9edef;
  --text-secondary: #8696a0;
  --text-mute: #667781;
  --text-on-accent: #04111a;
  --text-accent: #00a884;

  --line: #313d45;
  --line-soft: #2a3942;

  --accent: #00a884;
  --accent-bright: #25d366;
  --accent-2: #53bdeb;
  --warn: #ffb547;
  --err: #ff5d6c;
  --info: #6ea8ff;

  --radius-bubble: 16px;
  --radius-card: 16px;
  --radius-btn: 99px;
  --radius: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-app);
  font-family: var(--font);
  color: var(--text-primary);
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

html { background: var(--bg-app); }
body { overflow: hidden; }

body {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 25% 25%, rgba(0,168,132,0.04), transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(83,189,235,0.04), transparent 50%);
}

button, input, select, textarea { font-family: inherit; }
img { display: block; }

/* ===========================================================
   APP SHELL — phone frame on desktop, fullscreen on mobile
   =========================================================== */
.app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.phone {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-top: calc(58px + env(safe-area-inset-top, 0px));   /* reserva la barra fija */
}

@media (min-width: 540px) {
  .app { padding: 24px; }
  .phone {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    max-height: 900px;
    border-radius: 18px;
    border: 1px solid #1a1f24;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }
}

/* ===========================================================
   BRAND BAR — logo chatprop, fija arriba (1/3 del ancho, centrado)
   =========================================================== */
.brand-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;                 /* FIJA siempre: por encima de ficha / mapa / fotos */
  height: calc(58px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg-header);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.brand-logo {
  width: 50%;                   /* mitad del ancho, centrado */
  height: 38px;
  object-fit: contain;
  display: block;
}

/* ===========================================================
   HEADER
   =========================================================== */
.header {
  background: var(--bg-header);
  padding: 12px 14px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--accent-2);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.back-btn:hover { background: rgba(255,255,255,0.06); }
.back-btn svg { width: 22px; height: 22px; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a884, #005c4b);
  display: grid;
  place-items: center;
  color: #04111a;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  position: relative;
}
.avatar::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  background: var(--accent-bright);
  border: 2px solid var(--bg-header);
  border-radius: 50%;
}

.header-info { flex: 1; min-width: 0; }
.header-info .name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.header-info .status {
  font-size: 12.5px;
  color: var(--accent-2);
  margin-top: 2px;
}

.header-actions { display: flex; gap: 4px; }
.header-actions button {
  background: transparent;
  border: none;
  color: var(--accent-2);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.header-actions button:hover { background: rgba(255,255,255,0.06); }
.header-actions svg { width: 20px; height: 20px; }

/* ===========================================================
   CHAT AREA
   =========================================================== */
.chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px 8px;
  background-color: var(--bg-chat);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M40 30 L42 38 L50 40 L42 42 L40 50 L38 42 L30 40 L38 38 z'/%3E%3Cpath d='M15 15 L17 19 L21 20 L17 21 L15 25 L13 21 L9 20 L13 19 z'/%3E%3Cpath d='M60 60 L62 64 L66 65 L62 66 L60 70 L58 66 L54 65 L58 64 z'/%3E%3Ccircle cx='65' cy='15' r='1.5'/%3E%3Ccircle cx='15' cy='65' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chat::-webkit-scrollbar { width: 6px; }
.chat::-webkit-scrollbar-track { background: transparent; }
.chat::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.date-divider {
  text-align: center;
  margin: 8px 0 16px;
}
.date-divider span {
  background: rgba(32,44,51,0.92);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ===========================================================
   MESSAGE BUBBLES
   =========================================================== */
.bubble {
  max-width: 85%;
  margin-bottom: 4px;
  display: flex;
  animation: bubbleIn 0.25s ease-out;
}

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

.bubble.in  { justify-content: flex-start; }
.bubble.out { justify-content: flex-end; }

.bubble .msg {
  position: relative;
  padding: 8px 10px 6px;
  border-radius: var(--radius-bubble);
  font-size: 14.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.bubble.in .msg {
  background: var(--bg-bubble-in);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}
.bubble.out .msg {
  background: var(--bg-bubble-out);
  color: var(--text-primary);
  border-top-right-radius: 4px;
}

.bubble.in .msg::before,
.bubble.out .msg::before {
  content: '';
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
}
.bubble.in .msg::before {
  left: -10px;
  background: var(--bg-bubble-in);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.bubble.out .msg::before {
  right: -10px;
  background: var(--bg-bubble-out);
  clip-path: polygon(0 0, 0 100%, 100% 0);
}

.bubble .meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--text-secondary);
}
.bubble.out .meta { color: rgba(232,237,239,0.65); }
.bubble .meta .ticks { font-size: 13px; color: var(--accent-2); letter-spacing: -2px; }

.bubble .msg strong { font-weight: 600; }
.bubble .msg em { font-style: italic; color: var(--text-secondary); }

/* Property reference adjunta al bubble outgoing (estilo WhatsApp reply context) */
.prop-ref {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  border-left: 3px solid var(--accent-bright);
}
.prop-ref-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0e1a20;
}
.prop-ref-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prop-ref-info {
  flex: 1;
  min-width: 0;
}
.prop-ref-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-ref-loc {
  font-size: 11.5px;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
}
.prop-ref-price {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-bright);
  margin-top: 2px;
}

/* ===========================================================
   PHOTO BUBBLE (estilo WhatsApp "compartir imagen")
   - imagen full-width como bubble saliente
   - caption themed abajo (reserva/contacto)
   =========================================================== */
.photo-bubble {
  max-width: 80%;
  margin-bottom: 4px;
  display: flex;
  justify-content: flex-end;
  animation: bubbleIn 0.25s ease-out;
}
.photo-bubble .msg {
  padding: 0;
  background: var(--bg-bubble-out);
  border-radius: var(--radius-bubble);
  border-top-right-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  position: relative;
  width: 100%;
}
.photo-bubble .msg::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10px;
  width: 12px;
  height: 12px;
  background: var(--bg-bubble-out);
  clip-path: polygon(0 0, 0 100%, 100% 0);
  z-index: 2;
}
.photo-bubble .photo-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: #0e1a20;
  display: block;
  object-fit: cover;
  cursor: pointer;
}
.photo-bubble .photo-caption {
  padding: 10px 12px 4px;
}
.photo-bubble .photo-caption .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.photo-bubble .photo-caption .prop-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.3;
}
.photo-bubble .photo-caption .prop-meta {
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.photo-bubble .photo-caption .prop-meta .dot { opacity: 0.5; }
.photo-bubble .photo-caption .prop-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-bright);
  margin-top: 6px;
}
.photo-bubble .meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 12px 6px;
  font-size: 10.5px;
  color: rgba(232,237,239,0.65);
}
.photo-bubble .meta .ticks {
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: -2px;
}

/* ===========================================================
   QUICK REPLIES
   =========================================================== */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 4px;
  max-width: 85%;
}

.chip {
  background: var(--bg-quick);
  border: 1px solid var(--accent);
  color: var(--accent-2);
  padding: 9px 14px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.chip:hover { background: rgba(0,168,132,0.18); }
.chip:active { transform: scale(0.97); }
.chip.full { width: 100%; justify-content: space-between; }

/* ===========================================================
   PROPERTY CARD — hero photo + body + actions footer
   =========================================================== */
.prop-card {
  max-width: 92%;
  margin: 6px 0;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: bubbleIn 0.3s ease-out;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
}

.prop-card .gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #0e1a20;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.prop-card .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
  pointer-events: none;
}
.prop-card:hover .gallery img { transform: scale(1.04); }

.prop-card .gallery .badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.prop-card .gallery .badge.usd { background: rgba(37,211,102,0.95); color: #04140d; }
.prop-card .gallery .badge.ars { background: rgba(83,189,235,0.95); color: #04111a; }
.prop-card .gallery .badge.featured {
  background: linear-gradient(135deg, #ffb547, #ff8a00);
  color: #04111a;
}
.prop-card .gallery .badge.temp {
  background: linear-gradient(135deg, #ff5d6c, #d63d4d);
  color: white;
}

.prop-card .gallery .fav {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.1s;
  z-index: 5;
}
.prop-card .gallery .fav:hover { background: rgba(0,0,0,0.7); }
.prop-card .gallery .fav:active { transform: scale(0.92); }
.prop-card .gallery .fav.active { color: var(--err); }
.prop-card .gallery .fav.active svg { fill: var(--err); }
.prop-card .gallery .fav svg { width: 18px; height: 18px; transition: fill 0.15s; }

.prop-card .gallery .counter {
  position: absolute;
  bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
}
.prop-card .gallery .counter svg { width: 11px; height: 11px; }

.prop-card .gallery .zoom-hint {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  color: white;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.prop-card .gallery:hover .zoom-hint { opacity: 1; }

/* Body */
.prop-card .body {
  padding: 14px 14px 4px;
  cursor: pointer;
}
.prop-card .title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 4px;
}
.prop-card .location {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.prop-card .location svg { width: 13px; height: 13px; opacity: 0.7; flex-shrink: 0; }

.prop-card .specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.prop-card .specs span {
  background: rgba(255,255,255,0.06);
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.prop-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.prop-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
}
.prop-card .price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}
.prop-card .expensas {
  font-size: 11.5px;
  color: var(--text-mute);
  margin-bottom: 8px;
}

/* Secondary actions row (small icons) */
.prop-card .secondary-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
}
.prop-card .secondary-actions button {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px;
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.15s;
}
.prop-card .secondary-actions button:hover { background: rgba(255,255,255,0.1); }
.prop-card .secondary-actions button svg { width: 13px; height: 13px; }

/* ===========================================================
   PRIMARY ACTION BAR (full-width footer del card)
   =========================================================== */
.prop-card .primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s;
}
.prop-card .primary-action:hover { filter: brightness(1.08); }
.prop-card .primary-action:active { filter: brightness(0.95); }
.prop-card .primary-action svg { width: 17px; height: 17px; }
.prop-card .primary-action .sep {
  width: 1px;
  height: 18px;
  background: rgba(0,0,0,0.2);
}

/* ===========================================================
   PHOTO VIEWER — slide-up fullscreen image viewer
   =========================================================== */
.photo-viewer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  touch-action: none;
}
.photo-viewer.open { transform: translateY(0); }

.photo-viewer .viewer-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent);
}
.photo-viewer .viewer-top .counter {
  color: white;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0,0,0,0.45);
  padding: 5px 12px;
  border-radius: 99px;
}
.photo-viewer .viewer-top .close-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.photo-viewer .viewer-top .close-btn:hover { background: rgba(255,255,255,0.25); }
.photo-viewer .viewer-top .close-btn svg { width: 22px; height: 22px; }

.photo-viewer .viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.photo-viewer .viewer-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
}
.photo-viewer .viewer-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-viewer .viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-viewer .viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}
.photo-viewer .viewer-nav:hover { background: rgba(255,255,255,0.3); }
.photo-viewer .viewer-nav.prev { left: 12px; }
.photo-viewer .viewer-nav.next { right: 12px; }
.photo-viewer .viewer-nav svg { width: 22px; height: 22px; }

.photo-viewer .viewer-bottom {
  padding: 14px 16px 22px;
  text-align: center;
  background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
}
.photo-viewer .viewer-bottom .title {
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.photo-viewer .viewer-bottom .sub {
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  margin-bottom: 12px;
}
.photo-viewer .viewer-bottom .dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.photo-viewer .viewer-bottom .dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.15s, transform 0.15s;
}
.photo-viewer .viewer-bottom .dots span.active {
  background: var(--accent-bright);
  transform: scale(1.3);
}

/* ===========================================================
   SCHEDULE CARD (Flow de reserva de visita)
   =========================================================== */
.schedule-card {
  max-width: 92%;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 6px 0;
  animation: bubbleIn 0.3s ease-out;
}
.schedule-card .head {
  background: linear-gradient(135deg, var(--accent), #005c4b);
  padding: 14px 16px;
  color: var(--text-on-accent);
}
.schedule-card .head .h-title { font-size: 16px; font-weight: 700; }
.schedule-card .head .h-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }

.schedule-card .body { padding: 14px; }
.schedule-card .body p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.schedule-card .body p strong { color: var(--text-primary); }

.schedule-card .slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.schedule-card .slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border 0.15s;
}
.schedule-card .slot:hover {
  background: rgba(0,168,132,0.12);
  border-color: var(--accent);
}
.schedule-card .slot.selected {
  background: rgba(0,168,132,0.18);
  border-color: var(--accent);
}
.schedule-card .slot .day {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 38px;
  text-align: center;
}
.schedule-card .slot .day small {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
}
.schedule-card .slot .info { flex: 1; }
.schedule-card .slot .time { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.schedule-card .slot .avail { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }

.schedule-card .confirm-btn {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s;
  font-family: inherit;
}
.schedule-card .confirm-btn:hover { filter: brightness(1.1); }
.schedule-card .confirm-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===========================================================
   DETAIL VIEW — full-screen property detail
   =========================================================== */
.detail {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.detail.open { transform: translateY(0); }

.detail .hero {
  position: relative;
  aspect-ratio: 16/10;            /* altura "100%" por defecto; el JS la reduce hasta 50% al scrollear */
  background: #0e1a20;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: height 0.2s ease-out;   /* encogido suave (sin saltos) */
  will-change: height;
}
.detail .hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.detail .hero:hover img { transform: scale(1.04); }
.detail .hero .close-btn {
  position: absolute;
  top: 14px; left: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
}
.detail .hero .close-btn:hover { background: rgba(0,0,0,0.75); }
.detail .hero .close-btn svg { width: 20px; height: 20px; }
.detail .hero .fav {
  position: absolute;
  top: 14px; right: 14px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
}
.detail .hero .fav.active { color: var(--err); }
.detail .hero .fav.active svg { fill: var(--err); }
.detail .hero .fav svg { width: 22px; height: 22px; }
.detail .hero .nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
}
.detail .hero .nav.prev { left: 12px; }
.detail .hero .nav.next { right: 12px; }
.detail .hero .nav svg { width: 20px; height: 20px; }
.detail .hero .counter {
  position: absolute;
  bottom: 14px; right: 14px;
  background: rgba(0,0,0,0.55);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: white;
}
.detail .hero .zoom {
  position: absolute;
  bottom: 14px; left: 14px;
  background: rgba(0,0,0,0.55);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail .hero .zoom svg { width: 12px; height: 12px; }

.detail .scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.detail .header-info-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.detail h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  flex: 1;
}
.detail .fav-inline {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}
.detail .fav-inline.active { color: var(--err); }
.detail .fav-inline.active svg { fill: var(--err); }
.detail .fav-inline svg { width: 24px; height: 24px; }

.detail .sub {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.detail .sub svg { width: 13px; height: 13px; }

.detail .price-block {
  background: linear-gradient(135deg, rgba(0,168,132,0.18), rgba(0,168,132,0.06));
  border: 1px solid rgba(0,168,132,0.3);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.detail .big-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-bright);
  letter-spacing: -0.02em;
  line-height: 1;
}
.detail .big-price small { font-size: 16px; font-weight: 500; color: var(--text-secondary); margin-left: 4px; }
.detail .price-note {
  color: var(--text-mute);
  font-size: 12.5px;
  margin-top: 4px;
}

.detail .specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.detail .specs .item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}
.detail .specs .item .icon { font-size: 22px; margin-bottom: 4px; }
.detail .specs .item .label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.detail .specs .item .value { font-size: 13px; font-weight: 700; margin-top: 3px; }

.detail .section {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.detail .section:last-child { border-bottom: none; padding-bottom: 0; }
.detail .section h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail .section .desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.detail .section .row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.detail .section .row:last-child { border-bottom: none; }
.detail .section .row .label { color: var(--text-secondary); }
.detail .section .row .value { font-weight: 600; color: var(--text-primary); }

.detail .features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail .features span {
  background: rgba(0,168,132,0.12);
  color: var(--accent-bright);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
}

.detail .agent {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.detail .agent .ava {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a884, #005c4b);
  display: grid; place-items: center;
  color: #04111a;
  font-weight: 800;
  font-size: 17px;
  flex-shrink: 0;
}
.detail .agent .ai { flex: 1; min-width: 0; }
.detail .agent .name { font-size: 14px; font-weight: 700; }
.detail .agent .role { font-size: 12px; color: var(--text-secondary); }
.detail .agent .call-btn {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.detail .agent .call-btn:hover { filter: brightness(1.1); }

.detail .cta-bar {
  position: sticky;
  bottom: 0;
  background: rgba(15, 20, 36, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.detail .cta-bar .btn {
  padding: 11px 6px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}
.detail .cta-bar .btn svg { width: 16px; height: 16px; }
.detail .cta-bar .primary { background: var(--accent); color: var(--text-on-accent); }
.detail .cta-bar .secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
}
.detail .cta-bar .map { background: var(--accent-bright); color: var(--text-on-accent); }

/* ===========================================================
   MAP SHEET — mapa real full-screen (slide-up)
   =========================================================== */
.map-sheet {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.map-sheet.open { transform: translateY(0); }
.map-sheet .map-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--bg-header);
  border-bottom: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.map-sheet .map-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text-primary); }
.map-sheet .map-title svg { width: 18px; height: 18px; color: var(--accent); }
.map-close {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  border-radius: 99px; padding: 8px 14px;
  font-weight: 600; font-size: 14px; cursor: pointer;
}
.map-close svg { width: 18px; height: 18px; }
.map-frame { flex: 1; position: relative; background: #0e1a20; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-dir {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--text-on-accent);
  border: none; border-radius: 99px; padding: 14px 22px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  z-index: 2;
}
.map-dir svg { width: 20px; height: 20px; }

/* La barra de marca queda fija arriba: las ventanas full-screen arrancan debajo */
.detail,
.photo-viewer,
.map-sheet { top: calc(58px + env(safe-area-inset-top, 0px)); }

/* ===========================================================
   ORBE (voz de ORUS) — full-screen, sube desde abajo
   =========================================================== */
.orb-sheet {
  position: fixed;
  inset: 0;
  z-index: 700;                 /* inmersivo: por encima de todo, incluso la barra de marca */
  background: #0b1022;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.orb-sheet.open { transform: translateY(0); }
.orb-sheet iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.orb-close {
  position: absolute;
  z-index: 2;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.orb-close svg { width: 22px; height: 22px; }
.orb-hint {
  position: absolute;
  z-index: 2;
  left: 0; right: 0;
  bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* ===========================================================
   INPUT BAR
   =========================================================== */
.input-bar {
  background: var(--bg-header);
  padding: 8px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.input-bar .icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.input-bar .icon-btn:hover { color: var(--accent-2); }
.input-bar .icon-btn svg { width: 22px; height: 22px; }

.input-bar .input-wrap {
  flex: 1;
  background: var(--bg-input);
  border-radius: 99px;
  display: flex;
  align-items: center;
  padding: 0 4px 0 16px;
  min-height: 42px;
}
.input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  padding: 11px 0;
  min-width: 0;
}
.input-bar input::placeholder { color: var(--text-mute); }
.input-bar .emoji-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.input-bar .emoji-btn svg { width: 22px; height: 22px; }

.send-btn {
  background: var(--accent);
  border: none;
  color: var(--text-on-accent);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
}
.send-btn:hover { filter: brightness(1.1); }
.send-btn:active { transform: scale(0.92); }
.send-btn svg { width: 20px; height: 20px; }

/* ===========================================================
   TYPING INDICATOR
   =========================================================== */
.typing {
  background: var(--bg-bubble-in);
  padding: 12px 16px;
  border-radius: var(--radius-bubble);
  border-top-left-radius: 4px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}
.typing span {
  width: 7px; height: 7px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ===========================================================
   UTILS
   =========================================================== */
.spacer { height: 4px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===========================================================
   VOICE BAR — Fase 1 (UI + stubs)
   Debajo del input-bar: micrófono (izq) + parlante (der)
   =========================================================== */
.voice-bar {
  background: var(--bg-header);
  padding: 10px 14px;
  /* Mínimo garantizado (36px) aunque el navegador del celular reporte
     safe-area-inset-bottom = 0, para que la barra del browser no tape
     los botones Voz/Leer. En iOS suma el inset real del home indicator. */
  padding-bottom: max(36px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}

/* corazon: boton de favoritos (entre Voz y Leer) */
.fav-btn {
  align-self: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-quick, rgba(255,255,255,0.06));
  border: 0.5px solid var(--line, rgba(255,255,255,0.1));
  color: #ff5d6c;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.fav-btn:hover { background: rgba(255,93,108,0.12); }
.fav-btn:active { transform: scale(0.92); }
.fav-btn svg { width: 26px; height: 26px; }

/* ===========================================================
   MIS FAVORITOS — hoja deslizante
   =========================================================== */
.fav-sheet {
  position: fixed;
  inset: 0;
  top: calc(58px + env(safe-area-inset-top, 0px));
  z-index: 320;
  background: var(--bg-app, #0b141a);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex; flex-direction: column;
}
.fav-sheet.open { transform: translateY(0); }
.fav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px;
  background: var(--bg-header, #1f2c34);
  border-bottom: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.fav-title { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 16px; color: var(--text-primary, #e9edef); }
.fav-title svg { width: 20px; height: 20px; color: #ff5d6c; }
.fav-close {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary, #e9edef); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fav-close svg { width: 20px; height: 20px; }
.fav-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.fav-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card, #1f2c34); border: 0.5px solid var(--line-soft, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 8px; cursor: pointer;
}
.fav-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #0e1a20; }
.fav-item .info { flex: 1; min-width: 0; }
.fav-item .t { font-size: 13.5px; font-weight: 500; color: var(--text-primary, #e9edef); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item .m { font-size: 11.5px; color: var(--text-secondary, #8696a0); margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item .p { font-size: 13px; font-weight: 500; color: var(--accent, #00a884); }
.fav-remove {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,93,108,0.12); border: none; color: #ff5d6c;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fav-remove svg { width: 20px; height: 20px; }
.fav-empty { text-align: center; color: var(--text-secondary, #8696a0); font-size: 14px; padding: 48px 24px; line-height: 1.6; }

/* ===========================================================
   PWA · A2HS "Agregá chatprop a tu inicio"
   =========================================================== */
.a2hs-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.a2hs-overlay.open { opacity: 1; pointer-events: auto; }
.a2hs-sheet {
  width: 100%;
  background: var(--bg-header, #202c33);
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.a2hs-overlay.open .a2hs-sheet { transform: translateY(0); }
.a2hs-grip { width: 42px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.18); margin: 0 auto 16px; }
.a2hs-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.a2hs-icon { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; box-shadow: 0 8px 24px rgba(0,168,132,0.3); object-fit: cover; background: #0e1a20; }
.a2hs-title { font-weight: 700; font-size: 17px; color: var(--text-primary, #e9edef); }
.a2hs-title2 { font-weight: 700; font-size: 16px; color: var(--text-primary, #e9edef); margin-bottom: 12px; }
.a2hs-sub { font-size: 13px; color: var(--text-secondary, #8696a0); margin-top: 3px; line-height: 1.4; }
.a2hs-instr { font-size: 14px; color: var(--text-primary, #e9edef); line-height: 1.7; margin-bottom: 18px; }
.a2hs-actions { display: flex; gap: 10px; }
.a2hs-btn { font-weight: 600; font-size: 14px; padding: 13px; border-radius: 12px; cursor: pointer; border: none; transition: transform 0.1s; }
.a2hs-btn:active { transform: scale(0.97); }
.a2hs-btn.ghost { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,0.14); color: var(--text-secondary, #8696a0); }
.a2hs-btn.primary { flex: 1.4; background: linear-gradient(135deg, var(--accent, #00a884), var(--accent-bright, #25d366)); color: #04121b; }
.a2hs-btn.full { width: 100%; }

.voice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 8px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  min-height: 68px;
  transition: background 0.15s, border 0.15s, transform 0.08s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.voice-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.voice-btn:active { transform: scale(0.97); }

.voice-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.voice-btn:disabled:hover { background: rgba(255,255,255,0.06); }
.voice-btn:disabled:active { transform: none; }

.voice-btn .voice-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.voice-btn .voice-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  line-height: 1;
}

.voice-btn .voice-recording-icon {
  width: 18px;
  height: 18px;
  display: none;
}

/* ── Mic button states ──────────────────────────── */
.voice-btn.mic-btn.recording {
  background: rgba(255, 93, 108, 0.18);
  border-color: var(--err);
  color: var(--err);
  animation: micPulse 1.4s ease-in-out infinite;
}
.voice-btn.mic-btn.recording .voice-label { color: var(--err); }
.voice-btn.mic-btn.recording .voice-icon { display: none; }
.voice-btn.mic-btn.recording .voice-recording-icon {
  display: block;
  animation: recordingDot 0.9s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 93, 108, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(255, 93, 108, 0); }
}

@keyframes recordingDot {
  0%, 100% { transform: scale(0.85); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ── Speaker button states ──────────────────────── */
.voice-btn.speaker-btn:not(:disabled) {
  background: rgba(0, 168, 132, 0.1);
  border-color: rgba(0, 168, 132, 0.35);
  color: var(--accent-bright);
}
.voice-btn.speaker-btn:not(:disabled) .voice-label { color: var(--accent-bright); }

.voice-btn.speaker-btn.speaking {
  background: rgba(0, 168, 132, 0.22);
  border-color: var(--accent);
  animation: speakerPulse 1.2s ease-in-out infinite;
}
.voice-btn.speaker-btn.speaking .speaker-wave {
  transform-origin: 11px 12px;
}
.voice-btn.speaker-btn.speaking .wave-1 {
  animation: wavePulse 1.2s ease-in-out infinite;
}
.voice-btn.speaker-btn.speaking .wave-2 {
  animation: wavePulse 1.2s ease-in-out infinite 0.2s;
}

@keyframes speakerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(0, 168, 132, 0); }
}

@keyframes wavePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}