/*
 * brandBerryHUB — LimeSurvey Compat v2.1
 * MAX SPECIFICITY: body.brandberryhub.fruity
 * Targets: awesome-bootstrap-checkbox + template-core.css + base.css (fruity)
 */

/* === BOOTSTRAP BUTTONS (Gender, Likert, Y/N) === */
/* Root cause: col-md-2 = 16.6% width crushes text vertically */
body.brandberryhub.fruity .bootstrap-buttons-div[class*="col-md-"] {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
}
body.brandberryhub.fruity .answers-list[data-bs-toggle="buttons"].row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
}
body.brandberryhub.fruity .bootstrap-buttons-div .form-check label.btn,
body.brandberryhub.fruity .bootstrap-buttons-div label.btn.btn-primary {
    min-width: 110px !important;
    padding: 12px 22px !important;
    font-family: var(--bb-sans) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    background: var(--bb-white) !important;
    color: var(--bb-near-black) !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    text-align: center !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}
body.brandberryhub.fruity .bootstrap-buttons-div label.btn:hover {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-light-lavender) !important;
    color: var(--bb-accent-purple) !important;
}
/* Checked state - override inline styles AND awesome-bootstrap-checkbox */
body.brandberryhub.fruity .btn-check:checked + label.btn,
body.brandberryhub.fruity .btn-check:checked + label.btn.btn-primary,
body.brandberryhub.fruity input:checked + label.btn,
body.brandberryhub.fruity input[type="radio"]:checked + label.btn {
    background-color: var(--bb-muted-gold) !important;
    color: var(--bb-deep-purple) !important;
    border-color: var(--bb-muted-gold) !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(196,163,90,0.3) !important;
}


/* === RADIO LIST (Single choice, vertical cards) === */
/* Hide actual input */
body.brandberryhub.fruity li.answer-item.radio-item > input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    z-index: -1 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Label = clickable card */
body.brandberryhub.fruity li.answer-item.radio-item > label.control-label {
    display: block !important;
    position: relative !important;
    padding: 13px 18px 13px 50px !important;
    margin: 0 0 5px 0 !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    background: var(--bb-white) !important;
    cursor: pointer !important;
    font-family: var(--bb-sans) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: var(--bb-near-black) !important;
    line-height: 1.5 !important;
    transition: all 0.15s ease !important;
    min-height: unset !important;
}
body.brandberryhub.fruity li.answer-item.radio-item > label.control-label:hover {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-light-lavender) !important;
    transform: translateX(3px);
}
/* Radio circle - override ALL pseudo-element sources */
body.brandberryhub.fruity li.answer-item.radio-item > label.control-label::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: 2px solid var(--bb-mid-lavender) !important;
    border-radius: 50% !important;
    background: var(--bb-white) !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.15s ease !important;
}
/* Radio dot */
body.brandberryhub.fruity li.answer-item.radio-item > label.control-label::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) scale(0) !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--bb-accent-purple) !important;
    font-family: inherit !important;
    font-size: 0 !important;
    color: transparent !important;
    transition: transform 0.2s cubic-bezier(0.22,1,0.36,1) !important;
}
/* Checked */
body.brandberryhub.fruity li.answer-item.radio-item > input[type="radio"]:checked + label.control-label {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-light-lavender) !important;
    font-weight: 500 !important;
}
body.brandberryhub.fruity li.answer-item.radio-item > input[type="radio"]:checked + label.control-label::before {
    border-color: var(--bb-accent-purple) !important;
}
body.brandberryhub.fruity li.answer-item.radio-item > input[type="radio"]:checked + label.control-label::after {
    transform: translateY(-50%) scale(1) !important;
}
/* Remove li spacing */
body.brandberryhub.fruity li.answer-item.radio-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
body.brandberryhub.fruity ul.answers-list.radio-list {
    padding: 0 !important;
    margin: 0 !important;
}


/* === CHECKBOX LIST (Multiple choice) === */
body.brandberryhub.fruity li.answer-item.checkbox-item {
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
}
body.brandberryhub.fruity li.checkbox-item input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    z-index: -1 !important;
    width: 1px !important;
    height: 1px !important;
}
body.brandberryhub.fruity li.checkbox-item .col-auto {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}
body.brandberryhub.fruity li.checkbox-item .row {
    margin: 0 !important;
}
body.brandberryhub.fruity li.checkbox-item label.checkbox-label,
body.brandberryhub.fruity li.checkbox-item label.control-label {
    display: block !important;
    position: relative !important;
    padding: 13px 18px 13px 50px !important;
    margin: 0 !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    background: var(--bb-white) !important;
    cursor: pointer !important;
    font-family: var(--bb-sans) !important;
    font-size: 15px !important;
    color: var(--bb-near-black) !important;
    line-height: 1.5 !important;
    transition: all 0.15s ease !important;
}
body.brandberryhub.fruity li.checkbox-item label.checkbox-label:hover {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-light-lavender) !important;
}
body.brandberryhub.fruity li.checkbox-item label.checkbox-label::before,
body.brandberryhub.fruity li.checkbox-item label.control-label::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: 2px solid var(--bb-mid-lavender) !important;
    border-radius: 3px !important;
    background: var(--bb-white) !important;
    transition: all 0.15s ease !important;
}
body.brandberryhub.fruity li.checkbox-item label.checkbox-label::after,
body.brandberryhub.fruity li.checkbox-item label.control-label::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) scale(0) !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 0 !important;
    color: transparent !important;
    transition: transform 0.15s ease !important;
}
body.brandberryhub.fruity li.checkbox-item input[type="checkbox"]:checked + label::before {
    background: var(--bb-accent-purple) !important;
    border-color: var(--bb-accent-purple) !important;
}
body.brandberryhub.fruity li.checkbox-item input[type="checkbox"]:checked + label::after {
    content: "\f00c" !important;
    font-family: "FontAwesome" !important;
    font-size: 12px !important;
    color: var(--bb-white) !important;
    text-align: center !important;
    line-height: 20px !important;
    transform: translateY(-50%) scale(1) !important;
}
body.brandberryhub.fruity li.checkbox-item input[type="checkbox"]:checked + label {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-light-lavender) !important;
}


