/* ==========================================
   HORIZONTAL OPTIONS
   TABLA RESPONSIVE
   ========================================== */

.horizontal-options {
    width: 100%;
    min-width: 0;
}

/* TÍTULO PRINCIPAL */

.horizontal-options h4.card-title {
    display: block !important;
    width: 100% !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 600;
}

/* Eliminar márgenes que interfieren */
.horizontal-options .card-content .row {
    margin-bottom: 0;
}

/* ==========================================
   TABLA
   ========================================== */

.card-border {
    border: none;
}

.card h4.card-title{
    margin: 0 !important;
}

.card.z-depth-2, .card-content {
    margin-top: 0;
    padding-top: 0 !important;
}

/* Contenedor que agrupa las preguntas */
.horizontal-options .row:has(
    > .col > p > strong
) {
    display: grid !important;

    grid-template-columns:
        minmax(150px, 1.5fr)
        repeat(4, minmax(65px, 1fr));

    gap: 0;
    margin: 0 !important;
    padding: 44px 0 0 !important;
    position: relative;
    align-items: stretch;
}

/* Cada pregunta es una fila */
.horizontal-options .row:has(
    > .col > p > strong
) > .col {

    grid-column: 1 / -1;

    display: grid !important;
    grid-template-columns: subgrid;
    grid-template-rows: auto;

    align-items: center;

    width: 100% !important;
    max-width: none !important;
    float: none !important;

    margin: 0 !important;
    padding: 0 !important;

    min-height: 56px;
    border-bottom: 1px solid #e5e5e5;
}

/* ==========================================
   NOMBRE DEL ASPECTO
   ========================================== */

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p:has(strong) {

    grid-column: 1;
    grid-row: 1;

    margin: 0 !important;
    padding: 12px 10px 12px 0 !important;

    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* ==========================================
   OPCIONES RADIO
   ========================================== */

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p.mt-1 {

    grid-row: 1;

    display: flex !important;
    justify-content: center;
    align-items: center;

    margin: 0 !important;
    padding: 0 !important;
    min-width: 0;
}

/* Columnas de respuesta */

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p.mt-1:nth-child(1 of p.mt-1) {
    grid-column: 2;
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p.mt-1:nth-child(2 of p.mt-1) {
    grid-column: 3;
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p.mt-1:nth-child(3 of p.mt-1) {
    grid-column: 4;
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col > p.mt-1:nth-child(4 of p.mt-1) {
    grid-column: 5;
}

/* Área clicable de cada radio */

.horizontal-options p.mt-1 label {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    cursor: pointer;
}

/* Ocultar texto de las opciones,
   conservando los círculos */

.horizontal-options p.mt-1 label span {
    font-size: 0 !important;
    color: transparent;
}

.horizontal-options p.mt-1 label span::before,
.horizontal-options p.mt-1 label span::after {
    font-size: initial;
}

/* ==========================================
   CABECERA DE LA TABLA
   ========================================== */

/* Primera columna */

.horizontal-options .row:has(
    > .col > p > strong
)::before {

    content: "Aspecto";

    position: absolute;
    top: 0;
    left: 0;

    height: 44px;
    display: flex;
    align-items: center;

    font-size: 13px;
    font-weight: 800;
    color: #333;
}

/* Cabeceras sobre los radios de
   la primera fila */

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child > p.mt-1 {
    position: relative;
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child > p.mt-1::before {

    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    height: 44px;

    font-size: 13px;
    font-weight: 800;
    color: #333;
    white-space: nowrap;
    pointer-events: none;
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child
> p.mt-1:nth-child(1 of p.mt-1)::before {
    content: "Nada";
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child
> p.mt-1:nth-child(2 of p.mt-1)::before {
    content: "Poco";
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child
> p.mt-1:nth-child(3 of p.mt-1)::before {
    content: "Bastante";
}

.horizontal-options .row:has(
    > .col > p > strong
) > .col:first-child
> p.mt-1:nth-child(4 of p.mt-1)::before {
    content: "Mucho";
}

/* ==========================================
   ELEMENTOS AUXILIARES
   ========================================== */

.horizontal-options p:empty {
    display: none;
}

/* Ocultar elementos técnicos sin contenido */
.horizontal-options [data-step]:empty {
    display: none;
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 900px) {

    .horizontal-options .row:has(
        > .col > p > strong
    ) {
        grid-template-columns:
            minmax(120px, 1.4fr)
            repeat(4, minmax(55px, 1fr));
    }

    .horizontal-options h4.card-title {
        font-size: 17px;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col > p:has(strong) {
        font-size: 13px;
    }
}

/* ==========================================
   MÓVIL
   ========================================== */

@media (max-width: 600px) {

    .horizontal-options .card-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .horizontal-options h4.card-title {
        width: 100% !important;
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 22px !important;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) {
        grid-template-columns:
            minmax(90px, 1.5fr)
            repeat(4, minmax(35px, 1fr));

        padding-top: 40px !important;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col {
        min-height: 60px;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col > p:has(strong) {
        font-size: 11px;
        line-height: 1.4;
        padding-right: 6px !important;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    )::before {
        font-size: 11px;
        height: 40px;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col:first-child
    > p.mt-1::before {
        font-size: 10px;
        height: 40px;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col:first-child
    > p.mt-1:nth-child(3 of p.mt-1)::before {
        content: "Bast.";
    }
}

/* ==========================================
   MÓVILES PEQUEÑOS
   ========================================== */

@media (max-width: 360px) {

    .horizontal-options .card-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) {
        grid-template-columns:
            minmax(75px, 1.4fr)
            repeat(4, minmax(30px, 1fr));
    }

    .horizontal-options .row:has(
        > .col > p > strong
    ) > .col > p:has(strong) {
        font-size: 10px;
    }
}