/* ==========================================================
   font-display-fix.css
   - Poppins local (sin Google Fonts)
   - Blindaje tipográfico global
   - Fix bordes / sombras en inputs (desktop + móvil + iOS)
   - Reduce motion / repaints
   ========================================================== */


/* ==========================================================
   1) POPPINS LOCAL (Child theme)
   Rutas esperadas:
   /wp-content/themes/TU-CHILD/font-display-fix.css
   /wp-content/themes/TU-CHILD/fonts/poppins/*.woff2
   ========================================================== */

/* test
html::before{content:"F";position:fixed;top:0;left:0;z-index:999999;background:#000;color:#fff;padding:6px 10px;font-size:12px}
*/

@font-face{
  font-family: 'Poppins';
  src: url('fonts/poppins/Poppins-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: 'Poppins';
  src: url('fonts/poppins/Poppins-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: 'Poppins';
  src: url('fonts/poppins/Poppins-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face{
  font-family: 'Poppins';
  src: url('fonts/poppins/Poppins-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================
   2) BLINDAJE GLOBAL DE TIPOGRAFÍA
   Evita que Phlox / Elementor / plugins cambien la fuente
   ========================================================== */

html,
body{
  font-family: 'Poppins',
               -apple-system,
               BlinkMacSystemFont,
               'Segoe UI',
               Roboto,
               Arial,
               sans-serif !important;
}

/* Formularios heredan SIEMPRE */
input,
textarea,
button,
select{
  font-family: inherit !important;
}

body::before{
  background-image: none !important;
}

/* ==========================================================
   3) FIX DEFINITIVO: BORDES / SOMBRAS EN INPUTS
   (desktop + Android + iOS)
   ========================================================== */

input:focus,
textarea:focus,
select:focus,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Safari / iOS: SOLO el buscador bpress (no rompe WP/otros) */
input[type="search"][class^="bpress-search-field"],
input[class^="bpress-search-field"][type="search"]{
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  background-color: transparent !important;
}

/* Quita decoraciones nativas SOLO en ese input */
input[type="search"][class^="bpress-search-field"]::-webkit-search-decoration,
input[type="search"][class^="bpress-search-field"]::-webkit-search-cancel-button,
input[type="search"][class^="bpress-search-field"]::-webkit-search-results-button,
input[type="search"][class^="bpress-search-field"]::-webkit-search-results-decoration{
  -webkit-appearance: none !important;
  display: none !important;
}


/* Sombra interna fantasma (iOS antiguos) */
input:focus, textarea:focus, select:focus,
input:focus-visible, textarea:focus-visible, select:focus-visible{
  -webkit-box-shadow: none !important;
}


/* ==========================================================
   4) Reduce repaints / motion (seguro)
   ========================================================== */

/* Elementor SVG icons: no animar fill/stroke */
.elementor-icon-list-icon .e-font-icon-svg,
.elementor-icon .e-font-icon-svg,
.elementor-icon-list-icon svg,
.elementor-icon svg{
  transition: none !important;
  animation: none !important;
}

/* Auxin / Phlox toggles y acordeones */
.aux-toggle-item,
.aux-toggle-header,
.aux-toggle-content{
  transition-property: transform, opacity !important;
  transition-duration: .15s !important;
  transition-timing-function: ease !important;
}

/* Botones Auxin */
a.aux-button,
.aux-button,
.elementor a.aux-button{
  transition-property: transform, opacity !important;
  transition-duration: .15s !important;
  transition-timing-function: ease !important;
}

/* Hover ligero */
a.aux-button:hover,
.aux-toggle-item:hover{
  transform: translateY(-1px);
}


/* ==========================================================
   5) Accesibilidad: prefers-reduced-motion
   ========================================================== */
@media (prefers-reduced-motion: reduce){
  html { scroll-behavior: auto !important; }

  .elementor-icon svg,
  .e-font-icon-svg,
  .aux-toggle-item,
  .aux-toggle-header,
  .aux-toggle-content,
  .aux-button,
  a.aux-button{
    animation: none !important;
  }
}





/* ==========================================================
   BLINDAJE FINAL ANTI-SOBRESCRITURA (Phlox/Elementor/plugins)
   - Evita que al final de carga te cambien la fuente
   ========================================================== */

/* 1) Cuerpo */
body,
html body{
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* 2) Contenedores típicos de Phlox/Auxin y Elementor */
.aux-body,
.aux-content,
.aux-wrapper,
.elementor,
.elementor *{
  font-family: inherit !important;
}

/* 3) Tipografías en títulos y textos comunes */
/* Solo dentro del contenido (Phlox + Elementor), no global */
.aux-body h1, .aux-body h2, .aux-body h3, .aux-body h4, .aux-body h5, .aux-body h6,
.aux-body p, .aux-body span, .aux-body a, .aux-body li, .aux-body strong, .aux-body em, .aux-body small, .aux-body label,
.elementor h1, .elementor h2, .elementor h3, .elementor h4, .elementor h5, .elementor h6,
.elementor p, .elementor span, .elementor a, .elementor li, .elementor strong, .elementor em, .elementor small, .elementor label{
  font-family: inherit !important;
}