/* === OTHER FIELD (Radio + text on same row) === */
body.brandberryhub.fruity li.radio-text-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 18px !important;
    margin: 0 0 5px 0 !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    background: var(--bb-white) !important;
}
body.brandberryhub.fruity li.radio-text-item .othertext-label-checkox-container {
    flex: 0 0 auto !important;
    padding: 0 !important;
}
body.brandberryhub.fruity li.radio-text-item .other-text-item {
    flex: 1 !important;
    padding: 0 !important;
}
body.brandberryhub.fruity li.radio-text-item .other-text-item input.form-control {
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
}
body.brandberryhub.fruity li.radio-text-item .other-text-item input.form-control:focus {
    border-color: var(--bb-muted-gold) !important;
    box-shadow: 0 0 0 3px rgba(91,45,142,0.15) !important;
}
/* Style the radio + label inside other */
body.brandberryhub.fruity li.radio-text-item label.control-label,
body.brandberryhub.fruity li.radio-text-item label.label-radio {
    padding: 4px 8px !important;
    border: none !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: transparent !important;
}
body.brandberryhub.fruity li.radio-text-item label.control-label::before,
body.brandberryhub.fruity li.radio-text-item label.label-radio::before {
    position: relative !important;
    display: inline-block !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}


/* === ARRAY TABLE === */
body.brandberryhub.fruity table.ls-answers {
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
}
body.brandberryhub.fruity table.ls-answers thead th {
    background: var(--bb-light-lavender) !important;
    font-family: var(--bb-sans) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    color: var(--bb-accent-purple) !important;
    text-transform: none !important;
    letter-spacing: 0.2px !important;
    padding: 10px 6px !important;
    border-bottom: 2px solid var(--bb-mid-lavender) !important;
    line-height: 1.3 !important;
    word-break: normal !important;
}
body.brandberryhub.fruity table.ls-answers thead td {
    background: var(--bb-light-lavender) !important;
    border-bottom: 2px solid var(--bb-mid-lavender) !important;
}
body.brandberryhub.fruity table.ls-answers th.answertext {
    font-family: var(--bb-sans) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: var(--bb-near-black) !important;
}
body.brandberryhub.fruity table.ls-answers tbody tr:hover td {
    background: var(--bb-light-lavender) !important;
}
/* Table radio: make input visible, NUKE all pseudo-elements */
body.brandberryhub.fruity table.ls-answers td.radio-item input[type="radio"],
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="radio"] {
    position: relative !important;
    opacity: 1 !important;
    z-index: 2 !important;
    width: 20px !important;
    height: 20px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--bb-mid-lavender) !important;
    border-radius: 50% !important;
    background: var(--bb-white) !important;
    cursor: pointer !important;
    margin: 0 auto !important;
    display: block !important;
    transition: all 0.15s ease !important;
}
body.brandberryhub.fruity table.ls-answers td.radio-item input[type="radio"]:checked,
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="radio"]:checked {
    border-color: var(--bb-accent-purple) !important;
    background: var(--bb-accent-purple) !important;
    box-shadow: inset 0 0 0 3px var(--bb-white) !important;
}
/* NUKE every pseudo-element in table cells - ALL possible selectors */
body.brandberryhub.fruity table.ls-answers td label::before,
body.brandberryhub.fruity table.ls-answers td label::after,
body.brandberryhub.fruity table td.radio-item label::before,
body.brandberryhub.fruity table td.radio-item label::after,
body.brandberryhub.fruity table td.answer-item label::before,
body.brandberryhub.fruity table td.answer-item label::after,
body.brandberryhub.fruity .radio-array td label::before,
body.brandberryhub.fruity .radio-array td label::after,
body.brandberryhub.fruity .table-array-radio td label::before,
body.brandberryhub.fruity .table-array-radio td label::after,
body.brandberryhub.fruity table.ls-answers .radio-item label.ls-label-xs-visibility::before,
body.brandberryhub.fruity table.ls-answers .radio-item label.ls-label-xs-visibility::after,
body.brandberryhub.fruity table.ls-answers input[type="radio"] + label::before,
body.brandberryhub.fruity table.ls-answers input[type="radio"] + label::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: none !important;
    position: absolute !important;
    left: -9999px !important;
}
/* Also hide the label itself in table cells (it's aria-hidden anyway) */
body.brandberryhub.fruity table.ls-answers td.radio-item label,
body.brandberryhub.fruity table.ls-answers td.answer-item label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ─── Table checkbox: ARRAY MULTI-FLEXIBLE CHECKBOX (question type ":" + multiflexible_checkbox=1)
   Mirror of the radio rule above (lines 336–358). Without this block, the fruity parent +
   awesome-bootstrap-checkbox.css keep the input at opacity:0, the pseudo-nuke rule above
   removes the visual drawn by label::before/::after, and the label-clip rule hides the label —
   leaving the cells empty and non-selectable. Square corners + SVG checkmark, brand purple. */
