/* Estilos del modulo Encuestas / Dashboard. Usa variables --ds-* de app.css. */

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.dashboard-chart-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    padding: 16px;
}

.dashboard-chart-card h3 {
    margin: 0 0 12px;
    font: 600 14px/18px inherit;
    color: var(--ds-text);
}

#surveyMap .mapboxgl-popup-content {
    background: var(--ds-surface);
    color: var(--ds-text);
    border-radius: 8px;
}

/* --- Formulario de nueva encuesta --- */
.survey-form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.survey-question-block {
    border-bottom: 1px solid var(--ds-border);
    padding-bottom: 14px;
}

.survey-question-block:last-child { border-bottom: none; }

.survey-choice-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
    padding: 6px 4px;
}

/* Radios/checkboxes de las preguntas de encuesta: grandes a proposito,
   se llenan en la calle desde el celular y necesitan un toque facil. */
.survey-choice-row input[type="radio"],
.survey-choice-row input[type="checkbox"] {
    width: 26px;
    height: 26px;
    min-height: 26px;
    flex-shrink: 0;
}

.survey-choice-row input[type="checkbox"]:checked::after {
    left: 8px;
    top: 3px;
    width: 7px;
    height: 13px;
    border-width: 0 3px 3px 0;
}

.survey-choice-row input[type="radio"]:checked::after {
    width: 13px;
    height: 13px;
}

.survey-choice-row label {
    font-size: 15px;
    line-height: 1.4;
    cursor: pointer;
}

.survey-scale-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.survey-scale-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--ds-border-input);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.survey-scale-chip input { display: none; }

.survey-scale-chip:has(input:checked) {
    border-color: var(--ds-border-brand);
    background: var(--ds-background-information);
    color: var(--ds-text-brand);
}

.survey-location-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--ds-surface-sunken);
    border-radius: 8px;
    padding: 12px;
}

/* --- Editor de opciones en el modal de preguntas --- */
.question-options-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.question-option-row input { flex: 1; }

/* --- Filtros del listado de encuestas --- */
.survey-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.survey-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--ds-text-subtle);
}

/* --- Banco de encuestas (administracion) --- */
.survey-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.survey-bank-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.survey-bank-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.survey-bank-card__head strong {
    font-size: 15px;
    color: var(--ds-text);
}

.survey-bank-card__stats {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ds-text-subtle);
}

.survey-bank-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.survey-bank-card__stats svg { width: 14px; height: 14px; }

/* --- Selector de encuesta a llenar (lista de tarjetas, /encuestas/nueva) --- */
.survey-picker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.survey-pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    text-decoration: none;
    background: var(--ds-surface);
    border: 1.5px solid var(--ds-border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.survey-pick-item:hover {
    border-color: var(--ds-border-brand);
    background: var(--ds-surface-hovered);
    box-shadow: 0 0 0 1px var(--ds-border-brand);
}

.survey-pick-item:active {
    background: var(--ds-background-information);
}

.survey-pick-item__body {
    flex: 1;
    min-width: 0;
}

.survey-pick-item__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-text);
}

.survey-pick-item__desc {
    font-size: 13px;
    color: var(--ds-text-subtle);
    margin-top: 2px;
}

.survey-pick-item__meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ds-text-subtlest);
}

.survey-pick-item__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.survey-pick-item__meta svg { width: 13px; height: 13px; }

.survey-pick-item__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ds-border);
}

.survey-pick-item__stats .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.survey-pick-item__stats .badge svg { width: 13px; height: 13px; }

.survey-pick-item__stats > span:not(.badge) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ds-text-subtlest);
}

.survey-pick-item__stats > span:not(.badge) svg { width: 13px; height: 13px; }

.survey-pick-item__arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--ds-text-subtlest);
}
