/* ============================================================
 * theme.css — TEMA de la guía de REFLEXIÓN DE LA LUZ (capa LIBRE).
 * SOLO estilos del tema (prefijo ref-). NO redefine clases guia-*.
 * Colores de UI con var(--guia-*); hex solo dentro de SVG en theme.js.
 * ============================================================ */

/* ===== Chip de atajo hero ===== */
.ref-atajo {
  display: inline-block;
  margin: 14px 0 4px;
  padding: 10px 16px;
  border: 2px solid var(--guia-navy);
  border-radius: 999px;
  background: var(--guia-cream);
  color: var(--guia-deep);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.ref-atajo:hover { background: var(--guia-navy); color: #fff; }

/* ===== Visuales estáticos ===== */
.ref-visual { margin: 14px 0; text-align: center; }
.ref-svg { width: 100%; max-width: 420px; height: auto; display: inline-block; }

/* ===== Cascarón común de widgets ===== */
.ref-widget {
  margin: 16px 0;
  padding: 16px 14px;
  border: 2px solid var(--guia-line);
  border-radius: 16px;
  background: #fff;
}
.ref-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ref-flag {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--guia-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.ref-inst { font-size: 15px; color: var(--guia-muted); font-weight: 600; line-height: 1.45; }

/* ===== WIDGET ESTRELLA: goniometro interactivo ===== */
.ref-goniobox { text-align: center; }
.ref-gonio-svg { width: 100%; max-width: 400px; height: auto; display: inline-block; touch-action: none; }
.ref-gonio-vals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px;
}
.ref-gval {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--guia-line);
  background: var(--guia-cream);
  text-align: center;
}
.ref-gval .lbl { display: block; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: var(--guia-muted); }
.ref-gval strong { display: block; font-size: 24px; line-height: 1.2; }
.ref-gval.inc strong { color: var(--guia-orange); }
.ref-gval.ref strong { color: var(--guia-navy); }
.ref-gonio-range { width: 100%; accent-color: var(--guia-navy); height: 28px; cursor: pointer; margin: 4px 0; }
.ref-gonio-note { font-size: 15px; font-weight: 600; color: var(--guia-green-deep); text-align: center; min-height: 1.4em; margin: 4px 0; }

/* ===== Widget comparativo especular / difusa ===== */
.ref-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.ref-comp-cell {
  padding: 10px;
  border: 1.5px solid var(--guia-line);
  border-radius: 12px;
  background: var(--guia-cream);
  text-align: center;
}
.ref-comp-cell .lbl { font-size: 13px; font-weight: 800; color: var(--guia-muted); margin-bottom: 6px; display: block; }
.ref-comp-cell svg { max-width: 100%; height: auto; }

/* ===== Chips de clasificación por toque ===== */
.ref-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ref-chip {
  min-height: 44px;
  padding: 9px 14px;
  border: 2px solid var(--guia-line);
  border-radius: 999px;
  background: var(--guia-cream);
  color: var(--guia-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ref-chip:hover { border-color: var(--guia-navy); }
.ref-chip.on  { border-color: var(--guia-green); background: #EAF5EC; color: var(--guia-green-deep); }
.ref-chip.off { border-color: #B3261E; background: #FBEAE8; color: #B3261E; }

/* feedback de clasificación */
.ref-clasi-fb {
  display: none;
  margin: 8px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}
.ref-clasi-fb.show { display: block; animation: ref-fade .3s ease; }
.ref-clasi-fb.ok  { border: 1.5px solid #bfe6cd; background: #eef7f0; color: var(--guia-green-deep); }
.ref-clasi-fb.bad { border: 1.5px solid #f0c8c5; background: #fdf0ee; color: #B3261E; }
@keyframes ref-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Responsive 360px ===== */
@media (max-width: 540px) {
  .ref-gonio-vals { grid-template-columns: 1fr 1fr; }
  .ref-gval strong { font-size: 20px; }
  .ref-compare { grid-template-columns: 1fr; }
}

/* ===== Impresión ===== */
@media print {
  .ref-widget { display: none !important; }
}
