/* Poker Elephant - Dual Matrix & Live Equity Styling (Compact Scaled) */

.dual-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.matrices-grid {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}

.player-block {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  flex: 0 0 660px;
  min-width: 660px;
  max-width: 660px;
}

.player-stats-panel {
  flex: 1;
  min-width: 232px;
}

.matrix-wrapper {
  flex: 0 0 420px;
  width: 420px;
  max-width: 420px;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.matrix-wrapper.hero {
  border-color: rgba(99, 102, 241, 0.2);
}

.matrix-wrapper.opp {
  border-color: rgba(239, 68, 68, 0.2);
}

.matrix-wrapper.active.hero {
  border-color: #6366f1;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.04);
}

.matrix-wrapper.active.opp {
  border-color: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}

/* Matrix Header Bar */
.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.matrix-title {
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-wrapper.hero .matrix-title { color: #a5b4fc; }
.matrix-wrapper.opp .matrix-title { color: #fca5a5; }

.active-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: none;
}

.matrix-wrapper.active .active-badge {
  display: inline-block;
}

.matrix-wrapper.hero .active-badge {
  background: #6366f1;
  color: #fff;
}

.matrix-wrapper.opp .active-badge {
  background: #ef4444;
  color: #fff;
}

/* Matrix Controls */
.matrix-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  width: 100%;
  box-sizing: border-box;
}

.slider-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.slider-label {
  font-size: 0.675rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.range-slider {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #1f293d;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}

.matrix-wrapper.opp .range-slider::-webkit-slider-thumb {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.percent-display {
  font-size: 0.7rem;
  font-weight: 700;
  color: #a5b4fc;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

.matrix-wrapper.opp .percent-display {
  color: #fca5a5;
}

.weight-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.weight-btn {
  padding: 2px 4px;
  font-size: 0.625rem;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.weight-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.matrix-wrapper.opp .weight-btn.active {
  background: #ef4444;
  border-color: #ef4444;
}

/* 13x13 Grid Layout - Perfect 1:1 Squares */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 1px;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.matrix-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.1s ease;
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-secondary);
}

.matrix-cell.pair {
  background: rgba(51, 65, 85, 0.7);
  color: #e2e8f0;
}

.matrix-cell.suited {
  background: rgba(30, 58, 138, 0.25);
}

.matrix-cell.offsuited {
  background: rgba(15, 23, 42, 0.45);
}

.matrix-cell:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.matrix-wrapper.hero .cell-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  opacity: 0.85;
}

.matrix-wrapper.opp .cell-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  opacity: 0.85;
}

.cell-text {
  position: relative;
  z-index: 2;
  letter-spacing: -0.5px;
}

.cell-combos {
  position: relative;
  z-index: 2;
  font-size: 0.475rem;
  font-weight: 600;
  opacity: 0.8;
}

/* Stats Footer Bar */
.matrix-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.matrix-wrapper.hero .stats-highlight { color: #a5b4fc; font-weight: 700; }
.matrix-wrapper.opp .stats-highlight { color: #fca5a5; font-weight: 700; }

/* Live Equity Bar Component */
.equity-bar-panel {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-eq-title { color: #a5b4fc; }
.opp-eq-title { color: #fca5a5; }

.equity-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-eq-fill {
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  height: 100%;
  transition: width 0.25s ease;
}

.opp-eq-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
  height: 100%;
  transition: width 0.25s ease;
}
