.transactions-layout {
  align-items: start;
  display: block;
  max-width: 100%;
}

.transactions-section {
  min-width: 0;
  width: 100%;
}

.transactions-section h2 {
  margin-top: 0;
}

.transaction-view-tabs {
  display: flex;
  gap: 0.5rem;
  margin: -0.35rem 0 1rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  white-space: nowrap;
}

.transaction-view-tab {
  flex: 0 0 auto;
}

.transaction-visibility-filter,
.transaction-bulk-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.transaction-visibility-filter {
  margin: 0 0 1rem;
}

.transaction-visibility-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
  color: #1f2937;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
}

.transaction-visibility-toggle input[type="checkbox"] {
  accent-color: #2e3f9f;
  cursor: pointer;
  height: 1rem;
  margin: 0;
  width: 1rem;
}

.transaction-visibility-toggle label {
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.transaction-bulk-actions {
  margin: 0 0 1rem;
}

.transaction-action-button {
  appearance: none;
  border: 1px solid;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  padding: 0.55rem 0.85rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.transaction-action-button:hover,
.transaction-action-button:focus-visible {
  box-shadow: 0 2px 5px rgb(15 23 42 / 0.12);
}

.transaction-action-button:focus-visible {
  outline: 2px solid #2e3f9f;
  outline-offset: 2px;
}

.transaction-hide-button {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e3a8a;
}

.transaction-hide-button:hover,
.transaction-hide-button:focus-visible {
  background: #eef2ff;
  border-color: #2e3f9f;
}

.transaction-void-button {
  background: #fff1f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.transaction-void-button:hover,
.transaction-void-button:focus-visible {
  background: #fee2e2;
  border-color: #dc2626;
}

.transaction-effective-cell {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  justify-content: center;
  line-height: 1;
}

.transaction-effective-week {
  display: block;
}

tbody.transaction-team-labels-team-name .transaction-team-label[data-transaction-team-name],
.transactions-layout.transaction-effective-labels-abbreviated .transaction-effective-week[data-mobile-label] {
  font-size: 0;
}

.transactions-layout.transaction-effective-labels-abbreviated .transaction-effective-week[data-mobile-label]::before {
  content: attr(data-mobile-label);
  display: inline-block;
  font-size: var(--transaction-responsive-label-font-size, 1rem);
  line-height: 1.15;
}

tbody.transaction-team-labels-team-name .transaction-team-label[data-transaction-team-name]::before {
  content: attr(data-transaction-team-name);
  display: inline-block;
  font-size: var(--transaction-mobile-label-font-size, var(--transaction-responsive-label-font-size, 1rem));
  line-height: 1.15;
}

.transaction-status-badges {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.transaction-status-badge {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 0;
  padding: 0.15rem 0.35rem;
  vertical-align: middle;
}

.transaction-status-hidden {
  background: #eef2ff;
  color: #1e3a8a;
}

.transaction-status-voided {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.executed-trades-table,
.injured-reserves-table {
  background: var(--tlfl-surface);
  border: 1px solid var(--tlfl-table-border);
  border-collapse: separate;
  border-radius: var(--tlfl-radius);
  border-spacing: 0;
  box-shadow: 0 4px 14px rgb(17 24 39 / 0.05);
  overflow: hidden;
  table-layout: fixed;
  width: 100%;
}

.executed-trades-table .transaction-select-column,
.injured-reserves-table .transaction-select-column {
  max-width: 2rem;
  min-width: 2rem;
  width: 2rem;
}

.executed-trades-table .transaction-effective-column,
.injured-reserves-table .transaction-effective-column {
  width: 7.5rem;
}

.executed-trades-table .transaction-team-column,
.injured-reserves-table .transaction-team-column {
  width: 18rem;
}

.executed-trades-table .transaction-detail-column,
.injured-reserves-table .transaction-detail-column {
  width: auto;
}

.tlfl-team-page-controls {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
  max-width: 100%;
  width: 100%;
}

.tlfl-team-selector {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  max-width: 100%;
  min-width: 0;
}

.tlfl-team-selector label {
  flex: 0 0 auto;
  font-weight: 700;
}

.tlfl-team-selector select {
  flex: 1 1 auto;
  max-width: 100%;
  min-width: 0;
  width: min(18rem, 100%);
}

@media (min-width: 761px) {
  .tlfl-team-page-controls {
    margin: -0.25rem 0 1.15rem;
  }

  .tlfl-team-selector {
    background:
      linear-gradient(180deg, rgb(255 255 255 / 0.98), rgb(248 250 252 / 0.96));
    border: 1px solid #d5deec;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgb(17 24 39 / 0.08);
    gap: 0.65rem;
    padding: 0.5rem 0.6rem 0.5rem 0.75rem;
    width: min(100%, 25rem);
  }

  .tlfl-team-selector label {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  .tlfl-team-selector select {
    appearance: none;
    background:
      linear-gradient(45deg, transparent 50%, var(--team-primary-color, var(--tlfl-blue)) 50%) calc(100% - 1rem) 50% / 0.38rem 0.38rem no-repeat,
      linear-gradient(135deg, var(--team-primary-color, var(--tlfl-blue)) 50%, transparent 50%) calc(100% - 0.72rem) 50% / 0.38rem 0.38rem no-repeat,
      linear-gradient(180deg, #ffffff, #f3f6fb);
    border: 1px solid #b8c4d7;
    border-radius: 7px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.84);
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1.15;
    min-height: 2.45rem;
    padding: 0.5rem 2rem 0.5rem 0.72rem;
    transition: border-color 140ms ease, box-shadow 140ms ease;
    width: 18.75rem;
  }

  .tlfl-team-selector select:hover {
    border-color: #8fa0ba;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 2px 8px rgb(17 24 39 / 0.08);
  }

  .tlfl-team-selector select:focus-visible {
    border-color: var(--team-primary-color, var(--tlfl-blue));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-primary-color, var(--tlfl-blue)) 20%, transparent);
    outline: 0;
  }
}

.trade-asset-fieldset {
  border: 0;
  box-sizing: border-box;
  margin: 0 0 1rem;
  max-width: 26rem;
  padding: 0;
}

.trade-asset-fieldset legend {
  color: #475569;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.35rem;
  padding: 0;
  text-transform: uppercase;
}

.trade-asset-table-shell {
  margin-bottom: 0;
  width: 100%;
}

.trade-asset-table {
  min-width: 17rem;
}

.trade-asset-table th,
.trade-asset-table td {
  padding: 0.48rem 0.65rem;
  text-align: left;
}

.trade-asset-table tbody tr:nth-child(even) {
  background: var(--tlfl-table-row-alt);
}

.trade-asset-table tbody tr:hover {
  background: var(--tlfl-table-row-hover);
}

.trade-asset-table tbody tr.trade-asset-clickable-row {
  cursor: pointer;
}

.trade-asset-table tbody tr.trade-asset-linked-row {
  position: relative;
}

.trade-asset-table label {
  cursor: pointer;
  display: flex;
  gap: 0.4rem;
  line-height: 1.2;
  min-width: 0;
  width: 100%;
}

.trade-asset-table input[type="checkbox"] {
  accent-color: var(--tlfl-blue);
  cursor: pointer;
}

.trade-asset-check-column,
.trade-asset-table td:first-child {
  text-align: center;
  width: 2.4rem;
}

.trade-asset-table td.trade-asset-linked-checkbox-cell {
  box-shadow: inset 0.22rem 0 0 var(--trade-link-color, var(--tlfl-blue));
  vertical-align: middle;
}

.trade-player-asset-label {
  align-items: baseline;
  flex-wrap: wrap;
}

.trade-player-asset-name {
  display: block;
  flex: 0 1 auto;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.trade-asset-meta {
  color: var(--tlfl-text-muted);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  margin-left: 0;
}

.trade-protections-available {
  color: var(--tlfl-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.trade-protections-input {
  text-align: center;
  width: 3.1rem;
}

.trade-live-summary {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--tlfl-border);
  border-radius: var(--tlfl-radius);
  box-shadow: var(--tlfl-shadow-card);
  box-sizing: border-box;
  margin: 0 0 1rem;
  max-width: 58rem;
  padding: 1rem;
}

.trade-live-summary-header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.trade-live-summary-header h2 {
  font-size: 1.05rem;
  line-height: 1.1;
  margin: 0;
}

.trade-live-summary-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.trade-live-summary-clear {
  font-size: 0.78rem;
  line-height: 1;
  min-height: 1.8rem;
  padding: 0.34rem 0.55rem 0.22rem;
}

.trade-live-summary-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.trade-live-summary-side {
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--trade-team-primary-color, #1f2937) 6%, #ffffff),
      #ffffff 54%);
  border: 1px solid color-mix(in srgb, var(--trade-team-primary-color, #1f2937) 18%, var(--tlfl-border-subtle));
  border-left: 0.3rem solid var(--trade-team-primary-color, var(--tlfl-blue));
  border-radius: var(--tlfl-radius-sm);
  min-width: 0;
  padding: 0.75rem;
}

.trade-live-summary-side h3 {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.15;
  margin: 0 0 0.65rem;
}

.trade-live-summary-direction {
  color: var(--tlfl-text-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.trade-live-summary-list {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trade-live-summary-empty {
  border: 1px dashed var(--tlfl-border);
  border-radius: var(--tlfl-radius-sm);
  color: var(--tlfl-text-muted);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.55rem 0.65rem;
}

.trade-live-summary-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--tlfl-border-subtle);
  border-radius: var(--tlfl-radius-sm);
  display: grid;
  gap: 0.6rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.5rem 0.6rem;
}

.trade-live-summary-kind {
  background: color-mix(in srgb, var(--trade-team-primary-color, var(--tlfl-blue)) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--trade-team-primary-color, var(--tlfl-blue)) 22%, #ffffff);
  border-radius: 999px;
  color: color-mix(in srgb, var(--trade-team-primary-color, var(--tlfl-blue)) 70%, #111827);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.27rem 0.45rem;
  text-transform: uppercase;
}

.trade-live-summary-item-body {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.trade-live-summary-label {
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 0;
}

.trade-live-summary-meta {
  color: var(--tlfl-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.trade-team-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 28rem));
  justify-content: start;
}

.trade-assets-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 58rem;
  width: 100%;
}

.trade-assets-layout .trade-team-assets {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
}

.trade-selection-layout {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
}

.trade-team-selector,
.trade-team-assets {
  max-width: 28rem;
}

.trade-team-selector .ui-select,
.trade-week-selector .ui-select {
  width: 100%;
}

.trade-week-selector {
  width: 8.5rem;
}

.trade-team-selector {
  width: min(var(--commissioner-team-select-width), 100%);
}

.trade-team-selector .trade-team-select {
  width: min(var(--commissioner-team-select-width), 100%);
}

.trade-team-assets {
  background: var(--tlfl-surface);
  border: 1px solid var(--tlfl-border-subtle);
  border-radius: var(--tlfl-radius);
  box-shadow: var(--tlfl-shadow-card);
  padding: 1rem;
}

.trade-team-assets-selected {
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--trade-team-primary-color, #1f2937) 7%, #ffffff) 0%,
      #ffffff 56%);
  border-color: color-mix(in srgb, var(--trade-team-primary-color, #1f2937) 18%, var(--tlfl-border-subtle));
  overflow: hidden;
  padding-top: 1.25rem;
  position: relative;
}

.trade-team-assets-selected::before {
  background:
    linear-gradient(90deg,
      var(--trade-team-primary-color, #1f2937),
      color-mix(in srgb, var(--trade-team-secondary-color, var(--trade-team-primary-color, #1f2937)) 70%, #ffffff));
  content: "";
  height: 0.3rem;
  inset: 0 0 auto;
  position: absolute;
}

.trade-team-heading {
  display: grid;
  gap: 0.35rem;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.trade-team-assets>p {
  color: var(--tlfl-text-muted);
  font-weight: 800;
  margin: 0;
}

.trade-team-name {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
  min-width: 0;
}

.trade-team-name img {
  flex: 0 0 auto;
  height: 1.75rem;
  object-fit: contain;
  width: 1.75rem;
}

.trade-team-route {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.trade-team-route-word {
  color: var(--tlfl-text-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.trade-submit-actions {
  margin: 0.35rem 0 0;
}

.trade-submit-selector {
  margin: 0;
}

.executed-trades-table th,
.executed-trades-table td,
.injured-reserves-table th,
.injured-reserves-table td {
  border-bottom: 1px solid var(--tlfl-table-border);
  height: 2.25rem;
  line-height: 1.2;
  overflow: hidden;
  padding: 0.15rem 0.6rem;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.executed-trades-table th,
.injured-reserves-table th {
  background: var(--tlfl-table-header-bg);
  color: var(--tlfl-table-header-text);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.executed-trades-table .ui-table-empty-cell,
.injured-reserves-table .ui-table-empty-cell {
  height: auto;
  padding: 0.85rem 1rem;
  text-align: center;
  white-space: normal;
}

.executed-trades-table .trade-team-name,
.injured-reserves-table .trade-team-name {
  max-width: 100%;
}

.transaction-team-entry {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
}

.transaction-team-entry .transaction-team-badge {
  flex: 1 1 auto;
}

.executed-trades-table .transaction-team-badge,
.injured-reserves-table .transaction-team-badge {
  --transaction-team-color: var(--tlfl-blue);
  min-width: 0;
}

.transaction-team-badge::before {
  background: var(--transaction-team-color);
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 1.28rem;
  opacity: 0.78;
  width: 0.22rem;
}

.executed-trades-table tbody tr:hover .transaction-team-badge::before,
.injured-reserves-table tbody tr:hover .transaction-team-badge::before {
  opacity: 1;
}

.executed-trades-table .transaction-team-badge img,
.injured-reserves-table .transaction-team-badge img {
  background: #ffffff;
  border: 1px solid var(--tlfl-table-border);
  border-radius: 999px;
  height: 1.55rem;
  padding: 0.08rem;
  width: 1.55rem;
}

.executed-trades-table .trade-team-name span,
.injured-reserves-table .trade-team-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-responsive-label {
  max-width: 100%;
}

.transaction-trades-left {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75);
  color: #475569;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.64rem;
  font-weight: 900;
  gap: 0.2rem;
  height: 1.42rem;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 0.45rem;
  text-transform: uppercase;
}

.transaction-trades-left-number {
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1;
}

.transaction-trades-left-label {
  line-height: 1;
}

.transaction-trades-left:has(.trades-left-zero) {
  background: #fff1f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.transaction-trades-left-number .trades-left-zero {
  color: #dc2626;
}

.transaction-player-detail {
  align-items: baseline;
  display: inline-flex;
  gap: 0.25rem;
  max-width: 100%;
  min-width: 0;
  vertical-align: bottom;
  white-space: nowrap;
}

.transaction-player-detail .player-inline-meta {
  margin-left: 0;
}

.transaction-draft-pick-label .draft-pick-owner-meta {
  margin-left: 0.22rem;
}

.transaction-team-label,
.transaction-player-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: clip;
  vertical-align: bottom;
  white-space: nowrap;
}

.transaction-team-label {
  display: block;
}

.executed-trade-odd tr,
.injured-reserve-transaction-odd tr {
  background: var(--tlfl-table-row-alt);
}

.executed-trades-table tbody tr:hover,
.injured-reserves-table tbody tr:hover {
  background: var(--tlfl-table-row-hover);
}

.executed-trades-table tbody tr:first-child td,
.injured-reserves-table tbody tr:first-child td {
  border-top: 2px solid var(--tlfl-table-border-strong);
}

.executed-trades-table tbody:last-of-type tr:last-child td,
.injured-reserves-table tbody:last-of-type tr:last-child td {
  border-bottom: 0;
}
