@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* --- Contenedor Principal --- */
#vb-validacion { 
    background: #f4f7f9; 
    border-radius: 16px;
    padding: 25px;
    max-width: 720px;
    margin: 40px auto;
    font-family: "Montserrat", sans-serif;
    color: #333;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

#vb-validacion h3 {
    color: #0077b6; 
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

/* === SOLUCIÓN CONFLICTO <P> === */
/* Aumenta la especificidad para anular estilos de otros plugins/temas */
#vb-validacion p {
    /* Resetea estilos de fondo o bordes no deseados */
    background: none !important; 
    border: none !important;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 0;
    color: #333; 
    line-height: 1.6;
}

#vb-intro p {
    font-size: 16px;
}
/* ============================= */


/* --- Caja de Chat --- */
#vb-box { 
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    height: 320px;
    overflow-y: auto;
    margin-bottom: 10px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* --- Estilos de Mensajes --- */
.vera-msg {
    background: #e6f7ff; 
    padding: 10px 14px;
    border-radius: 10px;
    margin: 8px 0;
    max-width: 85%;
    font-size: 15px;
    align-self: flex-start;
}

.user-msg {
    background: #fff8e1; 
    padding: 10px 14px;
    border-radius: 10px;
    margin: 8px 0;
    text-align: left;
    margin-left: auto;
    max-width: 85%;
    font-size: 15px;
    align-self: flex-end;
}

.error-msg {
    color: #d90429; 
    font-weight: bold;
    margin: 6px 0;
    text-align: center;
}

/* --- Input y Botones --- */
#vb-input { 
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: none;
    margin-bottom: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    box-sizing: border-box;
}

#vb-input:disabled {
    background-color: #eee;
    cursor: not-allowed;
    color: #666;
}

.vb-btn { 
    background-color: #0077b6; 
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.vb-btn:hover {
    background-color: #023e8a; 
}

/* Estado Deshabilitado del Botón */
.vb-btn:disabled, .vb-btn[disabled] {
    background-color: #a0a0a0;
    opacity: 0.8;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Estilos para el Formulario Estructurado (Likert) --- */
#vb-structured-form { 
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #ddd;
    margin-top: 15px;
}

#vb-structured-form h4 {
    color: #0077b6;
    margin-top: 0;
    border-bottom: 2px solid #e6f7ff;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.vb-rating-table { 
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: #fcfcfc;
}

.vb-rating-table th, .vb-rating-table td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: center;
    font-size: 0.9em;
}

.vb-rating-table th:first-child, .vb-rating-table td:first-child {
    text-align: left;
    width: 40%; 
    font-weight: 600;
}

.vb-rating-table th {
    background-color: #f0f8ff;
    color: #0077b6;
    font-weight: 700;
}

.vb-radio-label { 
    display: block;
}
.vb-radio-label .vb-option-text { 
    display: none; 
}


.vb-radio-group label { 
    margin-right: 20px;
    font-weight: 600;
}

#vb-ratings-form textarea { 
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

#vb-finish-btn { 
    width: 100%;
    margin: 15px 0 5px 0;
}


/* --- Media Queries: RESPONSIVE LIKERT TABLE --- */
@media (max-width: 600px) {
    #vb-validacion {
        padding: 15px;
        margin: 20px auto;
    }
    #vb-box {
        height: 260px;
    }
    
    /* === Transformación de Tabla a Lista/Tarjeta === */
    .vb-rating-table { 
        border: none; 
    }

    .vb-rating-table, .vb-rating-table thead, .vb-rating-table tbody, .vb-rating-table th, .vb-rating-table td, .vb-rating-table tr {
        display: block; 
    }

    /* Oculta la cabecera (Completamente de acuerdo...) */
    .vb-rating-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* Estilo de cada fila (pregunta) como una "tarjeta" */
    .vb-rating-table tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        padding: 10px 5px;
        border-radius: 8px;
        background: #fff;
    }

    /* La primera celda (la pregunta) */
    .vb-rating-table td:first-child {
        text-align: left;
        font-weight: 700;
        width: 100%; 
        border: none;
        padding-bottom: 10px;
        color: #0077b6;
        font-size: 1em;
    }

    /* Las celdas de radio/opción */
    .vb-rating-table td {
        border: none;
        text-align: center;
        width: 100%;
        padding: 8px 0; 
        display: inline-block; 
        width: 25%; 
        font-size: 0.7em;
        vertical-align: top;
    }

    /* Muestra el texto de la opción y ajusta el radio */
    .vb-radio-label .vb-option-text { 
        display: block; 
        font-size: 0.75em;
        font-weight: 600;
        color: #666;
        margin-bottom: 3px;
    }

    .vb-rating-table td input[type="radio"] {
        margin: 0 auto;
        display: block;
    }
}