/* Buscador v3, ronda 12: la barra de anuncios propia (layouts/_v3-ads.php, AdsAnnouncement). Sólo se carga con el flag
   mt5_search_v3_enabled y si la página tiene un anuncio.

   - Banda (.mt5v3-ad--band): en el flujo, ≤ 56 px, fondo durazno claro, botón secundario durazno, × para cerrarla 7 días.
     Nunca flota ni tapa nada; nunca naranja pleno (el primario es el de la pantalla).
   - Columna (.mt5v3-ads): a la derecha de los resultados del buscador, desde 1320 px (más angosto, la tarjeta de dos
     columnas y el pie de la agenda no entran: medido a 1280, 1366 y 1440).
   - La app: botón a la tienda del teléfono o, en la computadora, los dos badges y el QR (js/ads-v3.js pone data-plat).
   Los tokens son los de la v3 (--v3-*) con su valor por defecto: Mis turnos y el detalle no están dentro de .mt5v3. En el
   micrositio, el color del centro (SearchCardV3::brandTokens sobre .mt5v3-ad--micro). */
.mt5v3-ad, .mt5v3-ads {
  --ad-soft: var(--v3-soft, #FFF2E7);
  --ad-peach: var(--v3-peach, #FFE7D1);
  --ad-peach-2: var(--v3-peach-2, #FFD9B8);
  --ad-link: var(--v3-link, #D86100);
  --ad-ink: var(--v3-ink, #231F1D);
  --ad-ink-2: var(--v3-ink-2, #3F3835);
  --ad-ink-3: var(--v3-ink-3, #6E6560);
  font-family: var(--v3-font, Nunito, "Nunito Regular", "Segoe UI", system-ui, sans-serif);
  color: var(--ad-ink);
}
.mt5v3-ad *, .mt5v3-ads *, .mt5v3-ad *::before, .mt5v3-ad *::after { box-sizing: border-box; }
.mt5v3-ad[hidden] { display: none !important; }

/* ---------- Banda ---------- */
.mt5v3-ad--band { position: relative; display: flex; align-items: center; gap: 8px; box-sizing: border-box; min-height: 48px; max-height: 56px; margin: 0; padding: 4px 2px 4px 12px; background: var(--ad-soft); border-radius: 14px; }
.mt5v3-ad-ic { flex: none; display: none; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--ad-link); }
.mt5v3-ad-ic img { display: block; border-radius: 9px; }
.mt5v3-ad-ia { display: inline-flex; }
.mt5v3-ad-ia img { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ad-soft); }
.mt5v3-ad-ia img + img { margin-left: -6px; }
.mt5v3-ad-tx { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 16px; color: var(--ad-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Celular: el beneficio solo (la barra mide 56 como mucho); el título queda para los lectores de pantalla. */
.mt5v3-ad-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt5v3-ad-go { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.mt5v3-ad-btn { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--ad-peach); color: var(--ad-link) !important; font-weight: 800; font-size: 13.5px; line-height: 1; text-decoration: none !important; white-space: nowrap; }
.mt5v3-ad-btn::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.mt5v3-ad-btn:hover, .mt5v3-ad-btn:focus-visible { background: var(--ad-peach-2); }
.mt5v3-ad-btn:focus-visible, .mt5v3-ad-x:focus-visible, .mt5v3-ad-qr summary:focus-visible { outline: 2px solid var(--ad-link); outline-offset: 2px; }
.mt5v3-ad-x { flex: none; display: grid; place-items: center; width: 32px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ad-ink-3); cursor: pointer; }
.mt5v3-ad-x:hover { color: var(--ad-ink); }

/* La app según la plataforma (js/ads-v3.js pone data-plat; sin JS decide el ancho). */
.mt5v3-ad-pc { display: none; align-items: center; gap: 8px; }
.mt5v3-ad--app[data-plat="pc"] .mt5v3-ad-phone { display: none; }
.mt5v3-ad--app[data-plat="pc"] .mt5v3-ad-pc { display: flex; }
.mt5v3-ad--app[data-plat="android"] .mt5v3-ad-pc, .mt5v3-ad--app[data-plat="ios"] .mt5v3-ad-pc { display: none !important; }
/* Celular (< 640 px): siempre el botón (una computadora con la ventana angosta va a Google Play; los badges no entran). */
@media (max-width: 639.98px) {
  .mt5v3-ad--band.mt5v3-ad--app .mt5v3-ad-pc { display: none !important; }
  .mt5v3-ad--band.mt5v3-ad--app .mt5v3-ad-phone { display: inline-flex !important; }
}
.mt5v3-ad-badge { display: block; flex: none; line-height: 0; }
.mt5v3-ad-gp { height: 40px; width: auto; margin: -4px -4px; }
.mt5v3-ad-as { height: 32px; width: auto; }
.mt5v3-ad-qr { position: relative; }
.mt5v3-ad-qr summary { list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 12px; color: var(--ad-link); font-weight: 800; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.mt5v3-ad-qr summary::-webkit-details-marker { display: none; }
.mt5v3-ad-qr summary:hover { background: var(--ad-peach); }
/* El QR se abre sólo si la persona lo pide (como un menú), debajo del botón. */
.mt5v3-ad-qr-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; justify-items: center; gap: 6px; width: 156px; padding: 12px; background: #fff; border-radius: 14px; box-shadow: 0 10px 28px rgba(70, 50, 30, .18); }
.mt5v3-ad-qr-box small { font-size: 12.5px; line-height: 16px; color: var(--ad-ink-3); text-align: center; }

@media (min-width: 640px) {
  .mt5v3-ad--band { padding-left: 10px; gap: 10px; }
  .mt5v3-ad-ic { display: inline-flex; }
  .mt5v3-ad-tx { font-size: 14px; line-height: 18px; -webkit-line-clamp: 2; }
  .mt5v3-ad-t { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; color: var(--ad-ink); font-weight: 800; }
}
@media (min-width: 980px) {
  .mt5v3-ad--app:not([data-plat]) .mt5v3-ad-phone { display: none; }
  .mt5v3-ad--app:not([data-plat]) .mt5v3-ad-pc { display: flex; }
}

/* ---------- Columna del buscador (computadora ancha) ---------- */
.mt5v3-ads { display: none; }
.mt5v3-adc { display: grid; gap: 8px; padding: 14px; text-align: left; background: #fff; border-radius: 16px; border-top: 3px solid var(--ad-peach-2); box-shadow: var(--v3-shadow-card, 0 3px 12px rgba(70, 50, 30, .06)); }
.mt5v3-adc-h { display: flex; align-items: center; gap: 10px; }
.mt5v3-adc-h .mt5v3-ad-ic { display: inline-flex; }
.mt5v3-ads .mt5v3-adc .mt5v3-adc-t { margin: 0; text-align: left; font-size: 16px; line-height: 20px; font-weight: 800; color: var(--ad-ink); }
.mt5v3-adc-tx { margin: 0; font-size: 14px; line-height: 20px; color: var(--ad-ink-2); }
.mt5v3-adc .mt5v3-ad-btn { justify-self: start; }
.mt5v3-adc.mt5v3-ad--app[data-plat="pc"] .mt5v3-ad-pc, .mt5v3-adc.mt5v3-ad--app:not([data-plat]) .mt5v3-ad-pc { display: grid; gap: 10px; }
.mt5v3-adc.mt5v3-ad--app:not([data-plat]) .mt5v3-ad-phone { display: none; }
.mt5v3-adc-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mt5v3-adc-badges .mt5v3-ad-gp { height: 38px; }
.mt5v3-adc-badges .mt5v3-ad-as { height: 30px; }
.mt5v3-adc-qr { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; margin: 0; }
.mt5v3-adc-qr svg { display: block; border-radius: 8px; }
.mt5v3-adc-qr figcaption { font-size: 13px; line-height: 17px; color: var(--ad-ink-3); }

@media (min-width: 1320px) {
  .mt5v3-body.has-ads { grid-template-columns: 264px minmax(0, 1fr) 240px; gap: 24px; }
  /* La principal queda en ~744 px: con la columna de datos un poco más angosta (.7 en vez de .8) la agenda mide ~460 y el
     pie («Avisame» + «Más horarios ›» + «Reservar turno», ~453 px) sigue en una línea, con 6 horas por fila. */
  .mt5v3-body.has-ads .mt5v3-card { grid-template-columns: minmax(0, .7fr) minmax(0, 1.45fr); }
  .mt5v3-ads { display: grid; gap: 12px; align-content: start; align-self: start; position: sticky; top: 132px; }
  .mt5v3-ad--narrow { display: none !important; }
}
.my-turns > .mt5v3-ad--band { margin: 4px 0 0; }
.turn-view > .mt5v3-ad--band { margin: 0 0 8px; }
