/* ==========================================================
   🎨 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);
}

/* ============================================================
   WP EASYVOTE – FORMULARIO DE INCIDENCIAS (CSS LIMPIO)
   ============================================================ */


/* ============================================================
   🔹 1. CONTENEDOR DEL BLOQUE DE INCIDENCIAS
   ============================================================ */

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



/* ============================================================
   🔹 2. FORMULARIO DE INCIDENCIAS (caja gris)
   ============================================================ */

.wpv-form-incidencia {
    background: #f7f7f7;
    padding: 22px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;

    /* Escritorio → alineado a la izquierda */
    text-align: left;
    align-items: flex-start;
}



/* ============================================================
   🔹 3. LABELS (Nombre, Documento…)
   ============================================================ */

.wpv-form-incidencia label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222;
}



/* ============================================================
   🔹 4. INPUTS GENERALES
   (Nombre, DNI, Fecha, Email)
   ============================================================ */

.wpv-form-incidencia input {
    width: 100%;                /* Siempre se expande */
    max-width: 650px;           /* Tamaño máximo en escritorio */
    padding: 14px 12px;
    font-size: 17px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}



/* ============================================================
   🔹 5. TEXTAREA (Comentario)
   ============================================================ */

.wpv-inc-comentari {
    width: 100%;
    max-width: 650px;           /* Ancho máximo */
    min-height: 200px;          /* Altura confortable */
    padding: 14px 12px;
    font-size: 17px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    box-sizing: border-box;
}



/* ============================================================
   🔹 6. CAMPO "Nombre" (se puede personalizar aparte)
   ============================================================ */

.wpv-inc-nom {
    max-width: 650px !important;
    width: 100% !important;
}



/* ============================================================
   🔹 7. OTROS CAMPOS ESPECÍFICOS
   (Para personalizar individualmente si quieres)
   ============================================================ */

.wpv-inc-dni {
    /* ejemplo: */
    /* max-width: 400px; */
}

.wpv-inc-data {
    /* ejemplo: */
    /* max-width: 300px; */
}

.wpv-inc-email {
    max-width: 650px !important;  /* mismo ancho que nombre */
    width: 100% !important;
}



/* ============================================================
   🔹 8. BOTÓN “Enviar incidencia”
   ============================================================ */

.wpv-inc-enviar {
    width: 100%;
    max-width: 500px;
    padding: 16px;
    font-size: 18px;
    border-radius: 8px;
    margin-top: 12px;
}



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

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



/* ============================================================
   🔹 10. BOTÓN “¿Problemas para votar? Comunícalo aquí”
   ============================================================ */

.wpv-btn-incidencia {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 600;

    background: #555 !important;
    color: #fff !important;

    border: none;
    border-radius: 8px;

    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 15px;

    transition: background 0.2s ease, transform 0.1s ease;
}

.wpv-btn-incidencia:hover {
    background: #444 !important;
    transform: scale(1.01);
}

.wpv-btn-incidencia:active {
    transform: scale(0.98);
}



/* ============================================================
   🔹 11. MÓVIL (≤ 600px)
   ============================================================ */

@media (max-width: 600px) {

    .wpv-votacion {
        padding: 0 16px; /* ↑ margen lateral en móvil */
    }

    /* Centra el formulario entero */
    .wpv-form-incidencia {
        text-align: center !important;
        align-items: center !important;
    }

    /* Labels centrados */
    .wpv-form-incidencia label {
        text-align: center;
        width: 100%;
    }

    /* Inputs centrados */
    .wpv-form-incidencia input,
    .wpv-inc-comentari {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 95%;
    }

    /* Botón centrado */
    .wpv-inc-enviar {
        width: 90%;
        max-width: 450px;
        margin: 15px auto 0;
        display: block;
    }
}
/* ==========================================================
   🔥 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;
}
