/* =============================================================
   dashboard-respuestas.css
   Scope: #fc-dash-resp
   ============================================================= */

#fc-dash-resp {
  --dr-pos: #95de76;
  --dr-neg: #a62a45;
  --dr-nc: #959595;
  --dr-accent: #ff7b56;
  --dr-name-col: #ff4f1e;
  --dr-min-w: 308px;
  --dr-max-w: 500px;
  font-family: 'Roboto', sans-serif;
  min-width: var(--dr-min-w);
  max-width: var(--dr-max-w);
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid var(--dr-accent);
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-sizing: border-box;
  height: 328px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─────────────────────────────────────────────── */

#dr-header {
  text-align: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

#dr-title {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--dr-accent);
  margin: 0 0 2px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

#dr-name {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--dr-name-col);
  line-height: 1.2;
}

/* ─── Cuerpo: desktop — donut + leyenda lado a lado ─────── */

#dr-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1;
  min-height: 0;
  padding: 0 4px;
}

/* ─── Canvas del donut ───────────────────────────────────── */

#dr-chart-wrap {
  flex: 0 0 auto;
  width: 190px;
  height: 190px;
  position: relative;
}

#dr-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── Leyenda — desktop ──────────────────────────────────── */

#dr-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.dr-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dr-legend-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 26px;
  border-radius: 5px;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

#dr-badge-pos {
  background-color: var(--dr-pos);
}

#dr-badge-neg {
  background-color: var(--dr-neg);
}

#dr-badge-nc {
  background-color: var(--dr-nc);
}

.dr-legend-label {
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}

/* ─── Mobile: donut arriba, leyenda abajo centrada ───────────
   Breakpoint 480px: pantallas donde el donut se comprimiría
   ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  #fc-dash-resp {
    height: 328px;
  }
}

@media (max-width: 480px) {
  #dr-body {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  #dr-chart-wrap {
    width: min(200px, 80vw);
    height: min(200px, 80vw);
  }
}

@media (max-width: 480px) {
  #dr-legend {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .dr-legend-item {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .dr-legend-label {
    white-space: normal;
    text-align: center;
    font-size: 11px;
  }
}

