/******************
    User custom CSS
    ---------------

    In this file you can add your own custom CSS
    It will be loaded last, so you can override any other property.
    Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/

/* Edukvalitator: clearer array statements and answer captions.
   Selectors verified against the live Fruity TwentyThree radio-array DOM.
   Keep native fonts, Blueberry controls, logo, responsive layout and input states. */

/* The statement belongs to the row heading, not to its response cells. */
body table.ls-answers.radio-array > tbody > tr.answers-list > th.answertext {
    color: #243241;
    font-weight: 700;
    line-height: 1.45;
}

/* The mobile response captions must not compete with the statement. */
body table.ls-answers.radio-array > tbody > tr.answers-list > td.radio-item > label.ls-label-xs-visibility {
    font-weight: 400;
    line-height: 1.45;
}

/* Only unselected captions are neutral; preserve the theme's selected-state color. */
body table.ls-answers.radio-array > tbody > tr.answers-list > td.radio-item > input[type="radio"]:not(:checked) + label.ls-label-xs-visibility {
    color: #4b5563;
}

/* Desktop column headings remain moderately emphasized. */
body table.ls-answers.radio-array > thead > tr.ls-heading > th.answer-text,
body table.ls-answers.radio-array > tbody > tr.ls-heading-repeat > th.answer-text {
    color: #4b5563;
    font-weight: 600;
    line-height: 1.4;
}

/* The existing theme stacks the array on small screens. Add only spacing
   and a quiet statement band; do not restyle the radio buttons or their labels' geometry. */
@media only screen and (max-width: 767px) {
    body table.ls-answers.radio-array > tbody > tr.answers-list > th.answertext {
        background-color: #f3f4f6;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    body table.ls-answers.radio-array > tbody > tr.answers-list:not(:last-child) {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* Edukvalitator v2: standalone questions and desktop matrices.
   Keep the native controls, selected/focus states and intentional role examples. */
body .question-container .ls-label-question {
    color: #243241;
    font-weight: 700;
    font-size: 1.15em;
    line-height: 1.45;
}

/* Give desktop answer scales enough room without stretching on large monitors.
   Align the existing logo container with the wider questionnaire. */
@media only screen and (min-width: 1200px) {
    body #outerframeContainer > .row > .col-centered.col-xl-8,
    body #survey-nav > .container-fluid.col-xl-8 {
        width: calc(100% - 3rem);
        max-width: 1180px;
    }

    body table.ls-answers.radio-array > thead > tr.ls-heading > th.answer-text,
    body table.ls-answers.radio-array > tbody > tr.ls-heading-repeat > th.answer-text {
        hyphens: none;
        overflow-wrap: normal;
    }
}

body .question-container:not(.array-flexible-row) > .question-title-container > .question-text {
    background-color: #f3f4f6;
    border-left: 3px solid #cbd5f5;
    border-radius: 3px;
    padding: 0.85rem 1rem;
}

body .question-container .ls-label-question > p:last-child {
    margin-bottom: 0;
}

body .question-container .answer-container .radio-item > label,
body .question-container .answer-container label.checkbox-label,
body .question-container .answer-container .ls-button-label {
    font-weight: 400;
    line-height: 1.45;
}

/* Let selected choices retain Blueberry; never recolor filled choice buttons. */
body .question-container .answer-container .radio-item > input:not(:checked) + label,
body .question-container .answer-container input[type="checkbox"]:not(:checked) + label.checkbox-label {
    color: #4b5563;
}

body .question-container .answer-container .bootstrap-select .filter-option,
body .question-container .answer-container .bootstrap-select .dropdown-item,
body .question-container .answer-container select,
body .question-container .answer-container textarea {
    font-weight: 400;
}

/* Separate the statements from the response scale on desktop. */
body table.ls-answers.radio-array > thead > tr.ls-heading > th.answer-text,
body table.ls-answers.radio-array > tbody > tr.ls-heading-repeat > th.answer-text {
    font-weight: 400;
}

@media only screen and (min-width: 768px) {
    body table.ls-answers.radio-array > thead > tr.ls-heading > th.answer-text,
    body table.ls-answers.radio-array > tbody > tr.ls-heading-repeat > th.answer-text {
        background-color: #f8f9fc;
        color: #4b5563;
        font-size: 0.94em;
        padding: 0.8rem 0.45rem;
        border-bottom: 2px solid #d9deeb;
    }

    body table.ls-answers.radio-array > tbody > tr.answers-list > th.answertext {
        background-color: #f3f4f6;
        padding: 0.85rem 1rem;
        border-left: 3px solid #cbd5f5;
        border-bottom: 1px solid #dfe3ea;
    }

    body table.ls-answers.radio-array > tbody > tr.answers-list > td.answer-item {
        border-bottom: 1px solid #e5e7eb;
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }
}
