/* SurveyJS — tema YOBY per dashboard scuola */
.yoby-survey-root {
    --sjs-font-family: inherit;
    --sjs-font-size: 15px;
    --sjs-corner-radius: 12px;
    --sjs-base-unit: 8px;
    --sjs-primary-backcolor: #2a8fc4;
    --sjs-primary-backcolor-light: rgba(42, 143, 196, 0.14);
    --sjs-primary-backcolor-dark: #1d6d96;
    --sjs-primary-forecolor: #ffffff;
    --sjs-secondary-backcolor: #2a8fc4;
    --sjs-secondary-forecolor: #ffffff;
    --sjs-shadow-small: 0 1px 3px rgba(0, 0, 0, 0.08);
    --sjs-shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --sjs-border-default: rgba(0, 0, 0, 0.14);
    --sjs-general-backcolor: #ffffff;
    --sjs-general-backcolor-dim: rgba(0, 0, 0, 0.03);
    --sjs-general-forecolor: rgba(20, 24, 32, 0.92);
    margin-top: 4px;
}

.yoby-survey-root.yoby-survey-pending {
    min-height: 4rem;
    display: flex;
    align-items: center;
}

.yoby-survey-root .yoby-survey-loading {
    margin: 0;
    opacity: 0.7;
    font-size: 0.95rem;
}

.yoby-survey-root.yoby-survey-themed .sd-root-modern,
.yoby-survey-root .sd-root-modern,
.yoby-survey-root .sd-body {
    background: transparent !important;
}

.yoby-survey-root .sd-title.sd-page__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: rgba(20, 24, 32, 0.92);
}

.yoby-survey-root .sd-page__description {
    opacity: 0.75;
    margin-bottom: 12px;
}

.yoby-survey-root .sd-question__title {
    font-weight: 600;
    color: rgba(20, 24, 32, 0.9);
}

.yoby-survey-root .sd-input,
.yoby-survey-root .sd-dropdown,
.yoby-survey-root input.sd-input,
.yoby-survey-root textarea.sd-input {
    border-radius: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.14) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 0.55rem 0.7rem !important;
    font: inherit;
    color: rgba(20, 24, 32, 0.92);
}

.yoby-survey-root .sd-input:focus,
.yoby-survey-root .sd-dropdown:focus-within {
    border-color: #2a8fc4 !important;
    box-shadow: 0 0 0 3px rgba(42, 143, 196, 0.18) !important;
}

.yoby-survey-root .sd-btn,
.yoby-survey-root .sd-navigation__complete-btn,
.yoby-survey-root .sd-btn--action,
.yoby-survey-root .sv-btn,
.yoby-survey-root .sv-btn--primary {
    border-radius: 999px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    background: #2a8fc4 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(42, 143, 196, 0.28);
}

.yoby-survey-root .sd-btn:hover,
.yoby-survey-root .sd-navigation__complete-btn:hover,
.yoby-survey-root .sd-btn--action:hover,
.yoby-survey-root .sv-btn:hover,
.yoby-survey-root .sv-btn--primary:hover {
    background: #1d6d96 !important;
}

.yoby-survey-root .sd-progress {
    margin-bottom: 16px;
}

.yoby-survey-root .sd-progress-buttons__button {
    color: #ffffff !important;
}

.yoby-survey-root .sd-progress-buttons__button--pressed,
.yoby-survey-root .sd-progress-buttons__list-element--current .sd-progress-buttons__button {
    background: #2a8fc4 !important;
}

.yoby-survey-compact {
    max-width: 520px;
}

.yoby-school-dashboard .yoby-survey-compact {
    max-width: none;
}

/* Checkbox / boolean: il tema Ghost e DefaultV2 schiacciano la label in 1 colonna. */
.yoby-survey-root .sd-selectbase,
.yoby-survey-root .sd-checkbox,
.yoby-survey-root .sd-item.sd-checkbox {
    width: 100%;
    max-width: 42rem;
    min-width: 0;
}

.yoby-survey-root .sd-selectbase__label {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.yoby-survey-root input[type="checkbox"].sd-item__control,
.yoby-survey-root .sd-checkbox .sd-item__control {
    width: auto !important;
    max-width: none;
    flex: 0 0 auto;
}

.yoby-survey-root .sd-item__decorator {
    flex: 0 0 auto;
}

.yoby-survey-root .sd-item--checked .sd-item__decorator,
.yoby-survey-root .sd-checkbox--checked .sd-item__decorator,
.yoby-survey-root .sd-radio--checked .sd-item__decorator {
    background: #2a8fc4 !important;
    border-color: #2a8fc4 !important;
}

.yoby-survey-root .sd-item__control-label,
.yoby-survey-root .sd-radio .sd-item__control-label,
.yoby-survey-root .sd-checkbox .sd-item__control-label {
    flex: 1 1 auto;
    min-width: 12rem;
    max-width: 100%;
    white-space: normal;
    writing-mode: horizontal-tb;
    color: rgba(20, 24, 32, 0.92) !important;
}

.yoby-survey-root .sd-item__control-label .sv-string-viewer {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    color: inherit !important;
}

/*
 * Boolean Yes/No: SurveyJS mette il testo sul thumb con color=primary-backcolor.
 * Con --sjs-general-backcolor trasparente il thumb è invisibile → blu su blu.
 */
.yoby-survey-root .sd-boolean {
    width: auto;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}

.yoby-survey-root .sd-boolean__switch,
.yoby-survey-root .sd-boolean--checked .sd-boolean__switch {
    background: #2a8fc4 !important;
}

.yoby-survey-root .sd-boolean__thumb {
    background: #ffffff !important;
    color: #15171a !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important;
}

.yoby-survey-root .sd-boolean__thumb .sv-string-viewer {
    color: #15171a !important;
}

.yoby-survey-root .sd-boolean__label {
    color: rgba(20, 24, 32, 0.55) !important;
}

.yoby-survey-root .sd-boolean.sd-boolean--checked .sd-boolean__label--true,
.yoby-survey-root .sd-boolean:not(.sd-boolean--checked):not(.sd-boolean--indeterminate) .sd-boolean__label--false {
    color: transparent !important;
}

.yoby-survey-root .sd-paneldynamic__add-btn {
    color: #2a8fc4 !important;
    border-color: rgba(42, 143, 196, 0.45) !important;
    border-radius: 999px !important;
}
