/* ============================================================
 * theme.css — TEMA de la guia de coordenadas polares (LIBRE).
 * Rejilla polar, widget interactivo, triangulo rectángulo y leyenda.
 * Andamiaje en assets/guia-components.css; variables --guia-*.
 * ============================================================ */

/* ===== Leyenda de color (radio / angulo / punto) ===== */
.cp-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; background: #fff; border: 1.5px solid var(--guia-line); border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.cp-legend .it { display: flex; gap: 8px; align-items: center; }
.cp-legend .it b { font-weight: 800; }
.cp-legend .sw { width: 17px; height: 17px; border-radius: 4px; flex: 0 0 auto; }
.cp-legend .sw.r   { background: var(--guia-orange); border: 2px solid var(--guia-orange); }
.cp-legend .sw.th  { background: var(--guia-navy); border: 2px solid var(--guia-navy); }
.cp-legend .sw.pt  { background: var(--guia-green-deep); border: 2px solid var(--guia-ink); border-radius: 50%; }

/* ===== Visuales estaticos (SVG del tema) ===== */
.cp-visual { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0; }
.cp-visual .vcap { font-size: 15px; font-weight: 700; color: var(--guia-muted); text-align: center; max-width: 44ch; }
.cp-svg { width: 100%; max-width: 340px; height: auto; display: block; }

/* ===== Widget del explorador polar ===== */
.cp-explorer { display: grid; gap: 14px; padding: 16px; border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream); }
.cp-explorer-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cp-flag { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--guia-navy); border: 2px solid var(--guia-ink); border-radius: 999px; padding: 3px 11px; }
.cp-inst { font-size: 15px; font-weight: 700; color: var(--guia-deep); }

/* Caja del canvas polar: centra, se desplaza en movil */
.cp-stage { overflow-x: auto; overflow-y: hidden; text-align: center; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.cp-canvas { display: inline-block; cursor: crosshair; touch-action: none; }

/* Panel de lectura de coordenadas */
.cp-read { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-coord-box { background: #fff; border: 1.5px solid var(--guia-line); border-radius: 10px; padding: 10px 14px; }
.cp-coord-box .cp-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--guia-muted); margin-bottom: 4px; }
.cp-coord-box .cp-value { font-size: 20px; font-weight: 800; color: var(--guia-ink); min-height: 1.3em; }
.cp-coord-box.polar .cp-value { color: var(--guia-orange); }
.cp-coord-box.cart .cp-value { color: var(--guia-navy); }

/* Tabla de ajuste de cuadrante */
.cp-quad-table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 6px 0; }
.cp-quad-table th { background: var(--guia-ink); color: #fff; padding: 7px 12px; text-align: left; font-size: 13px; font-weight: 700; }
.cp-quad-table td { padding: 7px 12px; border-bottom: 1px solid var(--guia-line); }
.cp-quad-table tr:nth-child(even) td { background: #f3f0eb; }
.cp-ok  { color: #1C7A3A; font-weight: 800; }
.cp-adj { color: #a01243; font-weight: 800; }

/* Demo de angulo y radio (M2 explicacion) */
.cp-demo { background: #fff; border: 1.5px solid var(--guia-line); border-radius: 12px; padding: 12px 14px; text-align: center; }

@media print {
  .cp-explorer { display: none !important; }
}
