.freshwater-tournament-workspace {
  --freshwater-tournament-browser-width: 68%;
  display: grid;
  grid-template-columns:
    minmax(0, var(--freshwater-tournament-browser-width))
    18px
    minmax(320px, 1fr);
  gap: 0;
  align-items: start;
  min-width: 0;
}

.freshwater-tournament-browser,
.freshwater-tournament-detail-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--club-color-border);
  background: #ffffff;
}

.freshwater-tournament-browser {
  border-radius: 12px 0 0 12px;
}

.freshwater-tournament-detail-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 0 12px 12px 0;
}

.freshwater-tournament-browser__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.freshwater-tournament-browser__header h3,
.freshwater-tournament-detail-panel > h3 {
  margin: 0;
  font-size: 1rem;
}

.freshwater-tournament-browser__header p,
.freshwater-tournament-browser__count {
  margin: 3px 0 0;
  color: var(--club-color-muted);
  font-size: 12px;
}

.freshwater-tournament-browser__count {
  flex: 0 0 auto;
  white-space: nowrap;
}

.freshwater-tournament-browser__tools {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--club-color-border);
  border-radius: 8px;
  background: var(--club-color-surface);
}

.freshwater-tournament-browser__tool {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
}

.freshwater-tournament-browser__tool input,
.freshwater-tournament-browser__tool select {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #78878b;
  border-radius: 5px;
  background: #ffffff;
  color: #172126;
  font: inherit;
  font-weight: 400;
}

.freshwater-tournament-browser__tool input:focus-visible,
.freshwater-tournament-browser__tool select:focus-visible {
  outline: 3px solid var(--club-focus-ring);
  outline-offset: 1px;
}

.freshwater-tournament-browser__table-wrap {
  max-height: 620px;
  overflow: auto;
  border: 1px solid #78878b;
  border-radius: 7px;
}

.freshwater-tournament-browser__table {
  width: 100%;
  min-width: 550px;
  border-collapse: separate;
  border-spacing: 0;
  color: #172126;
  font-size: 10px;
}

.freshwater-tournament-browser__table th,
.freshwater-tournament-browser__table td {
  padding: 6px;
  border-right: 1px solid #c6d0d2;
  border-bottom: 1px solid #c6d0d2;
  text-align: left;
  vertical-align: middle;
}

.freshwater-tournament-browser__table th:last-child,
.freshwater-tournament-browser__table td:last-child {
  border-right: 0;
}

.freshwater-tournament-browser__table tbody tr:last-child th,
.freshwater-tournament-browser__table tbody tr:last-child td {
  border-bottom: 0;
}

.freshwater-tournament-browser__table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #dce8e9;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.freshwater-tournament-browser__table thead th:first-child,
.freshwater-tournament-browser__select-cell {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center;
}

.freshwater-tournament-browser__table thead th:nth-child(2),
.freshwater-tournament-browser__event-name {
  width: 148px;
  min-width: 128px;
}

.freshwater-tournament-browser__table thead th:nth-child(3),
.freshwater-tournament-browser__table tbody td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
}

.freshwater-tournament-browser__select-cell input {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto;
  accent-color: #004f5a;
  cursor: pointer;
}

.freshwater-tournament-browser__event-name {
  font-weight: 700;
  line-height: 1.25;
}

.freshwater-tournament-browser__table tbody tr {
  background: #ffffff;
  cursor: pointer;
}

.freshwater-tournament-browser__table tbody tr:hover {
  background: color-mix(in oklab, #004f5a 7%, white 93%);
}

.freshwater-tournament-browser__table tbody tr[aria-selected="true"] {
  background: color-mix(in oklab, #004f5a 14%, white 86%);
  box-shadow: inset 4px 0 0 #004f5a;
}

.freshwater-tournament-browser__status-cell,
.freshwater-tournament-browser__registration-window-cell,
.freshwater-tournament-browser__member-status-cell {
  width: 74px;
  text-align: center !important;
}

.freshwater-tournament-browser__registration-window-cell {
  width: 86px;
}

.freshwater-tournament-browser__member-status-cell {
  width: 92px;
}

.freshwater-tournament-browser__table .freshwater-tournament-card__status-chip {
  width: calc(100% - 8px);
  min-height: 25px;
  padding: 3px 6px;
  font-size: 9px;
}

.freshwater-tournament-browser__registration-window-cell
  .freshwater-tournament-card__status-chip,
.freshwater-tournament-browser__member-status-cell
  .freshwater-tournament-card__status-chip {
  width: calc(100% - 12px);
}

.freshwater-tournament-browser__empty {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px dashed #78878b;
  border-radius: 7px;
  color: var(--club-color-muted);
  text-align: center;
}

.freshwater-tournament-workspace__divider {
  position: relative;
  align-self: stretch;
  width: 18px;
  min-width: 18px;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #004f5a;
  cursor: col-resize;
  touch-action: none;
}

.freshwater-tournament-workspace__divider span,
.freshwater-tournament-workspace__divider::before,
.freshwater-tournament-workspace__divider::after {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 34px;
  border-radius: 2px;
  background: #ffffff;
  content: "";
  transform: translateY(-50%);
}

.freshwater-tournament-workspace__divider::before {
  left: 5px;
}

.freshwater-tournament-workspace__divider span {
  left: 8px;
}

.freshwater-tournament-workspace__divider::after {
  left: 11px;
}

.freshwater-tournament-workspace__divider:hover {
  background: var(--club-color-hover);
}

.freshwater-tournament-workspace__divider:focus-visible {
  z-index: 3;
  outline: 3px solid var(--club-focus-ring);
  outline-offset: 2px;
}

.freshwater-tournament-detail-panel > h3 {
  margin-bottom: 10px;
  font-size: calc(1rem - 2px);
}

.freshwater-tournament-detail-panel .freshwater-tournament-card {
  border-radius: 8px;
  font-size: calc(1rem - 2px);
}

.freshwater-tournament-detail-panel .freshwater-tournament-card__title {
  font-size: calc(1.08rem - 4px);
}

.freshwater-tournament-detail-panel
  .freshwater-tournament-card__status-strip-label,
.freshwater-tournament-detail-panel
  .freshwater-tournament-card__description-label {
  font-size: 9px;
}

.freshwater-tournament-detail-panel
  .freshwater-tournament-card__status-chip {
  padding: 3px 8px;
  font-size: 10px;
}

.freshwater-tournament-detail-panel
  .freshwater-tournament-card__action-box
  .club-button {
  padding-right: 10px;
  padding-left: 10px;
  font-size: 10px;
}

.freshwater-tournament-detail-panel .freshwater-tournament-card__meta dt {
  font-size: calc(0.9rem - 2px);
}

[data-tournament-card][hidden],
[data-tournament-row][hidden] {
  display: none;
}

body.freshwater-tournament-workspace--dragging,
body.freshwater-tournament-workspace--dragging * {
  cursor: col-resize !important;
  user-select: none !important;
}

@media (max-width: 1180px) {
  .freshwater-tournament-browser__tools {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 1100px) {
  .freshwater-tournament-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .freshwater-tournament-browser,
  .freshwater-tournament-detail-panel {
    border-radius: 12px;
  }

  .freshwater-tournament-workspace__divider {
    display: none;
  }

  .freshwater-tournament-detail-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .freshwater-tournament-browser__header {
    display: grid;
  }

  .freshwater-tournament-browser__count {
    white-space: normal;
  }

  .freshwater-tournament-browser__tools {
    grid-template-columns: minmax(0, 1fr);
  }
}
