/* =============================================
   Satisfaction Vote Component
   ============================================= */

/* Badge de puntuación (0–4) */
.satisfaction-vote__score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}

.satisfaction-vote__score-badge.is-new {
  animation: sv-fade-in 0.35s ease both;
}

@keyframes sv-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.satisfaction-vote__score-pct {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d3748;
  line-height: 1;
}

.satisfaction-vote__score-max {
  font-size: 1rem;
  font-weight: 400;
  color: #a0aec0;
  margin-left: 2px;
}

.satisfaction-vote__score-desc {
  font-size: 0.75rem;
  color: #9aa5b4;
  margin-top: 2px;
}

.satisfaction-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 24px;
  background: #ffffff;
  border: 1px solid #e8ecef;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  max-width: 480px;
  margin: 24px auto;
  font-family: inherit;
}

.satisfaction-vote__title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* Contenedor de opciones */
.satisfaction-vote__options {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cada opción */
.satisfaction-vote__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  background: transparent;
  outline: none;
  user-select: none;
}

/* Cara SVG */
.satisfaction-vote__face {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 0.25s ease;
}

.satisfaction-vote__face svg {
  width: 48px;
  height: 48px;
  stroke: #718096;
  stroke-width: 2.5;
  fill: none;
  transition: stroke 0.25s ease;
}

.satisfaction-vote__face svg circle[fill] {
  fill: #718096;
  stroke: none;
  transition: fill 0.25s ease;
}

/* Etiqueta de texto */
.satisfaction-vote__label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #9aa5b4;
  transition: color 0.25s ease;
  white-space: nowrap;
}

/* ── Estado: hover ── */
.satisfaction-vote__option:hover .satisfaction-vote__face {
  transform: scale(1.15);
}

.satisfaction-vote__option:hover .satisfaction-vote__face svg {
  stroke: #2d3748;
}

.satisfaction-vote__option:hover .satisfaction-vote__face svg circle[fill] {
  fill: #2d3748;
}

.satisfaction-vote__option:hover .satisfaction-vote__label {
  color: #4a5568;
}

.satisfaction-vote__option:hover {
  border-color: #e2e8f0;
  background: #f7fafc;
}

/* ── Estado: seleccionado ── */
.satisfaction-vote__option.is-selected .satisfaction-vote__face {
  transform: scale(1.2);
}

.satisfaction-vote__option.is-selected .satisfaction-vote__label {
  font-weight: 700;
}

/* Colores por valor seleccionado */
.satisfaction-vote__option[data-value="1"].is-selected {
  border-color: #fed7d7;
  background: #fff5f5;
}
.satisfaction-vote__option[data-value="1"].is-selected .satisfaction-vote__face svg { stroke: #c53030; }
.satisfaction-vote__option[data-value="1"].is-selected .satisfaction-vote__face svg circle[fill] { fill: #c53030; }
.satisfaction-vote__option[data-value="1"].is-selected .satisfaction-vote__label { color: #c53030; }

.satisfaction-vote__option[data-value="2"].is-selected {
  border-color: #feebc8;
  background: #fffaf0;
}
.satisfaction-vote__option[data-value="2"].is-selected .satisfaction-vote__face svg { stroke: #c05621; }
.satisfaction-vote__option[data-value="2"].is-selected .satisfaction-vote__face svg circle[fill] { fill: #c05621; }
.satisfaction-vote__option[data-value="2"].is-selected .satisfaction-vote__label { color: #c05621; }

.satisfaction-vote__option[data-value="3"].is-selected {
  border-color: #c6f6d5;
  background: #f0fff4;
}
.satisfaction-vote__option[data-value="3"].is-selected .satisfaction-vote__face svg { stroke: #276749; }
.satisfaction-vote__option[data-value="3"].is-selected .satisfaction-vote__face svg circle[fill] { fill: #276749; }
.satisfaction-vote__option[data-value="3"].is-selected .satisfaction-vote__label { color: #276749; }

.satisfaction-vote__option[data-value="4"].is-selected {
  border-color: #bee3f8;
  background: #ebf8ff;
}
.satisfaction-vote__option[data-value="4"].is-selected .satisfaction-vote__face svg { stroke: #2b6cb0; }
.satisfaction-vote__option[data-value="4"].is-selected .satisfaction-vote__face svg circle[fill] { fill: #2b6cb0; }
.satisfaction-vote__option[data-value="4"].is-selected .satisfaction-vote__label { color: #2b6cb0; }

/* Mensaje de confirmación */
.satisfaction-vote__feedback {
  font-size: 0.85rem;
  font-weight: 500;
  color: #38a169;
  min-height: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.satisfaction-vote__feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modo ya votado */
.satisfaction-vote.has-voted .satisfaction-vote__option:not(.is-selected) {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 360px) {
  .satisfaction-vote__face {
    width: 42px;
    height: 42px;
  }

  .satisfaction-vote__face svg {
    width: 40px;
    height: 40px;
  }

  .satisfaction-vote__option {
    padding: 8px 10px;
  }
}

/* =============================================
   Satisfaction Vote – Resultados (shortcode)
   ============================================= */

.sv-results {
  max-width: 480px;
  margin: 24px auto;
  padding: 28px 24px;
  background: #ffffff;
  border: 1px solid #e8ecef;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  font-family: inherit;
}

.sv-results__title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 20px;
  text-align: center;
}

.sv-results__total {
  font-size: 0.78rem;
  color: #9aa5b4;
  text-align: center;
  margin: 0 0 18px;
}

/* Fila de cada opción */
.sv-results__row {
  display: grid;
  grid-template-columns: 90px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sv-results__row-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cara SVG pequeña en resultados */
.sv-results__row-label svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Barra de progreso */
.sv-results__bar-wrap {
  height: 10px;
  background: #edf2f7;
  border-radius: 99px;
  overflow: hidden;
}

.sv-results__bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.7s cubic-bezier(.25,.8,.25,1);
}

.sv-results__bar-fill[data-value="1"] { background: #fc8181; }
.sv-results__bar-fill[data-value="2"] { background: #f6ad55; }
.sv-results__bar-fill[data-value="3"] { background: #68d391; }
.sv-results__bar-fill[data-value="4"] { background: #63b3ed; }

.sv-results__count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a5568;
  text-align: right;
}

/* Score global */
.sv-results__score {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
  text-align: center;
}

.sv-results__score-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #2d3748;
}

.sv-results__score-max {
  font-size: 1rem;
  color: #a0aec0;
}

.sv-results__score-label {
  font-size: 0.78rem;
  color: #9aa5b4;
  margin-top: 4px;
}

/* ── Página de admin ─────────────────────────────── */

.sv-admin-wrap {
  max-width: 760px;
}

.sv-admin-widget {
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.sv-admin-widget h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #1d2327;
}

.sv-admin-widget .sv-admin-total {
  font-size: 0.8rem;
  color: #777;
  margin: 0 0 16px;
}

.sv-admin-widget .sv-results__row {
  grid-template-columns: 100px 1fr 50px;
}

.sv-admin-empty {
  color: #777;
  font-style: italic;
  font-size: 0.9rem;
}