body.brandberryhub.fruity table.ls-answers td.checkbox-item input[type="checkbox"],
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="checkbox"] {
    position: relative !important;
    opacity: 1 !important;
    z-index: 2 !important;
    width: 20px !important;
    height: 20px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: 2px solid var(--bb-mid-lavender) !important;
    border-radius: 3px !important;
    background: var(--bb-white) !important;
    cursor: pointer !important;
    margin: 0 auto !important;
    display: block !important;
    transition: all 0.15s ease !important;
}
body.brandberryhub.fruity table.ls-answers td.checkbox-item input[type="checkbox"]:hover,
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="checkbox"]:hover {
    border-color: var(--bb-accent-purple) !important;
}
body.brandberryhub.fruity table.ls-answers td.checkbox-item input[type="checkbox"]:focus-visible,
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--bb-accent-purple) !important;
    outline-offset: 2px !important;
}
body.brandberryhub.fruity table.ls-answers td.checkbox-item input[type="checkbox"]:checked,
body.brandberryhub.fruity table.ls-answers td.answer-item input[type="checkbox"]:checked {
    border-color: var(--bb-accent-purple) !important;
    background-color: var(--bb-accent-purple) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 14px 14px !important;
}


/* === FORM CONTROLS === */
body.brandberryhub.fruity .form-control {
    font-family: var(--bb-sans) !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    color: var(--bb-near-black) !important;
}
body.brandberryhub.fruity .form-control:focus {
    border-color: var(--bb-muted-gold) !important;
    box-shadow: 0 0 0 3px rgba(91,45,142,0.15) !important;
}


/* === QUESTION CONTAINER === */
body.brandberryhub.fruity #outerframeContainer,
body.brandberryhub.fruity #outerframeContainer.container-md {
    max-width: clamp(600px, 85vw, 1100px) !important;
    padding-left: clamp(16px, 3vw, 40px) !important;
    padding-right: clamp(16px, 3vw, 40px) !important;
}
body.brandberryhub.fruity .question-container {
    background: var(--bb-white) !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    border-radius: 0 !important;
    padding: clamp(20px, 3vw, 40px) clamp(18px, 3.5vw, 44px) !important;
    margin-bottom: 14px !important;
    box-shadow: none !important;
}
body.brandberryhub.fruity .question-container:hover {
    border-color: var(--bb-accent-purple) !important;
    box-shadow: 0 6px 24px rgba(45,27,78,0.06) !important;
}


/* (Question title rules moved to PROGRESS/HELP section above) */


/* === ASTERISK === */
body.brandberryhub.fruity .asterisk .fa-asterisk {
    color: var(--bb-muted-gold) !important;
}


/* === SUBMIT BUTTON === */
body.brandberryhub.fruity #ls-button-submit,
body.brandberryhub.fruity .action--ls-button-submit {
    background: var(--bb-muted-gold) !important;
    color: var(--bb-deep-purple) !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--bb-sans) !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
}
body.brandberryhub.fruity #ls-button-submit:hover {
    background: var(--bb-gold-hover) !important;
    box-shadow: 0 6px 24px rgba(196,163,90,0.25) !important;
}


/* === PROGRESS BAR — thicker, more visible === */
body.brandberryhub.fruity .progress {
    height: 12px !important;
    background: var(--bb-light-lavender) !important;
    border-radius: 6px !important;
    border: 1px solid var(--bb-mid-lavender) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06) !important;
    margin: 0 !important;
}
body.brandberryhub.fruity .progress-bar {
    background: linear-gradient(90deg, var(--bb-accent-purple), var(--bb-muted-gold)) !important;
    border-radius: 6px !important;
    transition: width 0.6s cubic-bezier(0.22,1,0.36,1) !important;
}
/* Progress percentage text */
body.brandberryhub.fruity .progress-value,
body.brandberryhub.fruity [class*="progress"] + small,
body.brandberryhub.fruity .percent-value {
    font-family: var(--bb-sans) !important;
    font-size: 13px !important;
    color: var(--bb-medium-gray) !important;
    font-weight: 500 !important;
}


/* === HELP TEXT — single left bar, no icon, dynamic height === */
body.brandberryhub.fruity .question-help-container {
    font-family: var(--bb-sans) !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
    color: var(--bb-near-black) !important;
    line-height: 1.65 !important;
    padding: 14px 18px 14px 22px !important;
    background: var(--bb-light-lavender) !important;
    border: none !important;
    border-left: 4px solid var(--bb-accent-purple) !important;
    border-radius: 0 !important;
    margin-bottom: 16px !important;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    overflow: visible !important;
}
/* The help TEXT lives inside <i class="text-info"> — keep it visible, strip its own styling */
body.brandberryhub.fruity .question-help-container i.text-info,
body.brandberryhub.fruity .question-help-container .ls-questionhelp,
body.brandberryhub.fruity .question-help-container .text-info {
    display: inline !important;
    font-family: var(--bb-sans) !important;
    font-style: italic !important;
    font-size: 14.5px !important;
    color: var(--bb-near-black) !important;
    line-height: 1.65 !important;
    border: none !important;
    border-left: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}
