/* ==========================================================================
   ECLIPCSS CHROMATIC STUDIO & 600-VARIANT MATRIX CONTROLLER
   Panel de Control de Colorimetría para Administrador • TSolutions IPIDD
   ========================================================================== */

.chromatic-studio-container {
  background: linear-gradient(145deg, rgba(13, 19, 33, 0.96) 0%, rgba(20, 29, 47, 0.98) 100%);
  border: 1.5px solid rgba(50, 255, 126, 0.6);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7), 0 0 30px rgba(50, 255, 126, 0.25);
  margin-top: 30px;
  font-family: 'Quicksand', 'Advent Pro', sans-serif;
  color: #f1f5f9;
}

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.studio-title-box h2 {
  font-family: 'Advent Pro', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #32ff7e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}

.studio-title-box p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 4px 0 0 0;
}

.studio-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-select {
  background: #0f172a;
  color: #f8fafc;
  border: 1.5px solid rgba(50, 255, 126, 0.4);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-select:focus {
  border-color: #32ff7e;
  box-shadow: 0 0 10px rgba(50, 255, 126, 0.4);
}

/* Rejilla de Muestras Cromáticas de 600 Variantes */
.studio-matrix-viewport {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.studio-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
}

.studio-swatch-card {
  height: 64px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  position: relative;
}

.studio-swatch-card:hover {
  transform: translateY(-3px) scale(1.08);
  z-index: 10;
  border-color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(50, 255, 126, 0.6);
}

.studio-swatch-card.is-active {
  border: 2px solid #32ff7e;
  box-shadow: 0 0 15px #32ff7e;
  transform: scale(1.05);
}

.swatch-top-tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
}

.swatch-bottom-hex {
  font-size: 8.5px;
  font-weight: 700;
  font-family: monospace;
  line-height: 1;
}

/* Simulador de Componentes de Interfaz en Vivo */
.studio-ui-simulator {
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid rgba(50, 255, 126, 0.35);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.simulator-header h3 {
  font-size: 1.1rem;
  color: #32ff7e;
  margin: 0;
  font-family: 'Advent Pro', sans-serif;
  font-weight: 800;
}

.simulator-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

/* Mockup de Componentes */
.sim-preview-box {
  padding: 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.sim-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 700;
}

.sim-card {
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.sim-card h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.sim-card p {
  margin: 0 0 16px 0;
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.9;
}

.sim-btn-cta {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sim-btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Panel de Diagnóstico WCAG y Datos */
.sim-metrics-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.metric-badge-wcag {
  background: rgba(50, 255, 126, 0.2);
  color: #32ff7e;
  border: 1px solid #32ff7e;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.75rem;
}

/* Barra de Exportación de Tokens */
.studio-export-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-export-btn {
  background: rgba(50, 255, 126, 0.12);
  border: 1.5px solid rgba(50, 255, 126, 0.5);
  color: #32ff7e;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.studio-export-btn:hover {
  background: #32ff7e;
  color: #050505;
  box-shadow: 0 0 20px rgba(50, 255, 126, 0.5);
  border-color: #32ff7e;
}

@media (max-width: 800px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}
