body {
    background-color: var(--default-body-bg-color);
    font-family: var(--default-font-family);
    color: var(--default-text-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background: var(--custom-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.header {
    background: var(--custom-white);
    color: var(--default-text-color);
    padding: 20px 30px;
    border-bottom: 3px solid rgb(var(--primary-rgb));
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.header-brand {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.header-brand--logo-right {
    flex-direction: row-reverse;
}

.header-brand--no-logo {
    justify-content: center;
}

.header-brand--no-logo .header-text-cell {
    flex: 1;
    text-align: center;
}

.header-logo-cell {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-text-cell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.client-logo {
    max-height: 50px;
    height: auto;
    width: auto;
    object-fit: contain;
}

.survey-header-text {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    color: var(--default-text-color);
    word-break: break-word;
}

.header p {
    margin: 8px 0 0 0;
    font-size: 1.1em;
    color: var(--text-muted);
}

.content {
    padding: 30px;
}

.form-container {
    background: var(--custom-white);
    border: 1px solid var(--default-border);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgb(var(--primary-rgb));
}

.form-header h2 {
    margin: 0 0 10px 0;
    color: var(--default-text-color);
    font-size: 1.8em;
    font-weight: 600;
    display: none; /* Ocultar el nombre de la encuesta */
}

.form-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.1em;
    display: none; /* Ocultar la descripción del formulario */
}

.dynamic-form {
    margin-bottom: 30px;
}

.form-field {
    background: var(--custom-white);
    border: 1px solid var(--default-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.form-field:hover {
    border-color: rgb(var(--primary-rgb));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--default-text-color);
    font-size: 1.1em;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: var(--form-control-bg);
    color: var(--default-text-color);
}

/* Selects usan form-select de Bootstrap/Xintra */
.form-field select.form-select {
    width: 100%;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select.form-select:focus {
    outline: none;
    border-color: rgb(var(--primary-rgb));
    box-shadow: 0 0 0 2px var(--primary01);
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.radio-group,
.checkbox-group {
    margin-top: 10px;
}

.radio-group.horizontal,
.checkbox-group.horizontal {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary-rgb)) var(--gray-1, #f0f0f0);
    padding-bottom: 4px;
}

/* Scrollbar visible para opciones horizontales - indicar que hay scroll lateral */
.radio-group.horizontal::-webkit-scrollbar,
.checkbox-group.horizontal::-webkit-scrollbar {
    height: 8px;
}

.radio-group.horizontal::-webkit-scrollbar-track,
.checkbox-group.horizontal::-webkit-scrollbar-track {
    background: var(--gray-1, #f0f0f0);
    border-radius: 4px;
}

.radio-group.horizontal::-webkit-scrollbar-thumb,
.checkbox-group.horizontal::-webkit-scrollbar-thumb {
    background: rgb(var(--primary-rgb));
    border-radius: 4px;
}

.radio-group.horizontal::-webkit-scrollbar-thumb:hover,
.checkbox-group.horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.85);
}

.radio-group.horizontal .radio-option,
.checkbox-group.horizontal .checkbox-option {
    margin-bottom: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: var(--gray-1);
}

.radio-option input,
.checkbox-option input {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0;
}

.radio-option label,
.checkbox-option label {
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

.required {
    color: rgb(var(--danger-rgb));
}

.form-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--default-border);
}

/* Sobrescrituras de color para botones - Bootstrap/xintra proveen la base .btn */
.btn-success {
    background: rgb(var(--success-rgb));
}

.btn-success:hover {
    background: rgba(var(--success-rgb), 0.9);
}

.btn-secondary {
    background: var(--gray-6);
}

.btn-secondary:hover {
    background: var(--gray-7);
}

.loading-message,
.error-message {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
}

.loading-message {
    color: rgb(var(--primary-rgb));
}

.error-message {
    color: rgb(var(--danger-rgb));
    background-color: rgba(var(--danger-rgb), 0.1);
    border: 1px solid rgba(var(--danger-rgb), 0.3);
    border-radius: 6px;
}

/* Mensajes de estado */
.estado-borrador-message {
    background-color: rgba(var(--warning-rgb), 0.1);
    color: var(--default-text-color);
    border: 1px solid rgb(var(--warning-rgb));
}

.estado-cerrado-message {
    background-color: rgba(var(--success-rgb), 0.1);
    color: var(--default-text-color);
    border: 1px solid rgb(var(--success-rgb));
    border-radius: 8px;
    padding: 30px;
    font-size: 1.2em;
    text-align: center;
}

.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 0;
    }
    
    .content {
        padding: 20px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-field {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .form-header h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
    }
    
    .content {
        padding: 12px;
    }
    
    .form-container {
        padding: 12px;
    }
    
    .form-field {
        padding: 12px;
    }
    
    .form-field label {
        font-size: 1em;
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .header h1 {
        font-size: 1.4em;
    }
}

/* Success message styling */
.success-message {
    background-color: rgba(var(--success-rgb), 0.1);
    color: var(--default-text-color);
    border: 1px solid rgb(var(--success-rgb));
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* Validación visual al intentar enviar */
.form-validation-summary {
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.form-validation-summary__list {
    padding-left: 1.25rem;
    text-align: left;
}

.form-validation-summary .validation-jump-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.form-field.is-invalid {
    border-left: 3px solid rgb(var(--danger-rgb));
    background-color: rgba(var(--danger-rgb), 0.06);
    padding-left: 12px;
    margin-left: -3px;
}

.form-field.is-invalid .form-control,
.form-field.is-invalid .form-select,
.form-field.is-invalid .ql-container {
    border-color: rgb(var(--danger-rgb)) !important;
    box-shadow: 0 0 0 0.15rem rgba(var(--danger-rgb), 0.15);
}

.form-field.is-invalid .button-group,
.form-field.is-invalid .checkbox-group {
    outline: 2px solid rgba(var(--danger-rgb), 0.35);
    outline-offset: 4px;
    border-radius: 6px;
}

.field-invalid-feedback {
    display: block;
    color: rgb(var(--danger-rgb));
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-1);
    border-top: 3px solid rgb(var(--primary-rgb));
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Etiquetas NPS: demasiado improbable / neutral / demasiado probable */
.nps-labels-container {
    margin-top: 12px;
}

.nps-scale-labels {
    font-size: 0.75rem;
    color: #8b95a5;
    user-select: none;
    pointer-events: none;
}

.nps-scale-labels .nps-label-min,
.nps-scale-labels .nps-label-center,
.nps-scale-labels .nps-label-max {
    display: block;
}

/* Horizontal: etiquetas arriba del button-group/radio-group */
.nps-labels-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nps-labels-horizontal .nps-scale-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 2px 8px 0;
    line-height: 1.4;
}

.nps-labels-horizontal .nps-scale-labels .nps-label-min,
.nps-labels-horizontal .nps-scale-labels .nps-label-center,
.nps-labels-horizontal .nps-scale-labels .nps-label-max {
    flex: 1 1 0;
    min-width: 0;
    display: block;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
}

.nps-labels-horizontal .nps-scale-labels .nps-label-min {
    text-align: left;
}

.nps-labels-horizontal .nps-scale-labels .nps-label-max {
    text-align: right;
}

/* Vertical: etiquetas al lado en columna estrecha */
.nps-labels-vertical {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: stretch;
}

.nps-labels-vertical .nps-scale-labels {
    flex: 0 0 108px;
    max-width: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px 6px 0;
    line-height: 1.35;
}

.nps-labels-vertical .nps-scale-labels .nps-label-min {
    align-self: flex-start;
}

.nps-labels-vertical .nps-scale-labels .nps-label-center {
    align-self: center;
}

.nps-labels-vertical .nps-scale-labels .nps-label-max {
    align-self: flex-end;
}

.nps-labels-vertical .button-group,
.nps-labels-vertical .radio-group,
.nps-labels-vertical .checkbox-group {
    flex: 1;
    margin-top: 0;
}

/* Estilos para visualización tipo botones */
.button-group {
    display: flex;
    margin-top: 10px;
}

.button-group.vertical {
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.button-group.horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary-rgb)) var(--gray-1, #f0f0f0);
    padding-bottom: 4px;
}

.button-group.horizontal::-webkit-scrollbar {
    height: 8px;
}

.button-group.horizontal::-webkit-scrollbar-track {
    background: var(--gray-1, #f0f0f0);
    border-radius: 4px;
}

.button-group.horizontal::-webkit-scrollbar-thumb {
    background: rgb(var(--primary-rgb));
    border-radius: 4px;
}

.button-group.horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.85);
}

.button-group .button-option:not(.active) {
    background: var(--survey-option-btn-bg, white) !important;
    border-color: var(--survey-option-btn-border, rgb(var(--primary-rgb, 24, 119, 242))) !important;
    color: var(--survey-option-btn-text, rgb(var(--primary-rgb, 24, 119, 242))) !important;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

/* button-option usa btn btn-sm btn-outline-primary btn-wave - tamaños uniformes, texto visible */
.button-group .button-option {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    padding: 6px 8px;
    font-size: 0.8125rem;
    line-height: 1.3;
    box-sizing: border-box;
}

.button-group.vertical .button-option {
    flex: 0 1 auto;
    width: 100%;
    min-width: 80px;
    min-height: 34px;
}

.button-group.horizontal .button-option {
    flex: 0 0 auto;
    min-width: min-content;
    max-width: min(260px, 92vw);
    min-height: 34px;
    word-break: break-word;
}

/* Hover: mismo relleno que activo, ligeramente más claro */
.button-option:hover:not(.active):not(:disabled),
.button-group .button-option:hover:not(.active):not(:disabled) {
    background: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    border-color: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    color: var(--survey-btn-primary-text, white) !important;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Estado activo/seleccionado: fondo igual al color de borde configurado */
.button-option.active {
    background: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    color: var(--survey-btn-primary-text, white) !important;
    border-color: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    filter: none;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.button-option.active:hover {
    background: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    border-color: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb))))) !important;
    filter: brightness(1.04);
}

/* Responsive para botones horizontales - scroll lateral en móvil (ver estilos arriba) */

/* Estilos para pregunta tipo Matriz */
.matrix-wrapper {
    overflow-x: auto;
    margin-top: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary-rgb)) var(--gray-1, #f0f0f0);
}

.matrix-wrapper::-webkit-scrollbar {
    height: 8px;
}

.matrix-wrapper::-webkit-scrollbar-track {
    background: var(--gray-1, #f0f0f0);
    border-radius: 4px;
}

.matrix-wrapper::-webkit-scrollbar-thumb {
    background: rgb(var(--primary-rgb));
    border-radius: 4px;
}

.matrix-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.85);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 320px;
}