/* KILL only the ? icon — target ONLY icon-class <i> elements, NOT <i class="text-info"> */
body.brandberryhub.fruity .question-help-container i.fa,
body.brandberryhub.fruity .question-help-container i.ri,
body.brandberryhub.fruity .question-help-container i[class*="ri-"],
body.brandberryhub.fruity .question-help-container i.fa-question-circle,
body.brandberryhub.fruity .question-help-container i.ri-question-line,
body.brandberryhub.fruity .question-help-container .ri-question-line {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    font-size: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Remove any .text-info borders/styling from LS core that creates the second bar */
body.brandberryhub.fruity .text-info {
    color: var(--bb-near-black) !important;
    border: none !important;
    border-left: none !important;
}
body.brandberryhub.fruity .question-help-container .text-info {
    border: none !important;
    border-left: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}
/* Validation/tip messages */
body.brandberryhub.fruity .question-valid-container .text-info,
body.brandberryhub.fruity .ls-question-message {
    font-size: 13px !important;
    color: var(--bb-medium-gray) !important;
}

/* ─── OPT-IN: .bbh-no-tip — suppress ALL tip content per question ───
   Use case: questions with hide_tip=1 BUT also min_answers/max_answers (or other
   Expression Manager validation constraints). In LS 6.x, hide_tip suppresses only
   the manual Help text — EM-generated tips (em_num_answers, em_mandatory, em_regex,
   em_num_value) keep rendering inside .question-help-container regardless.
   Activation: Question editor → Display → CSS class(es) → "bbh-no-tip".
   Covers all containers and known EM tip class families for forward compatibility. */
body.brandberryhub.fruity .question-container.bbh-no-tip .question-help-container,
body.brandberryhub.fruity .question-container.bbh-no-tip .ls-question-help-container,
body.brandberryhub.fruity .question-container.bbh-no-tip .question-valid-container,
body.brandberryhub.fruity .question-container.bbh-no-tip .ls-em-tip,
body.brandberryhub.fruity .question-container.bbh-no-tip .em_default,
body.brandberryhub.fruity .question-container.bbh-no-tip [class*="em_num_answers"],
body.brandberryhub.fruity .question-container.bbh-no-tip [class*="em_mandatory"],
body.brandberryhub.fruity .question-container.bbh-no-tip [class*="em_regex"],
body.brandberryhub.fruity .question-container.bbh-no-tip [class*="em_num_value"],
body.brandberryhub.fruity .bbh-no-tip > .question-help-container,
body.brandberryhub.fruity .bbh-no-tip > .ls-question-help-container,
body.brandberryhub.fruity .bbh-no-tip > .question-valid-container {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}


/* === QUESTION TITLE — bold code prefix styling === */
body.brandberryhub.fruity .ls-label-question {
    font-family: var(--bb-serif) !important;
    font-weight: 600 !important;
    color: var(--bb-deep-purple) !important;
    font-size: clamp(16px, 1.5vw, 19px) !important;
    line-height: 1.45 !important;
}
body.brandberryhub.fruity .ls-label-question p {
    font-family: var(--bb-serif) !important;
    color: var(--bb-deep-purple) !important;
    font-size: inherit !important;
    line-height: inherit !important;
}
/* Make the question code (e.g. G02A04, C_01) stand out with a visual badge effect */
body.brandberryhub.fruity .ls-label-question b,
body.brandberryhub.fruity .ls-label-question strong {
    font-weight: 700 !important;
    color: var(--bb-deep-purple) !important;
}


/* === QUESTION CODE & NUMBER — deep purple badge === */
body.brandberryhub.fruity .question-code,
body.brandberryhub.fruity .question-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bb-deep-purple) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: var(--bb-sans) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    padding: 5px 12px !important;
    margin-right: 10px !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    min-height: 28px !important;
}


/* === ALERT === */
body.brandberryhub.fruity .alert { border-radius: 0 !important; }


/* === COLUMN-COUNT layout === */
body.brandberryhub.fruity ul[data-column-count] {
    column-gap: 10px !important;
}
body.brandberryhub.fruity ul[data-column-count] > li {
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
}


