/**
 * Xenon Engine - Avatar Page Styles
 * Content Security Policy Compliant - No inline styles required
 * 20-Slot Gear System with Activity-Based Loadouts
 */

/* === AVATAR PAGE SPECIFIC === */

body {
  overflow-x: hidden;
  min-height: 100vh;
}

#container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 100px;
}

/* LEGACY: gear-label kept for floating panel compatibility */
.gear-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(3, 7, 18, 0.9);
  border: 1px solid var(--cyan-mid);
  color: var(--cyan-bright);
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.gear-slot:hover .gear-label {
  opacity: 1;
}

/* GEAR ITEM CARDS */
.gear-item-card {
  background: rgba(6, 182, 212, 0.03);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.gear-item-card:hover {
  border-color: var(--cyan-mid);
  background: rgba(6, 182, 212, 0.08);
}

.gear-item-card.equipped {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

/* SEARCH RESULTS */
.gear-search-result {
  margin-bottom: 8px;
}

.gear-search-result:last-child {
  margin-bottom: 0;
}

/* CONTROLS */
.control-panel {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  z-index: 20;
}

.tech-btn {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--cyan-mid);
  color: var(--cyan-bright);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'JetBrains Mono', monospace;
}

.tech-btn:hover {
  background: var(--cyan-bright);
  color: #000;
  box-shadow: 0 0 15px var(--cyan-mid);
}

.tech-btn-purple {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.5);
  color: #a855f7;
}

.tech-btn-purple:hover {
  background: #a855f7;
  color: #000;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* CONDITION BAR - CSP compliant (no inline styles) */
.condition-bar-container {
  width: 100%;
  height: 4px;
  background: #1e293b;
  border-radius: 9999px;
  margin-bottom: 8px;
  overflow: hidden;
}

.condition-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

/* Predefined width classes for CSP compliance */
.condition-bar-fill.w-0 { width: 0%; }
.condition-bar-fill.w-5 { width: 5%; }
.condition-bar-fill.w-10 { width: 10%; }
.condition-bar-fill.w-15 { width: 15%; }
.condition-bar-fill.w-20 { width: 20%; }
.condition-bar-fill.w-25 { width: 25%; }
.condition-bar-fill.w-30 { width: 30%; }
.condition-bar-fill.w-35 { width: 35%; }
.condition-bar-fill.w-40 { width: 40%; }
.condition-bar-fill.w-45 { width: 45%; }
.condition-bar-fill.w-50 { width: 50%; }
.condition-bar-fill.w-55 { width: 55%; }
.condition-bar-fill.w-60 { width: 60%; }
.condition-bar-fill.w-65 { width: 65%; }
.condition-bar-fill.w-70 { width: 70%; }
.condition-bar-fill.w-75 { width: 75%; }
.condition-bar-fill.w-80 { width: 80%; }
.condition-bar-fill.w-85 { width: 85%; }
.condition-bar-fill.w-90 { width: 90%; }
.condition-bar-fill.w-95 { width: 95%; }
.condition-bar-fill.w-100 { width: 100%; }

/* === LOADOUT BAR === */
#loadout-bar {
  margin-bottom: 24px;
}

.loadout-select {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid var(--border-color);
  color: var(--cyan-bright);
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.loadout-select:hover {
  border-color: var(--cyan-mid);
}

.loadout-select:focus {
  outline: none;
  border-color: var(--cyan-bright);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.loadout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #94a3b8;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.loadout-btn:hover {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.5);
  color: #e2e8f0;
}

.loadout-btn-cyan {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--cyan-mid);
}

.loadout-btn-cyan:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
}

.loadout-btn-red {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.loadout-btn-red:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

/* === SLOT GRID === */
#slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 900px;
}

.slot-category {
  background: rgba(6, 182, 212, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
}

.slot-category-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--cyan-mid);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.slot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.slot-item:hover {
  background: rgba(6, 182, 212, 0.05);
  border-color: var(--cyan-dim);
}

.slot-item.equipped {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.slot-item.equipped:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

.slot-item-icon {
  font-size: 12px;
  color: var(--cyan-dim);
  width: 16px;
  text-align: center;
}

.slot-item.equipped .slot-item-icon {
  color: #f59e0b;
}

.slot-item-info {
  flex: 1;
  min-width: 0;
}

.slot-item-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #94a3b8;
  text-transform: capitalize;
}

.slot-item.equipped .slot-item-name {
  color: #e2e8f0;
}

.slot-item-gear {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #f59e0b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

