/* Camera-side player layout, ported from PlayerPositionTable.tsx. */
#operatorPlayerTable {
  --opt-ink: #f0f3e9;
  --opt-muted: #a2aca2;
  --opt-green: #9bd46c;
  --opt-border: #304034;
  width: 100%;
  margin: 8px auto 2px;
  color: var(--opt-ink);
  font-family: inherit;
}

#operatorPlayerTable .opt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  min-height: 184px;
}

#operatorPlayerTable .opt-side {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0 0;
}

#operatorPlayerTable .opt-seat {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
  padding: 7px 5px;
  border: 1px solid var(--opt-border);
  border-radius: 9px;
  background: #141a17;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

#operatorPlayerTable .opt-seat--singles {
  min-height: 112px;
  align-self: center;
  flex: 1 1 auto;
}

#operatorPlayerTable .opt-role {
  display: block;
  color: var(--opt-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}

#operatorPlayerTable .opt-seat--singles .opt-role {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .5px;
}

#operatorPlayerTable .opt-player {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: #d4e4c6;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#operatorPlayerTable .opt-empty {
  color: #738075;
  font-size: 10px;
  line-height: 1.35;
}

#operatorPlayerTable .opt-singles-count {
  margin-top: 5px;
  color: var(--opt-muted);
  font-size: 10px;
  line-height: 1.3;
}

#operatorPlayerTable .opt-side-status {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  max-width: calc(100% - 8px);
  transform: translate(-50%, -50%);
  padding: 2px 5px;
  border-radius: 4px;
  background: #141a17;
  color: var(--opt-green);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .7px;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}

#operatorPlayerTable .opt-position-swap {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-color: #47733b;
  background: #141a17;
}

#operatorPlayerTable .opt-position-swap:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(.94);
}

#operatorPlayerTable .opt-pending {
  margin-top: 5px;
  color: #e1c67e;
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

#operatorPlayerTable .opt-field-frame {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: center;
  padding-top: 7px;
  border: 1px solid #2d3b31;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #0f1411;
}

#operatorPlayerTable .opt-field {
  position: relative;
  width: 70px;
  height: 176px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 3px solid #66775b;
  border-radius: 8px;
  background: #203727;
}

#operatorPlayerTable .opt-field--singles {
  height: 176px;
}

#operatorPlayerTable .opt-center-line {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  transform: translateY(-50%);
  background: #d8e8c2;
  opacity: .55;
}

#operatorPlayerTable .opt-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 1px solid #d8e8c2;
  border-radius: 50%;
  opacity: .7;
}

#operatorPlayerTable .opt-icon-button {
  display: inline-flex;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #47733b;
  border-radius: 7px;
  background: #152319;
  color: var(--opt-green);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, opacity 140ms ease, background-color 140ms ease;
}

#operatorPlayerTable .opt-icon-button:hover:not(:disabled) {
  background: #203727;
}

#operatorPlayerTable .opt-icon-button:active:not(:disabled) {
  transform: scale(.94);
}

#operatorPlayerTable .opt-icon-button:focus-visible {
  outline: 2px solid #b9e593;
  outline-offset: 2px;
}

#operatorPlayerTable .opt-icon-button:disabled {
  opacity: .36;
  cursor: not-allowed;
}

#operatorPlayerTable .opt-icon-button svg {
  display: block;
  width: 17px;
  height: 17px;
}

#operatorPlayerTable .opt-side-swap {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 31px;
  height: 31px;
  transform: translate(-50%, -50%);
  border-color: #6d9852;
  border-radius: 50%;
  background: #17251a;
  box-shadow: 0 0 0 3px rgba(15, 20, 17, .82);
}

#operatorPlayerTable .opt-side-swap:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(.94);
}

#operatorPlayerTable .opt-camera-row {
  display: flex;
  justify-content: center;
}

#operatorPlayerTable .opt-camera-panel {
  display: flex;
  width: 90px;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  border: 1px solid #2d3b31;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #0f1411;
}

#operatorPlayerTable .opt-camera-beam {
  width: 54px;
  height: 10px;
  border-radius: 0 0 22px 22px;
  background: #17251a;
}

#operatorPlayerTable .opt-camera-mark {
  display: flex;
  min-height: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

#operatorPlayerTable .opt-camera-icon {
  display: grid;
  width: 20px;
  height: 14px;
  place-items: center;
  border: 1px solid #47733b;
  border-radius: 3px;
  background: #152319;
}

#operatorPlayerTable .opt-camera-lens {
  width: 6px;
  height: 6px;
  border: 1px solid var(--opt-green);
  border-radius: 50%;
}

#operatorPlayerTable .opt-camera-text {
  color: var(--opt-green);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1.2;
  text-align: center;
}

#operatorPlayerSwitchStatus {
  min-height: 1.1em;
  margin: 5px 2px 0;
  color: var(--opt-muted);
  font-size: .72rem;
  line-height: 1.35;
  text-align: center;
}

#operatorPlayerSwitchStatus[data-kind="success"] { color: #9bd46c; }
#operatorPlayerSwitchStatus[data-kind="error"] { color: #f0a19a; }
#operatorPlayerSwitchStatus[data-kind="pending"] { color: #e1c67e; }
#operatorPlayerTable .opt-waiting {
  margin: 6px 2px 0;
  color: var(--opt-muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  #operatorPlayerTable .opt-layout { grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr); gap: 4px; }
  #operatorPlayerTable .opt-field { width: 62px; }
  #operatorPlayerTable .opt-seat { padding-right: 3px; padding-left: 3px; }
  #operatorPlayerTable .opt-role { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  #operatorPlayerTable .opt-seat,
  #operatorPlayerTable .opt-icon-button { transition: none; }
}
