/* ============================================================
   WA Mining Index — suppliers.css  (directorio /suppliers/)
   ------------------------------------------------------------
   Tarjetas del registro de proveedores. Requiere theme.css y
   convive con listing.css (que aporta el hero .wmi-ls-*).
   Scoped a body.wmi · prefijo .wmi-sup-*  — la carga SOLO
   suppliers.php vía $wmi_page_css, no toca las otras 22 páginas
   que incluyen listing.css.
   ============================================================ */

/* ---------------- sección del directorio */
body.wmi .wmi-sup-section {
  padding: 44px var(--gutter) 56px;
  border-bottom: 1px solid rgba(212, 160, 23, 0.13);
}
body.wmi .wmi-sup-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
body.wmi .wmi-sup-head-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
body.wmi .wmi-sup-head-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------------- grilla */
body.wmi .wmi-sup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 16px;
  max-width: 1200px;
}

/* ---------------- tarjeta */
body.wmi .wmi-sup-card {
  position: relative;   /* ancla del checkbox fuera de pantalla (.wmi-sup-toggle) */
  display: flex;
  flex-direction: column;
  gap: 13px;
  background: var(--panel);
  border: 1px solid var(--border-2);
  padding: 22px 22px 18px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
body.wmi .wmi-sup-card:hover {
  border-color: var(--border-3);
  background: var(--panel-alt);
}
body.wmi .wmi-sup-card--verified { border-color: var(--accent-55); }
body.wmi .wmi-sup-card--verified:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

/* fila superior: monograma + chip de nivel */
body.wmi .wmi-sup-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
body.wmi .wmi-sup-mono {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--tint-08);
  border: 1px solid var(--accent-33);
}
body.wmi .wmi-sup-card--verified .wmi-sup-mono {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}
body.wmi .wmi-sup-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--border-3);
  color: var(--text-dim);
  background: var(--bg);
}
body.wmi .wmi-sup-chip--verified {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

/* cuerpo */
body.wmi .wmi-sup-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--text);
  margin: 0;
  /* directory-styles.css (legacy, global) fuerza uppercase sobre h1..h6 desnudos:
     sin esto el nombre comercial pierde su casing real. */
  text-transform: none;
}
/* Clamp a 6 lineas (era 3, y cortaba las tres fichas vivas a ~155 de 283-379
   caracteres sin ninguna forma de leer el resto: el free no tiene ficha propia).
   6 lineas entran los 280 del alta; lo que sobra lo abre el desplegable de abajo.
   El clamp sigue existiendo para emparejar alturas de grilla. */
body.wmi .wmi-sup-blurb {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------- desplegable de la descripcion (CSS puro, sin JS)
   checkbox + label hermanos del parrafo: el checkbox NO va con [hidden] sino
   fuera de pantalla, para que siga siendo enfocable con teclado (con [hidden]
   no se puede tabular y el desplegable queda solo para mouse). */
body.wmi .wmi-sup-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body.wmi .wmi-sup-toggle:checked ~ .wmi-sup-blurb {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
body.wmi .wmi-sup-more {
  align-self: flex-start;
  margin-top: -4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}
body.wmi .wmi-sup-more:hover { text-decoration: underline; }
/* el foco vive en el checkbox invisible: se dibuja sobre la etiqueta */
body.wmi .wmi-sup-toggle:focus-visible ~ .wmi-sup-more {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* estados: cerrado muestra "read full description", abierto "show less" */
body.wmi .wmi-sup-more-close { display: none; }
body.wmi .wmi-sup-toggle:checked ~ .wmi-sup-more .wmi-sup-more-open  { display: none; }
body.wmi .wmi-sup-toggle:checked ~ .wmi-sup-more .wmi-sup-more-close { display: inline; }
/* js/suppliers.js retira el desplegable donde el texto entra entero: el [hidden]
   necesita ganarle al display de la etiqueta */
body.wmi .wmi-sup-more[hidden],
body.wmi .wmi-sup-toggle[hidden] { display: none; }

body.wmi .wmi-sup-hubs {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: 0.05em;
  color: var(--accent);
}
body.wmi .wmi-sup-disclosure {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-faint);
}
body.wmi .wmi-sup-disclosure a { color: var(--text-faint); }

/* pie: dominio + CTA. margin-top:auto lo pega abajo → alturas parejas */
body.wmi .wmi-sup-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
body.wmi .wmi-sup-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.wmi .wmi-sup-cta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
body.wmi .wmi-sup-cta:hover { text-decoration: underline; }

/* ---------------- navegación bajo el directorio */
body.wmi .wmi-sup-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px;
  margin-top: 40px;
  max-width: 1200px;
}

@media (max-width: 768px) {
  body.wmi .wmi-sup-section { padding: 32px var(--gutter) 40px; }
  body.wmi .wmi-sup-card { padding: 18px 18px 16px; }
  body.wmi .wmi-sup-domain { max-width: 100%; }
}
