/* ========================================================================
   Conlux Rides — feedback de toque (2026-12-03 ft1)
   Un solo sistema para sitio público, panel del chofer, página del socio
   y login. No cambia textos, precios ni porcentajes.

   - El layout no se mueve: solo transform, filter, color, background-color,
     border-color y box-shadow.
   - :hover solo dentro de @media (hover: hover) and (pointer: fine).
   - :active ~120 ms, escala 0.97 (0.99 en filas/tarjetas grandes).
   - :focus-visible: contorno dorado de 2 px, offset 3 px.
   - -webkit-tap-highlight-color: transparent.
   - prefers-reduced-motion: tono, no escala.

   Transiciones: NUNCA un bloque genérico sobre todos los a/button.
   Se listan clases concretas. Donde ya había transition, se conservan
   los tiempos de esas propiedades (CTA shine, menú, FAQ, hojas del panel).
   ======================================================================== */

:root {
  --cx-press-ms: 120ms;
  --cx-gold: var(--gold-primary, var(--gold, var(--champagne, #c4b18a)));
  --cx-gold-light: var(--gold-light, var(--gold-2, var(--champagne-light, #efe6d4)));
  --cx-gold-hover: var(--gold-hover, var(--champagne-soft, #d4c08c));
  --cx-gold-dim: var(--gold-dim, var(--pp-dim, rgba(196, 177, 138, 0.14)));
  --cx-gold-glow: 0 0 0 3px rgba(196, 177, 138, 0.32);
  --cx-press-ease: ease;
  --cx-cta-inner-rest: linear-gradient(180deg, var(--gold-hover, var(--champagne-soft, #d4c08c)) 0%, var(--gold-primary, var(--gold, var(--champagne, #c4b18a))) 55%, var(--champagne-deep, var(--gold-dark, #b89f68)) 100%);
  --cx-cta-inner-hover: linear-gradient(180deg, #ddca98 0%, #ccb98f 55%, #bea672 100%);
  --cx-btn-rest-bg: var(--btn, #161616);
  --cx-btn-rest-color: var(--offwhite, #f3eee4);
  --cx-btn-rest-border: var(--champagne-border, rgba(196, 177, 138, 0.42));
}

/* ---------- Base: sin destello gris de iOS ---------- */
button,
a,
summary,
.faq-summary,
[role="button"],
[role="tab"],
[role="radio"],
[role="link"],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
.select-trigger,
.cx-select-opt,
.filter-pill,
.filter-pill-light,
.trip-type-btn,
.lang-btn,
.lang-switch,
.seg button,
.seg-option,
.tabbar button,
.pp-tabbar button,
.pp-lang button,
.lg-lang button,
.socio-row,
.socio-pay-btn,
.socio-act-btn,
.socio-tab,
.settings-row,
.cuenta-back,
.quick,
.social,
.utility,
.btn,
.pp-btn,
.lg-btn,
.lg-back,
.mobile-menu-toggle,
.mobile-nav-link,
.mobile-call-fab,
.mobile-sticky-book,
.footer-social-btn,
.add-stop-btn,
.stop-remove-btn,
.pf-link-btn,
.pf-recap-edit,
.pf-call-link {
  -webkit-tap-highlight-color: transparent;
}

/* Transiciones acotadas a clases. No se toca:
   .cta-download-animated::before (brillo),
   .faq-answer-wrap / .faq-answer-body / .faq-toggle-icon (acordeón),
   .mobile-nav-drawer / .mobile-dock (menú y barra),
   .cuenta-pane / .cuenta-list / .day-sheet / .pp-sheet (hojas).
   .cta-download-animated__inner conserva su transition propia.
   .mobile-sticky-book tiene transition: none !important en el sitio. */
@media (prefers-reduced-motion: no-preference) {
  /* Solo transform/filter en el CTA exterior, para no interferir
     con la animación de brillo (::before) ni con box-shadow del CTA. */
  .cta-download-animated,
  #heroBookCta,
  #submitBookingBtn,
  #pfBookBtn,
  #pfConfirmBtn,
  #reviewSubmitBtn {
    transition:
      transform var(--cx-press-ms) var(--cx-press-ease),
      filter var(--cx-press-ms) var(--cx-press-ease);
  }

  /* Conserva background 0.15s / border-color 0.15s del toggle. */
  .mobile-menu-toggle {
    transition:
      background 0.15s,
      border-color 0.15s,
      transform var(--cx-press-ms) var(--cx-press-ease),
      filter var(--cx-press-ms) var(--cx-press-ease),
      box-shadow var(--cx-press-ms) var(--cx-press-ease),
      color var(--cx-press-ms) var(--cx-press-ease);
  }

  /* Conserva color/border-color 0.2s de los enlaces de nav. */
  .nav-link,
  .footer-nav-links a,
  .footer-legal-links a,
  .footer-contact-val a,
  .footer-brand-link,
  .service-more,
  .service-breadcrumb a,
  .success-edit-link,
  .pf-call-link,
  .pf-recap-edit,
  .pp-logout,
  .pp-pw-open,
  .foot a,
  .utility,
  .phone {
    transition:
      color 0.2s,
      border-color 0.2s,
      filter var(--cx-press-ms) var(--cx-press-ease);
  }

  /* Conserva transform y border-color del sitio en tarjetas. */
  .service-card {
    transition:
      transform 0.2s,
      border-color 0.2s,
      background-color var(--cx-press-ms) var(--cx-press-ease),
      box-shadow var(--cx-press-ms) var(--cx-press-ease);
  }
  .event-card,
  .place-card,
  .review-card,
  .service-related-card {
    transition:
      border-color 0.2s,
      box-shadow 0.2s,
      transform var(--cx-press-ms) var(--cx-press-ease),
      background-color var(--cx-press-ms) var(--cx-press-ease);
  }

  /* Controles que no tenían transition (panel, socio, login, FABs, etc.).
     No se incluye lang-btn / filter-pill / trip-type-btn / btn-secondary-gold /
     btn-event-book / btn-place-book / footer-social-btn / add-stop-btn /
     faq-card: ya tienen transition (a menudo `all`) en el CSS del sitio. */
  .mobile-call-fab,
  .btn-primary,
  .btn-gold-sm,
  .btn-ghost,
  .btn-icon,
  .btn-sm,
  .btn-trip-done,
  .btn-trip-undo,
  .btn-aceptar,
  .btn-rechazar,
  .btn-navegar,
  .btn-contact,
  .btn-next,
  .btn-receipt-view,
  .btn-reason,
  .pp-btn,
  .pp-btn-ghost,
  .pp-menu-btn,
  .pp-menu-item,
  .pp-tabbar button,
  .pp-lang button,
  .pp-seg button,
  .lg-btn,
  .lg-back,
  .lg-lang button,
  .socio-row,
  .socio-pay-btn,
  .socio-act-btn,
  .socio-tab,
  .socio-help-btn,
  .socio-back-link,
  .settings-row,
  .cuenta-back,
  .tabbar button,
  .seg button,
  .seg-option,
  .cotiz-range-btn,
  .client-pill,
  .faq-summary,
  .day-menu-btn,
  .day-sheet-x,
  .quick,
  .social,
  .btn-secondary {
    transition:
      transform var(--cx-press-ms) var(--cx-press-ease),
      filter var(--cx-press-ms) var(--cx-press-ease),
      box-shadow var(--cx-press-ms) var(--cx-press-ease),
      background-color var(--cx-press-ms) var(--cx-press-ease),
      color var(--cx-press-ms) var(--cx-press-ease),
      border-color var(--cx-press-ms) var(--cx-press-ease);
  }
}

/* ---------- 1) Botones primarios dorados ---------- */
.cta-download-animated:active,
#heroBookCta:active,
#submitBookingBtn:active,
#pfBookBtn:active,
#pfConfirmBtn:active,
#reviewSubmitBtn:active,
.mobile-call-fab:active,
.mobile-sticky-book:active,
.btn-primary:active,
.btn-gold-sm:active,
.pp-btn:active:not(.pp-btn-ghost),
.lg-btn:active,
.btn-success-accept:active,
.btn-event-book:active,
.btn-place-book:active,
.btn-success-whatsapp:active,
.btn-next-nav:active,
.btn-aceptar:active {
  transform: scale(0.97);
  filter: brightness(1.07);
  box-shadow: var(--cx-gold-glow);
}

/* ---------- 2) Secundarios / outline ---------- */
.btn-secondary-gold:active,
.btn-review-back:active,
.pp-btn-ghost:active,
.pf-link-btn:active,
.add-stop-btn:active,
.btn-secondary:active,
.btn-ghost:active,
.socio-act-btn:active,
.socio-back-link:active,
.cuenta-back:active,
.lg-back:active,
.btn-rechazar:active,
.btn-receipt-view:active,
.btn-trip-undo:active {
  transform: scale(0.97);
  background-color: var(--cx-gold-dim);
  border-color: var(--cx-gold);
  color: var(--cx-gold-light);
}

/* ---------- 3) Enlaces de texto (nav, footer, legales) ---------- */
.nav-link:active,
.mobile-nav-link:active,
.footer-nav-links a:active,
.footer-legal-links a:active,
.footer-contact-val a:active,
.footer-brand-link:active,
.service-more:active,
.service-breadcrumb a:active,
.success-edit-link:active,
.pf-call-link:active,
.pf-recap-edit:active,
.pp-logout:active,
.pp-pw-open:active,
.foot a:active,
.utility:active,
.phone:active {
  color: var(--cx-gold-light);
  filter: brightness(1.08);
}

/* ---------- 4) Pills, tabs, selector EN/ES, trip type ---------- */
.lang-btn:active,
.pp-lang button:active,
.lg-lang button:active,
.filter-pill:active,
.filter-pill-light:active,
.trip-type-btn:active,
.seg button:active,
.seg-option:active,
.tabbar button:active,
.pp-tabbar button:active,
.socio-tab:active,
.pp-seg button:active,
.client-pill:active,
.cotiz-range-btn:active,
.btn-reason:active {
  transform: scale(0.97);
  background-color: var(--cx-gold-dim);
  color: var(--cx-gold-light);
}
/* El segmento ya seleccionado (dorado sólido) solo se “hunde” un poco */
.lang-btn.active:active,
.pp-lang button.is-on:active,
.pp-lang button.active:active,
.lg-lang button.is-on:active,
.filter-pill.active:active,
.trip-type-btn.active:active,
.seg button.is-active:active,
.tabbar button.is-active:active,
.pp-tabbar button.is-active:active,
.pp-seg button.is-on:active,
.cotiz-range-btn.is-active:active,
.btn-reason.is-on:active {
  filter: brightness(1.06);
  box-shadow: var(--cx-gold-glow);
}

/* ---------- 5) Iconos, menú, FAQ, FABs, sociales ---------- */
.mobile-menu-toggle:active,
.faq-summary:active,
.faq-card:active .faq-summary,
.day-menu-btn:active,
.day-sheet-x:active,
.pp-menu-btn:active,
.pp-menu-item:active,
.stop-remove-btn:active,
.socio-help-btn:active,
.socio-pay-btn:active,
.btn-icon:active {
  transform: scale(0.97);
  background-color: var(--cx-gold-dim);
  color: var(--cx-gold-light);
}

/* Las redes del footer ya tienen :active de marca (FB/IG/TT).
   Solo añadimos la escala, sin pisar el color de marca. */
.footer-social-btn:active {
  transform: scale(0.97);
}
.footer-social-btn--wa:active {
  background: #25d366;
  border-color: #25d366;
  color: #06210d;
}

/* ---------- 6) Filas y tarjetas grandes: escala más suave ---------- */
.settings-row:active,
.socio-row:active,
.service-card:active,
.event-card:active,
.place-card:active,
.review-card:active,
.service-related-card:active,
.pp-sugg button:active {
  transform: scale(0.99);
  background-color: var(--cx-gold-dim);
}

/* ---------- Hover solo con puntero fino (evita hover “pegado” en iPhone) ---------- */
@media (hover: hover) and (pointer: fine) {
  .cta-download-animated:hover .cta-download-animated__inner {
    background: var(--cx-cta-inner-hover);
  }
  .btn-primary:hover,
  .btn-gold-sm:hover,
  .pp-btn:hover:not(.pp-btn-ghost),
  .lg-btn:hover,
  .mobile-call-fab:hover,
  .mobile-sticky-book:hover,
  .btn-event-book:hover,
  .btn-place-book:hover,
  .btn-success-accept:hover {
    filter: brightness(1.06);
  }
  .btn-secondary-gold:hover,
  .pp-btn-ghost:hover,
  .pf-link-btn:hover,
  .add-stop-btn:hover,
  .socio-act-btn:hover,
  .btn-ghost:hover {
    border-color: var(--cx-gold);
    background-color: var(--cx-gold-dim);
    color: #fff;
  }
  .nav-link:hover,
  .footer-nav-links a:hover,
  .footer-legal-links a:hover,
  .footer-contact-val a:hover,
  .service-more:hover,
  .lg-back:hover,
  .pp-logout:hover,
  .pp-pw-open:hover,
  .phone:hover,
  .foot a:hover {
    color: var(--cx-gold-light);
  }
  .lang-btn:hover,
  .pp-lang button:hover,
  .lg-lang button:hover,
  .filter-pill:hover,
  .trip-type-btn:hover,
  .tabbar button:hover,
  .pp-tabbar button:hover,
  .socio-tab:hover,
  .seg button:hover,
  .cotiz-range-btn:hover {
    background-color: var(--cx-gold-dim);
    color: var(--cx-gold-light);
  }
  .mobile-menu-toggle:hover,
  .faq-summary:hover,
  .socio-pay-btn:hover,
  .settings-row:hover,
  .socio-row:hover,
  .pp-menu-btn:hover,
  .pp-menu-item:hover {
    background-color: var(--cx-gold-dim);
  }
}

/* En táctil, anula el :hover “pegado” de las reglas antiguas del sitio.
   Colores vía variables, no fijos. El estado visible al pulsar es :active. */
@media (hover: none), (pointer: coarse) {
  .cta-download-animated:hover:not(:active) .cta-download-animated__inner {
    background: var(--cx-cta-inner-rest);
  }
  .btn-secondary-gold:hover:not(:active) {
    background: var(--cx-btn-rest-bg);
    border-color: var(--cx-btn-rest-border);
    color: var(--cx-btn-rest-color);
  }
}

/* ---------- Focus visible (teclado / accesibilidad) ---------- */
button:focus-visible,
a:focus-visible,
summary:focus-visible,
.faq-summary:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
.lang-btn:focus-visible,
.tabbar button:focus-visible,
.pp-tabbar button:focus-visible,
.pp-btn:focus-visible,
.lg-btn:focus-visible,
.socio-pay-btn:focus-visible,
.socio-act-btn:focus-visible,
.settings-row:focus-visible,
.trip-type-btn:focus-visible,
.filter-pill:focus-visible,
.mobile-menu-toggle:focus-visible,
.mobile-call-fab:focus-visible,
.cta-download-animated:focus-visible,
.btn-secondary-gold:focus-visible,
.btn-primary:focus-visible,
.pf-link-btn:focus-visible,
.pf-call-link:focus-visible,
#pfBookBtn:focus-visible,
#pfConfirmBtn:focus-visible,
#submitBookingBtn:focus-visible {
  outline: 2px solid var(--cx-gold, #c4b18a);
  outline-offset: 3px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Movimiento reducido: tono, no escala ---------- */
@media (prefers-reduced-motion: reduce) {
  .cta-download-animated:active,
  #heroBookCta:active,
  #submitBookingBtn:active,
  #pfBookBtn:active,
  #pfConfirmBtn:active,
  #reviewSubmitBtn:active,
  .mobile-call-fab:active,
  .mobile-sticky-book:active,
  .btn-primary:active,
  .btn-gold-sm:active,
  .pp-btn:active,
  .lg-btn:active,
  .btn-success-accept:active,
  .btn-event-book:active,
  .btn-place-book:active,
  .btn-success-whatsapp:active,
  .btn-secondary-gold:active,
  .btn-review-back:active,
  .pp-btn-ghost:active,
  .pf-link-btn:active,
  .add-stop-btn:active,
  .socio-act-btn:active,
  .lang-btn:active,
  .pp-lang button:active,
  .lg-lang button:active,
  .filter-pill:active,
  .trip-type-btn:active,
  .seg button:active,
  .tabbar button:active,
  .pp-tabbar button:active,
  .socio-tab:active,
  .mobile-menu-toggle:active,
  .faq-summary:active,
  .footer-social-btn:active,
  .socio-pay-btn:active,
  .settings-row:active,
  .socio-row:active,
  .service-card:active,
  .event-card:active,
  .place-card:active {
    transform: none;
    transition: filter 80ms ease, background-color 80ms ease, box-shadow 80ms ease, color 80ms ease, border-color 80ms ease;
  }
}

/* /contacto/: alinea .is-pressed a 120 ms y escala 0.97 (el PHP también se actualiza). */
.btn-primary.is-pressed,
.btn-secondary.is-pressed,
.quick.is-pressed,
.social.is-pressed {
  transform: scale(0.97);
}

/* /contacto/: el press no debe depender solo de .is-pressed */
.quick:active,
.social:active,
.utility:active {
  transform: scale(0.97);
}
.quick-whatsapp:active { background: #25D366; border-color: #25D366; color: #06210d; }
.quick-call:active     { background: #15803d; border-color: #15803d; color: #fff; }
.quick-text:active     { background: #0A84FF; border-color: #0A84FF; color: #fff; }
