/* ==========================================================================
   GMR KIT · SCUM CONTAINER GRID & WEAPON MOD INSPECTOR (AAA MODAL)
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. MODAL VISOR DE INSPECCIÓN DESGLOSADA (WEAPON MOD INSPECTOR)
   -------------------------------------------------------------------------- */
#weaponInspectorModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(4, 6, 9, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
  box-sizing: border-box;
}

#weaponInspectorModal.active {
  opacity: 1;
  visibility: visible;
}

.inspector-chassis {
  position: relative;
  width: 95%;
  max-width: 1080px;
  max-height: 92vh;
  background: linear-gradient(175deg, #11151e 0%, #0a0d13 100%);
  border: 2px solid #253043;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 106, 0, 0.15);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Encabezado del Inspector */
.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #1e2838;
  background: #090c12;
}

.inspector-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inspector-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 106, 0, 0.15);
  color: var(--tac-orange-bright);
  border: 1px solid var(--tac-orange);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.inspector-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.btn-close-inspector {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2b374a;
  color: #94a3b8;
  border-radius: 4px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-inspector:hover {
  background: rgba(255, 34, 51, 0.2);
  border-color: #ff3344;
  color: #fff;
}

/* Cuerpo del Inspector */
.inspector-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
}

/* Escenario Central del Arma con Cuadrícula Holográfica */
.inspector-stage {
  position: relative;
  background: #06090e;
  border: 1px solid #1a2230;
  border-radius: 4px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.inspector-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 208, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 208, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.inspector-weapon-img {
  max-width: 90%;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 15px rgba(255, 106, 0, 0.25));
  z-index: 2;
  transition: transform 0.3s ease;
}

/* Callout Tags hacia accesorios */
.inspector-callout-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Panel Lateral de Especificaciones y Accesorios */
.inspector-side-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.inspector-section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--tac-orange-bright);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Lista de Accesorios Instalados */
.mod-chips-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-chip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a2332;
  border-left: 3px solid var(--tac-orange);
  padding: 8px 12px;
  border-radius: 3px;
}

.mod-chip-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #05070a;
  border: 1px solid #242f40;
  border-radius: 3px;
  padding: 2px;
}

.mod-chip-info {
  display: flex;
  flex-direction: column;
}

.mod-chip-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 700;
}

.mod-chip-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
}

/* Barras de Desempeño Militar */
.perf-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.perf-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.perf-bar-track {
  height: 6px;
  background: #090c12;
  border: 1px solid #1f2736;
  border-radius: 3px;
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  background: var(--grad-orange);
  border-radius: 3px;
}

/* Cuadrícula de Suministros y Accesorios Combinables */
.inspector-addons-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.addon-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #38bdf8;
  padding: 7px 10px;
  border-radius: 4px;
  transition: all 0.18s ease;
}

.addon-card-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.4);
}

.addon-card-item.addon-cargador {
  border-left-color: #f59e0b;
}

.addon-card-item.addon-municion {
  border-left-color: #ff5500;
}

.addon-card-item.addon-optica {
  border-left-color: #c084fc;
}

.addon-card-item.addon-supresor {
  border-left-color: #38bdf8;
}

.addon-card-item.addon-mantenimiento {
  border-left-color: #10b981;
}

.addon-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.addon-card-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px;
  flex-shrink: 0;
}

.addon-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.addon-card-role {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--tac-orange-bright);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.addon-card-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.addon-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-addon-action {
  background: rgba(255, 102, 0, 0.12);
  border: 1px solid rgba(255, 102, 0, 0.35);
  color: var(--tac-orange-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-addon-action:hover {
  background: var(--tac-orange);
  color: #fff;
  border-color: #ff9900;
  box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
  transform: translateY(-1px);
}

/* Footer del Modal con botón para añadir al cofre */
.inspector-footer {
  padding: 16px 24px;
  border-top: 1px solid #1e2838;
  background: #090c12;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-inspector-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-orange);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
}

.btn-inspector-add:hover {
  background: var(--grad-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.6);
}

/* --------------------------------------------------------------------------
   02. VISUALIZADOR DE SLOTS TÁCTICO ESTILO SCUM
   -------------------------------------------------------------------------- */
.cart-view-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.btn-cart-view-mode {
  flex: 1;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cart-view-mode.active {
  background: rgba(255, 106, 0, 0.15);
  border-color: var(--tac-orange);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 106, 0, 0.2);
}

/* Cuadrícula SCUM real */
.scum-grid-viewport {
  display: none;
  background: #05070a;
  border: 1px solid #19202c;
  border-radius: 4px;
  padding: 12px;
  max-height: 380px;
  overflow: auto;
  position: relative;
}

.scum-grid-viewport.active {
  display: block;
}

.scum-container-grid {
  display: grid;
  grid-template-columns: repeat(10, 36px);
  grid-auto-rows: 36px;
  gap: 3px;
  background: #020305;
  padding: 6px;
  border: 1px solid #141b25;
  width: max-content;
  margin: 0 auto;
}

/* Celda vacía */
.scum-grid-cell {
  background: #090d14;
  border: 1px solid #131a24;
  border-radius: 2px;
  position: relative;
}

.scum-grid-cell::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

/* Objeto posicionado multi-slot */
.scum-grid-item {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.18) 0%, rgba(255, 106, 0, 0.06) 100%);
  border: 1px solid var(--tac-orange);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(255, 106, 0, 0.2);
  z-index: 3;
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.scum-grid-item:hover {
  border-color: #fff;
  box-shadow: 0 0 12px var(--tac-orange-glow);
  transform: scale(1.02);
  z-index: 5;
}

.scum-grid-item-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
}

.scum-grid-item-label {
  position: absolute;
  bottom: 2px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 4px;
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .inspector-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .inspector-stage {
    min-height: 240px;
    padding: 16px;
  }
}