/* === MOBILE === */
@media (max-width: 768px) {
    /* Container: allow full width on phones */
    body.brandberryhub.fruity #outerframeContainer,
    body.brandberryhub.fruity #outerframeContainer.container-md {
        max-width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    body.brandberryhub.fruity .question-container {
        padding: 18px 14px !important;
    }

    /* Radio list labels */
    body.brandberryhub.fruity li.answer-item.radio-item > label.control-label {
        padding: 11px 14px 11px 42px !important;
        font-size: 14px !important;
    }
    body.brandberryhub.fruity li.answer-item.radio-item > label.control-label::before {
        left: 12px !important;
        width: 18px !important;
        height: 18px !important;
    }
    body.brandberryhub.fruity li.answer-item.radio-item > label.control-label::after {
        left: 16px !important;
        width: 9px !important;
        height: 9px !important;
    }

    /* Bootstrap buttons: full width + FORCE text wrap */
    body.brandberryhub.fruity .bootstrap-buttons-div[class*="col-md-"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    body.brandberryhub.fruity .bootstrap-buttons-div label.btn,
    body.brandberryhub.fruity .bootstrap-buttons-div .btn.btn-primary,
    body.brandberryhub.fruity .bootstrap-buttons-div .form-check label.btn {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        min-width: unset !important;
        text-align: left !important;
        padding: 12px 18px !important;
        height: auto !important;
        min-height: unset !important;
    }

    /* Column layout: single column on mobile */
    body.brandberryhub.fruity ul[data-column-count] {
        column-count: 1 !important;
    }

    /* ARRAY TABLE ON MOBILE:
       LS noTablesOnMobile.css converts the table to a stacked layout.
       The labels (ls-label-xs-visibility) become the VALUE INDICATORS
       and MUST be visible so users know what each radio means. */
    body.brandberryhub.fruity table.ls-answers td.radio-item label,
    body.brandberryhub.fruity table.ls-answers td.answer-item label {
        /* UNDO desktop hiding — make visible on mobile */
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: unset !important;
        white-space: normal !important;
        border: 0 !important;
        padding: 2px 0 2px 8px !important;
        margin: 0 !important;
        display: inline !important;
        font-family: var(--bb-sans) !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: var(--bb-accent-purple) !important;
    }
    /* Also undo pseudo-element nuking on mobile labels */
    body.brandberryhub.fruity table.ls-answers td.radio-item label::before,
    body.brandberryhub.fruity table.ls-answers td.radio-item label::after,
    body.brandberryhub.fruity table.ls-answers td.answer-item label::before,
    body.brandberryhub.fruity table.ls-answers td.answer-item label::after {
        display: none !important;
        content: none !important;
    }

    /* Make table radio inputs inline with label on mobile */
    body.brandberryhub.fruity table.ls-answers td.radio-item input[type="radio"],
    body.brandberryhub.fruity table.ls-answers td.answer-item input[type="radio"] {
        display: inline-block !important;
        margin: 0 4px 0 0 !important;
        vertical-align: middle !important;
        width: 18px !important;
        height: 18px !important;
    }

    /* Question title font size on mobile */
    body.brandberryhub.fruity .ls-label-question {
        font-size: 16px !important;
    }

    /* Question code badge smaller on mobile */
    body.brandberryhub.fruity .question-code,
    body.brandberryhub.fruity .question-number {
        font-size: 11px !important;
        padding: 4px 8px !important;
        margin-right: 6px !important;
    }
}

@media (max-width: 992px) {
    body.brandberryhub.fruity .bootstrap-buttons-div[class*="col-md-"] {
        width: auto !important;
        flex: 0 0 auto !important;
    }
    /* Allow wrap on tablets too for long button text */
    body.brandberryhub.fruity .bootstrap-buttons-div label.btn {
        white-space: normal !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 11: Welcome page — cohesive brandBerry styling
   Override fruity/Bootstrap defaults on welcome/intro page
   ═══════════════════════════════════════════════════════════════ */

/* Survey title on welcome page — Playfair Display */
body.brandberryhub.fruity h1,
body.brandberryhub.fruity h2,
body.brandberryhub.fruity h3,
body.brandberryhub.fruity .survey-welcome h1,
body.brandberryhub.fruity .survey-welcome h2,
body.brandberryhub.fruity .survey-welcome h3,
body.brandberryhub.fruity .h1,
body.brandberryhub.fruity .h2,
body.brandberryhub.fruity .h3 {
    font-family: var(--bb-serif, 'Playfair Display', Georgia, serif) !important;
    color: var(--bb-deep-purple, #2D1B4E) !important;
    font-weight: 600 !important;
}

/* Welcome text — Inter, readable */
body.brandberryhub.fruity .survey-welcome,
body.brandberryhub.fruity .survey-welcome p,
body.brandberryhub.fruity .survey-welcome div:not(.navigator):not([class*="btn"]) {
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    font-size: 16px !important;
    color: var(--bb-near-black, #1A1A2E) !important;
    line-height: 1.75 !important;
}

/* Bold text in welcome — accent purple */
body.brandberryhub.fruity .survey-welcome strong,
body.brandberryhub.fruity .survey-welcome b {
    color: var(--bb-deep-purple, #2D1B4E) !important;
}

/* ALL buttons inside welcome text — override green/blue Bootstrap defaults */
body.brandberryhub.fruity .survey-welcome .btn,
body.brandberryhub.fruity .survey-welcome a.btn,
body.brandberryhub.fruity .survey-welcome .btn-success,
body.brandberryhub.fruity .survey-welcome .btn-primary,
body.brandberryhub.fruity .survey-welcome .btn-info,
body.brandberryhub.fruity .survey-welcome .btn-default,
body.brandberryhub.fruity .survey-welcome input[type="button"],
body.brandberryhub.fruity .survey-welcome a[href*="move"] {
    background: var(--bb-muted-gold, #C4A35A) !important;
    color: var(--bb-deep-purple, #2D1B4E) !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 10px 24px !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    transition: all 0.2s ease !important;
}

body.brandberryhub.fruity .survey-welcome .btn:hover,
body.brandberryhub.fruity .survey-welcome a.btn:hover {
    background: var(--bb-gold-hover, #D4B76A) !important;
    box-shadow: 0 8px 30px rgba(196, 163, 90, 0.25) !important;
}

/* Arrow icon next to inline Next button */
body.brandberryhub.fruity .survey-welcome .btn img,
body.brandberryhub.fruity .survey-welcome .btn svg {
    filter: brightness(0) saturate(100%);
    max-height: 14px;
    vertical-align: middle;
    margin-left: 4px;
}

/* "There are N questions" text — subtle */
body.brandberryhub.fruity .survey-welcome + *,
body.brandberryhub.fruity [class*="question-count"],
body.brandberryhub.fruity .survey-welcome small {
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    color: var(--bb-medium-gray, #888) !important;
    font-size: 13px !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 8: Group name/description — compact, dynamic height
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   FIX 8: Group zone — compact, cohesive design
   Actual fruity structure:
     div#group-N.group-outer-container.space-col
       div.group-container.space-col
         div.group-title.text-center.h3.space-col  ← "Sociodemografice"
         div.question-container  ← questions
   Problem: .space-col adds margin-top:1em + margin-bottom:2em at THREE levels
   Plus .h3 adds margin-top:2rem from Bootstrap base.css
   ═══════════════════════════════════════════════════════════════ */

/* Nuclear kill on ALL .space-col margins inside group structure */
body.brandberryhub.fruity .group-outer-container,
body.brandberryhub.fruity .group-outer-container.space-col,
body.brandberryhub.fruity .group-container,
body.brandberryhub.fruity .group-container.space-col {
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Group title — override .h3 and .space-col and .text-center */
body.brandberryhub.fruity .group-title,
body.brandberryhub.fruity .group-title.h3,
body.brandberryhub.fruity .group-title.h3.space-col,
body.brandberryhub.fruity .group-title.text-center {
    font-family: var(--bb-serif, 'Playfair Display', Georgia, serif) !important;
    font-weight: 600 !important;
    font-size: clamp(20px, 2.8vw, 28px) !important;
    color: var(--bb-deep-purple, #2D1B4E) !important;
    text-align: left !important;
    margin: 0 0 6px 0 !important;
    padding: 6px 0 4px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.3px !important;
    border: none !important;
}

/* Catch any remaining .space-col inside groups */
body.brandberryhub.fruity [id^="group-"] .space-col {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

/* .group-outer fallback for non-fruity */
.brandberryhub .group-outer {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    margin-top: 4px !important;
    margin-bottom: 2px !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 1: Reduce spațiu gol pe mobil (header → conținut)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Welcome area — reduce padding masiv */
    body.brandberryhub.fruity .survey-welcome,
    .brandberryhub .survey-welcome {
        padding: 16px 0 !important;
    }
    /* Group title — compact on mobile (actual fruity selectors) */
    body.brandberryhub.fruity .group-outer,
    body.brandberryhub.fruity .group-outer-container,
    body.brandberryhub.fruity .group-outer-container.space-col,
    body.brandberryhub.fruity .group-container,
    body.brandberryhub.fruity .group-container.space-col {
        padding: 0 !important;
        margin: 2px 0 0 0 !important;
    }
    body.brandberryhub.fruity .group-name,
    body.brandberryhub.fruity .group-title,
    body.brandberryhub.fruity .group-title.h3,
    body.brandberryhub.fruity .group-title.h3.space-col {
        margin: 0 0 4px 0 !important;
        padding: 4px 0 2px !important;
        font-size: clamp(18px, 5vw, 24px) !important;
    }
    /* Reduce question spacing */
    body.brandberryhub.fruity .question-container {
        margin-bottom: 10px !important;
    }
    /* Navbar compact */
    body.brandberryhub.fruity #survey-nav {
        padding: 2px 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 2: Scala 1-5 / bootstrap buttons — nu se taie pe mobil
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    /* Force bootstrap button groups to wrap vertically */
    body.brandberryhub.fruity .answers-list[data-bs-toggle="buttons"].row,
    body.brandberryhub.fruity .answers-list.row {
        flex-direction: column !important;
        gap: 6px !important;
    }
    body.brandberryhub.fruity .answers-list .bootstrap-buttons-div,
    body.brandberryhub.fruity .bootstrap-buttons-div[class*="col-"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    body.brandberryhub.fruity .bootstrap-buttons-div label.btn {
        width: 100% !important;
        text-align: left !important;
        padding: 14px 18px !important;
    }
    /* 5-point inline scale — allow horizontal scroll if needed */
    body.brandberryhub.fruity table.question tbody tr {
        overflow-x: auto !important;
    }
    body.brandberryhub.fruity table.question tbody td {
        min-width: 44px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 3: "No answer" — subtle, nu gold
   ═══════════════════════════════════════════════════════════════ */
/* Default state — gri discret */
body.brandberryhub.fruity .noanswer-item label.btn,
body.brandberryhub.fruity .noanswer-item > label,
body.brandberryhub.fruity label.btn[data-value=""],
body.brandberryhub.fruity .bootstrap-buttons-div:last-child label.btn:last-of-type {
    background: var(--bb-warm-white, #FAFAF8) !important;
    color: var(--bb-medium-gray, #888) !important;
    border-color: var(--bb-light-gray, #E8E8E8) !important;
    font-size: 13px !important;
    opacity: 0.7;
}
/* Hover — subtle */
body.brandberryhub.fruity .noanswer-item label.btn:hover,
body.brandberryhub.fruity .noanswer-item > label:hover {
    opacity: 1;
    background: var(--bb-light-lavender, #F3EDF9) !important;
}
/* Checked state — nu gold, ci gri */
body.brandberryhub.fruity .noanswer-item input:checked + label.btn,
body.brandberryhub.fruity .noanswer-item input[type="radio"]:checked + label {
    background: var(--bb-light-gray, #E8E8E8) !important;
    color: var(--bb-near-black, #1A1A2E) !important;
    border-color: var(--bb-medium-gray, #888) !important;
    box-shadow: none !important;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 4: Logo vizibil — override LS 6.x constraints
   ═══════════════════════════════════════════════════════════════ */
/* Parent containers — remove size constraints */
body.brandberryhub.fruity .navbar-brand,
body.brandberryhub.fruity a.navbar-brand,
body.brandberryhub.fruity .brand-logo {
    height: auto !important;
    max-height: none !important;
    max-width: none !important;
    padding: 4px 12px !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
}
/* The image itself — force visible size */
body.brandberryhub.fruity .navbar-brand img,
body.brandberryhub.fruity a.navbar-brand img,
body.brandberryhub.fruity img.logo,
body.brandberryhub.fruity .brand-logo img,
body.brandberryhub.fruity #survey-nav img,
#survey-nav .navbar-brand img {
    max-height: 70px !important;
    min-height: 40px !important;
    width: auto !important;
    height: auto !important;
    max-width: 280px !important;
    object-fit: contain !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-touch-callout: none !important;
    pointer-events: none !important;
    user-select: none !important;
}
/* Navbar itself — enough height */
body.brandberryhub.fruity #survey-nav,
body.brandberryhub.fruity nav.navbar {
    min-height: 40px !important;
}
/* Remove progress text if JS didn't catch it */
body.brandberryhub.fruity .bbh-progress-label {
    display: none !important;
}

/* Fallback logo rules — no body class dependency */
#survey-nav .navbar-brand img,
nav.navbar .navbar-brand img,
.navbar .navbar-brand img {
    max-height: 70px !important;
    min-height: 40px !important;
    height: auto !important;
    width: auto !important;
    max-width: 280px !important;
}
#survey-nav .navbar-brand,
nav.navbar .navbar-brand {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 5: Header compaction — reduce spațiu gol header (80% reducere)
   Zona 1: deasupra navbar-ului (top-container, body padding)
   Zona 2: sub navbar, deasupra progress bar / conținut
   ═══════════════════════════════════════════════════════════════ */

/* --- DESKTOP + GLOBAL --- */

/* Zona 1: Kill top space above navbar */
body.brandberryhub.fruity .top-container,
body.brandberryhub .top-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.brandberryhub.fruity {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Navbar itself — compact vertical padding */
body.brandberryhub.fruity #survey-nav,
body.brandberryhub.fruity nav.navbar,
body.brandberryhub #survey-nav {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    min-height: 40px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Zona 2: Kill space between navbar and progress/content */
body.brandberryhub.fruity .top-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
body.brandberryhub.fruity .clearfix,
body.brandberryhub.fruity #outerframeContainer {
    margin-top: 4px !important;
    padding-top: 0 !important;
}

/* Progress bar — tight to nav */
body.brandberryhub.fruity .progress,
body.brandberryhub .progress {
    margin-top: 2px !important;
    margin-bottom: 4px !important;
}

/* Kill space between progress bar and survey content */
body.brandberryhub.fruity article,
body.brandberryhub.fruity #dynamicReloadContainer,
body.brandberryhub.fruity article > form,
body.brandberryhub.fruity #dynamicReloadContainer > form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* First group after progress — no top margin */
body.brandberryhub.fruity .group-outer-container:first-of-type,
body.brandberryhub.fruity [id^="group-"]:first-of-type {
    margin-top: 0 !important;
}

/* Progress bar wrapper (fruity wraps it in a div) */
body.brandberryhub.fruity div[class*="progress"],
body.brandberryhub.fruity .navbar ~ div:not(#outerframeContainer):not(.container):not(.container-fluid) {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Logo — slightly smaller on desktop too (keep proportion) */
body.brandberryhub.fruity .navbar-brand img,
body.brandberryhub.fruity a.navbar-brand img,
body.brandberryhub.fruity #survey-nav img {
    max-height: 70px !important;
    min-height: 40px !important;
}

/* --- MOBILE — additional compaction + logo 80% --- */
@media (max-width: 768px) {
    /* Zona 1: Top space — zero */
    body.brandberryhub.fruity .top-container {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Navbar — extra compact on mobile */
    body.brandberryhub.fruity #survey-nav,
    body.brandberryhub.fruity nav.navbar {
        padding: 2px 0 !important;
        min-height: 36px !important;
    }

    /* Logo — 80% of desktop size */
    body.brandberryhub.fruity .navbar-brand img,
    body.brandberryhub.fruity a.navbar-brand img,
    body.brandberryhub.fruity #survey-nav img,
    #survey-nav .navbar-brand img {
        max-height: 56px !important;
        min-height: 32px !important;
        max-width: 200px !important;
    }

    /* Zona 2: Between nav and content — minimal */
    body.brandberryhub.fruity .clearfix,
    body.brandberryhub.fruity #outerframeContainer {
        margin-top: 2px !important;
    }

    /* Progress — tight */
    body.brandberryhub.fruity .progress {
        margin-top: 0 !important;
        margin-bottom: 2px !important;
    }

    /* Kill all spacing between progress and content on mobile */
    body.brandberryhub.fruity article,
    body.brandberryhub.fruity #dynamicReloadContainer {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 6: "Other" option (Alta/Altul) — clean integrated layout
   Target: any checkbox/radio item that contains a text input alongside it
   ═══════════════════════════════════════════════════════════════ */
/* Container for "other" option — all possible LS selectors */
body.brandberryhub.fruity .other-item,
body.brandberryhub.fruity .answer-item-onlyanswer-comment,
body.brandberryhub.fruity li.other,
body.brandberryhub.fruity .checkbox-item:has(input[type="text"]),
body.brandberryhub.fruity .radio-item:has(input[type="text"]),
body.brandberryhub.fruity li:has(input[type="checkbox"]):has(input[type="text"]),
body.brandberryhub.fruity li:has(input[type="radio"]):has(input[type="text"]) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    background: var(--bb-warm-white, #FAFAF8) !important;
    border: 1px solid var(--bb-mid-lavender, #E8DCF0) !important;
    border-radius: 0 !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

/* The label inside "other" — keep compact */
body.brandberryhub.fruity .other-item label,
body.brandberryhub.fruity .checkbox-item:has(input[type="text"]) label,
body.brandberryhub.fruity .radio-item:has(input[type="text"]) label,
body.brandberryhub.fruity li:has(input[type="checkbox"]):has(input[type="text"]) label {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    font-size: 14px !important;
    color: var(--bb-near-black, #1A1A2E) !important;
}

/* The "other" text input field */
body.brandberryhub.fruity .other-item input[type="text"],
body.brandberryhub.fruity .answer-item-onlyanswer-comment input[type="text"],
body.brandberryhub.fruity li.other input[type="text"],
body.brandberryhub.fruity .checkbox-item:has(input[type="text"]) input[type="text"],
body.brandberryhub.fruity .radio-item:has(input[type="text"]) input[type="text"],
body.brandberryhub.fruity input.other-comment-input,
body.brandberryhub.fruity .question-container input[id*="other"],
body.brandberryhub.fruity .question-container input[name*="other"] {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--bb-mid-lavender, #E8DCF0) !important;
    border-radius: 0 !important;
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    font-size: 14px !important;
    background: var(--bb-white, #FFFFFF) !important;
    color: var(--bb-near-black, #1A1A2E) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
body.brandberryhub.fruity .other-item input[type="text"]:focus,
body.brandberryhub.fruity .question-container input[id*="other"]:focus,
body.brandberryhub.fruity .question-container input[name*="other"]:focus {
    border-color: var(--bb-accent-purple, #5B2D8E) !important;
    box-shadow: 0 0 0 2px rgba(91, 45, 142, 0.12) !important;
    outline: none !important;
}

/* When "other" is selected — highlight like other answer cards */
body.brandberryhub.fruity .other-item:has(input:checked),
body.brandberryhub.fruity .checkbox-item:has(input[type="text"]):has(input:checked),
body.brandberryhub.fruity .radio-item:has(input[type="text"]):has(input:checked) {
    background: var(--bb-light-lavender, #F3EDF9) !important;
    border-color: var(--bb-accent-purple, #5B2D8E) !important;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    body.brandberryhub.fruity .other-item,
    body.brandberryhub.fruity li.other,
    body.brandberryhub.fruity .checkbox-item:has(input[type="text"]),
    body.brandberryhub.fruity .radio-item:has(input[type="text"]) {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    body.brandberryhub.fruity .other-item input[type="text"],
    body.brandberryhub.fruity li.other input[type="text"],
    body.brandberryhub.fruity .checkbox-item:has(input[type="text"]) input[type="text"],
    body.brandberryhub.fruity .question-container input[id*="other"] {
        width: 100% !important;
        margin-top: 6px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 7: Dropdown cleanup — hide spurious buttons via CSS too
   ═══════════════════════════════════════════════════════════════ */
body.brandberryhub.fruity .question-container .noanswer-item {
    /* Only hide near dropdowns — JS handles the logic */
}
/* Style dropdowns consistently */
body.brandberryhub.fruity select.form-select,
body.brandberryhub.fruity select.form-control {
    padding: 10px 14px !important;
    border: 1px solid var(--bb-mid-lavender, #E8DCF0) !important;
    border-radius: 0 !important;
    font-family: var(--bb-sans, 'Inter', sans-serif) !important;
    font-size: 15px !important;
    color: var(--bb-near-black, #1A1A2E) !important;
    background: var(--bb-white, #FFFFFF) !important;
    transition: border-color 0.2s ease !important;
    max-width: 100% !important;
}
body.brandberryhub.fruity select.form-select:focus,
body.brandberryhub.fruity select.form-control:focus {
    border-color: var(--bb-accent-purple, #5B2D8E) !important;
    box-shadow: 0 0 0 2px rgba(91, 45, 142, 0.12) !important;
    outline: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   FIX 9: Responsive media (images, video, iframes in questions)
   + Logo long-press prevention on mobile
   ═══════════════════════════════════════════════════════════════ */

/* Logo navbar link — prevent navigation and long-press */
body.brandberryhub.fruity .navbar-brand,
body.brandberryhub.fruity a.navbar-brand {
    -webkit-touch-callout: none !important;
    user-select: none !important;
}

/* Images inside questions — responsive, never overflow */
body.brandberryhub.fruity .question-container img:not(input),
body.brandberryhub.fruity .question-text img,
body.brandberryhub.fruity .question-help img,
body.brandberryhub.fruity .answer-item img,
body.brandberryhub.fruity .group-description img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 8px 0;
    border-radius: 0;
    cursor: zoom-in;
}

/* Images in answer labels — constrain size */
body.brandberryhub.fruity .answer-item label img {
    max-width: 200px !important;
    max-height: 150px !important;
    object-fit: contain;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    body.brandberryhub.fruity .answer-item label img {
        max-width: 100% !important;
        max-height: 200px !important;
    }
}

/* Video / iframe — responsive wrapper */
body.brandberryhub.fruity .question-container iframe,
body.brandberryhub.fruity .question-container video {
    max-width: 100% !important;
    height: auto;
    display: block;
    margin: 8px 0;
    aspect-ratio: 16 / 9;
    border: none;
}

body.brandberryhub.fruity .question-container video {
    background: #000;
}

/* Lightbox overlay — triggered by JS on image click */
.bbh-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: bbh-fade-in 0.2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.bbh-lightbox img {
    max-width: 92vw !important;
    max-height: 90vh !important;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

.bbh-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #FFFFFF;
    font-size: 32px;
    font-family: var(--bb-sans, Inter, sans-serif);
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.bbh-lightbox-close:hover {
    opacity: 1;
}

@keyframes bbh-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   FIX 10: Protected media — anti-copy visual layer
   Activated per-image via class="bbh-protected" in question source
   ═══════════════════════════════════════════════════════════════ */

/* Wrapper for canvas + overlay */
.bbh-protected-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

.bbh-protected-wrap canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Invisible overlay that blocks all interactions */
.bbh-protected-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: transparent;
    cursor: default;
}

/* Protection notice (shown during blur) */
.bbh-protection-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    background: rgba(45, 27, 78, 0.9);
    color: var(--bb-white, #FFFFFF);
    padding: 12px 24px;
    font-family: var(--bb-sans, Inter, sans-serif);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    pointer-events: none;
    display: none;
}

/* Hide original protected image (JS replaces with canvas) */
img.bbh-protected[data-bbh-protected="done"] {
    display: none !important;
}

/* Print protection — hide protected content in print */
@media print {
    .bbh-protected-wrap {
        display: none !important;
    }
    .bbh-protected-wrap::after {
        content: '[Conținut protejat — nu poate fi printat]';
        display: block;
        padding: 40px;
        text-align: center;
        color: var(--bb-medium-gray, #888);
        font-style: italic;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SOFT AUTO-ADVANCE — animated border around Next when all answered
   ═══════════════════════════════════════════════════════════════ */
/* Previous button — NEVER animate */
.ls-move-previous-btn.bbh-pulse-ready,
.ls-move-previous-btn.bbh-pulse-ready::before {
    animation: none !important;
    background: none !important;
}

.bbh-pulse-ready {
    position: relative !important;
    animation: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: 1 !important;
}

.bbh-pulse-ready::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(90deg,
        var(--bb-accent-purple, #5B2D8E),
        var(--bb-light-purple, #7B4DB5),
        var(--bb-muted-gold, #C4A35A),
        var(--bb-accent-purple, #5B2D8E)
    );
    background-size: 300% 100%;
    animation: bbh-border-flow 2.5s linear infinite;
    z-index: -1;
    border-radius: 2px;
}

@keyframes bbh-border-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Fix Previous / Next alignment — same row */
body.brandberryhub.fruity .navigator,
body.brandberryhub.fruity .navigator.row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 0 !important;
}

body.brandberryhub.fruity .navigator .col-6:first-child {
    flex: 0 0 auto !important;
    text-align: left !important;
}

body.brandberryhub.fruity .navigator .col-6:last-child {
    flex: 1 1 auto !important;
    text-align: center !important;
}
