/*
 * pitch.css — Pitch rendering (Phase 6).
 * Coordinates come from formations.js; y=0 is OUR goal (bottom of screen),
 * so cards use top = (100 - slot.y)% with physical left/top (never logical
 * RTL properties) and translate(-50%, -50%) centering.
 */

.pitch {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12) 0 11%, transparent 11.5%),
    linear-gradient(to left, transparent 49.7%, rgba(255, 255, 255, 0.18) 49.7%, rgba(255, 255, 255, 0.18) 50.3%, transparent 50.3%),
    linear-gradient(#2e7d32, #1b5e20);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.pitch-field {
  position: absolute;
  inset: 6% 9%;
}

.player-card {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  max-width: 88px;
  padding: 0.22rem 0.4rem;
  background: #ffffff;
  color: #212121;
  border: 1px solid #9e9e9e;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.25;
}

.player-card-name {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 0.72rem;
}

.player-card-score {
  color: #1565c0;
  font-weight: 700;
  font-size: 0.72rem;
}

.player-card.editable {
  cursor: pointer;
}

.player-card.selected {
  outline: 3px solid #1565c0;
  outline-offset: 1px;
}

.player-card.locked {
  border-color: #455a64;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 1px #455a64 inset;
  cursor: default;
}

.lock-badge {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  background: #455a64;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.3;
}

.unlock-btn {
  font-size: 0.62rem;
  padding: 0.15rem 0.45rem;
  min-height: 30px;
  border-radius: 5px;
}

.manual-score {
  color: #e65100;
}
