/* ==========================================================
   🎨 COLORES PERSONALIZABLES
   ==========================================================
   Estos colores se pueden modificar desde el panel de 
   configuración (admin-config.php). Cada variable afecta 
   a distintos elementos del frontend.
   ========================================================== */



/* ==========================================================
   🧱 ESTRUCTURA GENERAL
   ========================================================== */

.wpv-votacion {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  background-color: var(--wpv-color-fondo);
  color: var(--wpv-color-texto);
  border-radius: 10px;
}

.wpv-titulo {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #222;
}

.wpv-estado {
  font-weight: 600;
  margin: 10px 0 20px;
  font-size: 1.2rem;
}

.wpv-periodo {
    margin-top: 25px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 400;
    line-height: 1.55; /* ↑ interlineado suave */
}

.wpv-condicions-info {
  text-align: left;
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  color: #333;
  font-size: 1rem;
  line-height: 1.6; /* ↑ interlineado */
}

label {
  display: block;
  margin-top: 15px;
}

/* ==========================================================
   🗳️ TARJETAS DE VOTACIÓN
   ========================================================== */

.wpv-opcion {
  border: 1px solid #ddd;
  border-radius: 10px;
  margin: 15px 0;
  padding: 15px;
  background: rgb(255, 252, 252);
  /* Importante: el estático NO define sombra ni hover.
     Todo eso lo decide el CSS dinámico según el panel. */
}

/* ❌ Eliminado: 
.wpv-opcion:hover {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
*/

/* ==========================================================
   🖼️ IMÁGENES DE LAS OPCIONES
   ========================================================== */

.wpv-img-wrap {
  display: inline-block;     /* El contenedor se ajusta al contenido (la imagen) */
  margin: 0 auto 15px;       /* Centrado horizontal con margen inferior */
  overflow: hidden;          /* Oculta desbordes si la imagen es más grande */
  border-radius: 5px;        /* Bordes redondeados */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Sombra alrededor del contenedor */
}

.wpv-img-opcion {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.wpv-img-opcion:hover {
  box-shadow: 0 3px 7px rgba(0,0,0,0.1);
}
.wpv-img-opcion:hover {
  transform: scale(1.03);
}

/* ==========================================================
   🧾 TEXTOS DE LAS TARJETAS
   ========================================================== */

.wpv-opcion h3 {
  font-size: 1.6rem;
  margin: 10px 0 5px;
  color: #222;
  font-weight: 600;
}

.wpv-opcion p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.4;
  text-align: left;
}
.wpv-opcion-titulo {
  font-size: 1.5rem;   /* tamaño de letra */
  font-weight: bold;   /* negrita */
  text-align: center;  /* centrado horizontal */
  margin-bottom: 25px;
}

/* ==========================================================
   🔘 BOTONES — SECCIÓN PERSONALIZABLE
   ========================================================== */

/* Botón principal: VOTAR */
.wpv-boton-votar {
  background-color: var(--wpv-color-boton-votar);
}

/* Botón ENVIAR */
.wpv-enviar-voto {
  background-color: var(--wpv-color-boton-votar);
}

/* Botón de INCIDENCIA */
.wpv-btn-incidencia {
  background-color: var(--wpv-color-boton-cancelar);
}

/* Botón ENVIAR INCIDENCIA */
.wpv-inc-enviar {
  background-color: var(--wpv-color-boton-resultado);
}

/* Propiedades comunes a todos los botones */
.wpv-boton-votar,
.wpv-enviar-voto,
.wpv-btn-incidencia,
.wpv-inc-enviar {
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  margin-top: 10px;
}

.wpv-boton-votar:hover,
.wpv-enviar-voto:hover,
.wpv-btn-incidencia:hover,
.wpv-inc-enviar:hover {
  background-color: var(--wpv-color-hover);
  transform: scale(1.03);
}

.wpv-boton-votar:active,
.wpv-enviar-voto:active,
.wpv-btn-incidencia:active,
.wpv-inc-enviar:active {
  transform: scale(0.97);
}


.wpv-incidencia-wrap {
    margin-top: 25px;
}


/* ============================================================
   🔹 9. MENSAJE DE RESPUESTA DEL SERVIDOR
   ============================================================ */

.wpv-inc-msg {
    width: 100%;
    font-size: 16px;
    margin-top: 8px;
}

/* ==========================================================
   🔥 MENSAJES DEL SERVIDOR (ESTILOS RESTAURADOS)
   ========================================================== */

.wpv-mensaje div,
.wpv-inc-msg div {
    padding: 12px 18px;
    margin-top: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    font-size: 1rem;
    border: 1px solid transparent;
}

/* Éxito – verde */
.wpv-msg-exito {
    background: #e8f8ea;
    color: #1b7a2a;
    border-color: #b5e4c0;
}

/* Error – rojo */
.wpv-msg-error {
    background: #fdecea;
    color: #b80000;
    border-color: #f5b5b5;
}

/* Información – azul */
.wpv-msg-info {
    background: #eaf3ff;
    color: #004b9a;
    border-color: #bcd7ff;
}


/* ==========================================================
   📊 TABLA DE RESULTADOS (ESTILO RESTAURADO)
   ========================================================== */

.wpv-taula-resultats {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 1rem;
}

.wpv-taula-resultats th {
    background: #f1f1f1;
    padding: 10px;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid #ccc;
}

.wpv-taula-resultats td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    color: #333;
}

.wpv-taula-resultats tr:nth-child(even) {
    background: #fafafa;
}

.wpv-taula_resultats tr:hover {
    background: #f5f5f5;
}


/* ==========================================================
   🟢 ESTADO DE LA VOTACIÓN (ABIERTO / CERRADO / PENDIENTE)
   ========================================================== */

.wpv-estado-abierta {
    background: #e8f8ea;
    color: #206b28;
    border-left: 5px solid #2ca03d;
    padding: 10px 15px;
    border-radius: 6px;
}

.wpv-estado-cerrada {
    background: #fdecec;
    color: #9f1d1d;
    border-left: 5px solid #c0392b;
    padding: 10px 15px;
    border-radius: 6px;
}

.wpv-estado-pendiente {
    background: #fff7e6;
    color: #8a5d00;
    border-left: 5px solid #f1c40f;
    padding: 10px 15px;
    border-radius: 6px;
}
