diff --git a/nuxt4/app/components/cata/FormularioMuestra.vue b/nuxt4/app/components/cata/FormularioMuestra.vue index e58b480..b511254 100644 --- a/nuxt4/app/components/cata/FormularioMuestra.vue +++ b/nuxt4/app/components/cata/FormularioMuestra.vue @@ -27,18 +27,19 @@ -
+
@@ -48,19 +49,20 @@ -
+
@@ -949,7 +951,134 @@ watch(() => props.muestra.otrasNotas, (newVal) => { text-align: center; } +/* Grid de sensaciones */ +.sensaciones-grid { + display: flex; + flex-wrap: wrap; + gap: 0.375rem; +} + +.sensacion-item { + position: relative; + display: flex; + align-items: center; + gap: 0.375rem; + padding: 0.375rem 0.5rem; + min-height: 32px; +} + +.sensacion-item:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.sensacion-item:focus-visible { + box-shadow: 0 0 0 2px var(--cata-primary); +} + +.sensacion-text { + font-size: 0.75rem; +} + +/* Grid de gustos */ +.gustos-grid { + display: flex; + flex-wrap: wrap; + gap: 0.375rem; +} + +.gusto-item { + position: relative; + display: flex; + align-items: center; + gap: 0.375rem; + padding: 0.375rem 0.5rem; + min-height: 32px; +} + +.gusto-item:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.gusto-item:focus-visible { + box-shadow: 0 0 0 2px var(--cata-primary); +} + +.gusto-text { + font-size: 0.75rem; +} + +/* Animaciones */ +.sensacion-item.cata-checkbox-checked, +.gusto-item.cata-checkbox-checked { + transform: scale(1.02); +} + +.sensacion-item:not(.disabled):hover, +.gusto-item:not(.disabled):hover { + transform: scale(1.02); +} + +.sensacion-item:not(.disabled):active, +.gusto-item:not(.disabled):active { + transform: scale(0.98); +} + /* Responsive */ +@media (max-width: 640px) { + .sensacion-item { + min-height: 28px; + padding: 0.25rem 0.375rem; + } + + .sensacion-text { + font-size: 0.6875rem; + } + + .gusto-item { + min-height: 28px; + padding: 0.25rem 0.375rem; + } + + .gusto-text { + font-size: 0.6875rem; + } +} + +@media (min-width: 768px) { + .sensaciones-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 0.5rem; + } + + .sensacion-item { + min-height: 36px; + } + + .gustos-grid { + display: grid; + grid-template-columns: repeat(5, minmax(0, 1fr)); + gap: 0.5rem; + } + + .gusto-item { + min-height: 36px; + } +} + +/* Touch-friendly */ +@media (hover: none) and (pointer: coarse) { + .sensacion-item { + min-height: 36px; + } + + .gusto-item { + min-height: 36px; + } +} + @media (max-width: 768px) { .formulario-muestra { padding: 0.75rem;