.matrix-table thead th {
    background: var(--gray-3, #e4e6eb);
    border: 1px solid var(--default-border, #d0d3da);
    padding: 10px 14px;
    text-align: center;
    font-weight: 600;
    color: var(--default-text-color);
    white-space: nowrap;
}

.matrix-table th.matrix-row-label {
    text-align: left;
    min-width: 140px;
}

.matrix-table tbody tr {
    transition: background-color 0.15s ease;
}

.matrix-table tbody tr:nth-child(even) {
    background: var(--gray-1, #f8f9fa);
}

.matrix-table tbody tr:hover {
    background: var(--primary01, rgba(var(--primary-rgb), 0.06));
}

.matrix-table td {
    border: 1px solid var(--default-border, #d0d3da);
    padding: 10px 14px;
    vertical-align: middle;
}

.matrix-table td.matrix-row-label {
    font-weight: 500;
    color: var(--default-text-color);
    white-space: nowrap;
    min-width: 140px;
}

.matrix-table td.matrix-cell {
    text-align: center;
}

.matrix-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: rgb(var(--primary-rgb));
    vertical-align: middle;
}

.matrix-radio-label {
    display: none;
}

.matrix-required-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 576px) {
    .matrix-table th,
    .matrix-table td {
        padding: 8px 8px;
        font-size: 12px;
    }

    .matrix-table th.matrix-row-label,
    .matrix-table td.matrix-row-label {
        min-width: 100px;
    }
}

/* ─── Emoticonos (formulario display) ───────────────────────────────────── */
.emoticon-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.emoticon-group.horizontal { flex-direction: row; }
.emoticon-group.vertical   { flex-direction: column; }

/* NPS (10 emoticonos): una sola fila; reparto de espacio para evitar salto de línea */
.emoticon-group.emoticon-group--metric-scale-horizontal.horizontal {
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.emoticon-group.emoticon-group--metric-scale-horizontal.horizontal .emoticon-option {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 4px;
}
.emoticon-group.emoticon-group--metric-scale-horizontal.horizontal .emoticon-face {
    font-size: clamp(1.35rem, 2.5vw, 2.4rem);
}
.emoticon-group.emoticon-group--metric-scale-horizontal.horizontal .emoticon-label {
    font-size: 10px;
    max-width: 100%;
}

.emoticon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    border: 2px solid var(--survey-option-btn-border, var(--default-border));
    border-radius: 12px;
    cursor: pointer;
    background: #fff !important;
    transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s, filter 0.2s;
    min-width: 68px;
}
.emoticon-option:hover:not(.active) {
    border-color: var(--survey-option-btn-border, rgb(var(--primary-rgb)));
    background: color-mix(in srgb, var(--survey-option-btn-border, rgb(var(--primary-rgb))) 16%, white) !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.emoticon-option.active {
    border-color: var(--survey-option-btn-border, rgb(var(--primary-rgb)));
    background: var(--survey-option-btn-border, rgb(var(--primary-rgb))) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.emoticon-option.active:hover {
    filter: brightness(1.05);
}
.emoticon-face {
    font-size: 2.4rem;
    line-height: 1;
    user-select: none;
    transition: transform 0.15s;
}
.emoticon-option:hover .emoticon-face,
.emoticon-option.active .emoticon-face {
    transform: scale(1.15);
}
.emoticon-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.emoticon-option.active .emoticon-label {
    color: var(--survey-btn-primary-text, #fff);
    font-weight: 600;
}

/* ─── Barras de color / semáforo (formulario display) ───────────────────── */
.color-bar-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.color-bar-group.horizontal { flex-direction: row; }
.color-bar-group.vertical   { flex-direction: column; }

.color-bar-group.color-bar-group--metric-scale-horizontal.horizontal {
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary-rgb)) var(--gray-1, #f0f0f0);
}
.color-bar-group.color-bar-group--metric-scale-horizontal.horizontal .color-bar-option {
    flex: 0 0 auto;
    min-width: 40px;
    max-width: none;
}
.color-bar-group.color-bar-group--metric-scale-horizontal.horizontal::-webkit-scrollbar {
    height: 8px;
}
.color-bar-group.color-bar-group--metric-scale-horizontal.horizontal::-webkit-scrollbar-track {
    background: var(--gray-1, #f0f0f0);
    border-radius: 4px;
}
.color-bar-group.color-bar-group--metric-scale-horizontal.horizontal::-webkit-scrollbar-thumb {
    background: rgb(var(--primary-rgb));
    border-radius: 4px;
}

.color-bar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex: 1;
    min-width: 52px;
    max-width: 96px;
}
.color-bar-group.vertical .color-bar-option {
    flex-direction: row;
    max-width: 100%;
    min-width: unset;
}
.color-bar-block {
    width: 100%;
    height: 36px;
    border-radius: 8px;
    background-color: var(--bar-color, #999);
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.18s, opacity 0.2s, box-shadow 0.2s;
    opacity: 0.75;
}
.color-bar-group.vertical .color-bar-block {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.color-bar-option:hover .color-bar-block {
    opacity: 1;
    border-color: rgba(0,0,0,0.2);
    transform: scaleY(1.1);
}
.color-bar-option.active .color-bar-block {
    opacity: 1;
    border-color: rgba(0,0,0,0.35);
    transform: scaleY(1.14);
    box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}
.color-bar-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.color-bar-group.vertical .color-bar-label {
    max-width: 100%;
    text-align: left;
}
.color-bar-option.active .color-bar-label {
    color: var(--default-text-color);
    font-weight: 600;
}

/* ─── Estrellas (formulario display) ────────────────────────────────────── */
.star-group {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.star-option {
    font-size: 2.4rem;
    color: #d0d3da;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}
.star-option:hover,
.star-option.hover {
    color: #f5a623;
    transform: scale(1.2);
}
.star-option.active {
    color: #f5a623;
}

/* ─── Quill como campo de respuesta ─────────────────────────────────────── */

/* Título y Descripción */
.field-title-display,
.field-description-display {
    color: #212529;
    border-radius: 6px;
}
.field-title-display .title-field-content {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
}
.field-title-display .title-field-content strong,
.field-title-display .title-field-content b {
    font-weight: 700;
}
.field-title-display .title-field-content p {
    margin: 0;
    line-height: inherit;
}
.field-title-display .title-field-content .ql-size-small,
.description-field-content .ql-size-small { font-size: 0.75em !important; }
.field-title-display .title-field-content .ql-size-large,
.description-field-content .ql-size-large { font-size: 1.5em !important; }
.field-title-display .title-field-content .ql-size-huge,
.description-field-content .ql-size-huge { font-size: 2.5em !important; }
.field-title-display .title-field-content .ql-align-left,
.field-title-display .title-field-content p.ql-align-left { text-align: left !important; }
.field-title-display .title-field-content .ql-align-right,
.field-title-display .title-field-content p.ql-align-right { text-align: right !important; }
.field-title-display .title-field-content .ql-align-center,
.field-title-display .title-field-content p.ql-align-center { text-align: center !important; }
.field-title-display .title-field-content .ql-align-justify,
.field-title-display .title-field-content p.ql-align-justify { text-align: justify !important; }
.description-field-content { font-size: 1.1rem; line-height: 1.6; }
.description-field-content strong,
.description-field-content b { font-weight: 700; }
.description-field-content p { margin: 0; line-height: inherit; }
.description-field-content .ql-align-left,
.description-field-content p.ql-align-left { text-align: left !important; }
.description-field-content .ql-align-right,
.description-field-content p.ql-align-right { text-align: right !important; }
.description-field-content .ql-align-center,
.description-field-content p.ql-align-center { text-align: center !important; }
.description-field-content .ql-align-justify,
.description-field-content p.ql-align-justify { text-align: justify !important; }

/* Quill editores de respuesta */
.quill-response-editor .ql-container {
    font-family: var(--default-font-family);
    font-size: 15px;
    background: white;
}
.quill-response-editor .ql-toolbar {
    background: var(--gray-1, #f8f9fa);
}
.quill-response-editor.quill-multiline .ql-toolbar {
    border-radius: 6px 6px 0 0;
}
.quill-response-editor.quill-multiline .ql-container {
    border-radius: 0 0 6px 6px;
}
.quill-response-editor.quill-multiline .ql-editor {
    min-height: 100px;
    padding: 10px 12px;
}

/* Modo inline: imitar un input de una sola línea */
.quill-response-editor.quill-inline.ql-container {
    border-radius: 6px !important;
    height: auto !important;
}
.quill-response-editor.quill-inline .ql-editor {
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 6px 12px !important;
    overflow-y: hidden !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
}
.quill-response-editor.quill-inline .ql-editor p {
    white-space: nowrap;
}

/* ─── Botones de selección en formulario ────────────────────────────────── */
.button-group.horizontal {
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.button-group.vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.button-option {
    padding: 10px 16px;
    border: 2px solid var(--survey-option-btn-border, rgb(var(--primary-rgb, 24, 119, 242)));
    background: var(--survey-option-btn-bg, white);
    color: var(--survey-option-btn-text, rgb(var(--primary-rgb, 24, 119, 242)));
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--default-font-family);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s, filter 0.2s;
    text-align: left;
}
.button-option:hover:not(.active):not(:disabled) {
    background: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb, 24, 119, 242))))) !important;
    border-color: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb, 24, 119, 242))))) !important;
    color: var(--survey-btn-primary-text, white) !important;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.button-option.active {
    background: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb, 24, 119, 242))))) !important;
    border-color: var(--survey-option-btn-border, var(--survey-btn-primary-border, var(--survey-btn-primary-bg, rgb(var(--primary-rgb, 24, 119, 242))))) !important;
    color: var(--survey-btn-primary-text, white) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

/* Hint text bajo etiqueta de selección */
.field-hint {
    font-size: 0.82em;
    color: var(--text-muted, #6c757d);
}
