.page-template-page-live-draft-board-php main.is-live-draft-board-template {
  width: 100%;
  max-width: calc(var(--wp--style--global--content-size) + 500px) !important;
  box-sizing: border-box;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-template-page-live-draft-board-php main.is-live-draft-board-template > .bytown-live-draft-board {
  max-width: none;
}

.page-template-page-live-draft-board-php main.is-live-draft-board-template > .wp-block-post-title {
  text-align: center;
}

.page-template-page-live-draft-board-php header.wp-block-template-part .wp-block-group.alignfull > .wp-block-group.is-content-justification-space-between {
  width: 100%;
  justify-content: center !important;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.page-template-page-live-draft-board-php header.wp-block-template-part .wp-block-group.alignfull,
.page-template-page-live-draft-board-php header.wp-block-template-part .wp-block-group.alignfull > .wp-block-group,
.page-template-page-live-draft-board-php header.wp-block-template-part .wp-block-group.alignfull .wp-block-navigation {
  text-align: center;
}

.page-template-page-live-draft-board-php header.wp-block-template-part .wp-block-group.alignfull > .wp-block-group > .wp-block-group:first-child {
  justify-content: center !important;
  align-items: center;
}

.bytown-live-draft-board {
  margin-top: 1rem;
}

.bytown-live-draft-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bytown-live-draft-tab {
  padding: 0.75rem 0.5rem;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  background: #f8fafb;
  color: #1d2327;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

.bytown-live-draft-tab:hover,
.bytown-live-draft-tab-active {
  border-color: #135e96;
  background: #135e96;
  color: #fff;
}

.bytown-live-draft-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #f8fafb;
}

.bytown-live-draft-controls label {
  font-weight: 600;
}

.bytown-captain-reorder-status {
  font-weight: 600;
}

.bytown-captain-reorder-status-enabled {
  color: #166534;
}

.bytown-captain-reorder-status-disabled {
  margin-left: 0.5rem;
  color: #8a2424;
}

.bytown-captain-picking-status {
  margin-left: 0.5rem;
  font-weight: 600;
}

.bytown-captain-picking-status-enabled {
  color: #166534;
}

.bytown-captain-picking-status-disabled {
  color: #8a2424;
}

.bytown-live-draft-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.bytown-live-draft-switch-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bytown-live-draft-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #8c8f94;
  transition: background 0.15s ease;
}

.bytown-live-draft-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.bytown-live-draft-switch-label input:checked + .bytown-live-draft-switch {
  background: #2271b1;
}

.bytown-live-draft-switch-label input:checked + .bytown-live-draft-switch::after {
  transform: translateX(16px);
}

.bytown-live-draft-switch-label input:focus-visible + .bytown-live-draft-switch {
  outline: 2px solid #135e96;
  outline-offset: 2px;
}

.bytown-live-draft-controls select,
.bytown-live-draft-controls button {
  min-height: 36px;
  padding: 0.35rem 0.6rem;
}

.bytown-reset-board {
  background: #b3261e;
  color: #fff;
  border: 1px solid #8e1f19;
}

.bytown-reset-board:hover {
  background: #8e1f19;
}

.bytown-reset-picks {
  background: #8a4b08;
  color: #fff;
  border: 1px solid #6f3c06;
}

.bytown-reset-picks:hover {
  background: #6f3c06;
}

.bytown-live-draft-summary {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid #0057a8;
  background: #f4f7fb;
}

.bytown-live-draft-summary p {
  margin: 0.2rem 0;
}

.bytown-live-draft-readonly-note {
  margin: 0.8rem 0;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  background: #eef2f7;
  color: #2d3a4b;
  font-weight: 600;
}

.bytown-live-draft-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1rem;
  align-items: start;
}

.bytown-live-draft-tab-form {
  margin: 0;
}

.bytown-live-draft-main {
  padding: 0.75rem 0.5rem;
  border: 1px solid #c8d0d8;
  min-width: 0;
}

  cursor: pointer;
  display: block;
  width: 100%;
.bytown-live-draft-main > .bytown-board-section {
  width: 100%;
}

.bytown-live-draft-sidepanel {
  position: sticky;
  top: 1rem;
  border: 1px solid #d6dbe1;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bytown-live-draft-sidepanel h3,
.bytown-live-draft-sidepanel h4 {
  margin: 0;
}

.bytown-live-draft-sidepanel h4 {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: #3f4f64;
}

.bytown-sidepanel-team {
  margin: 0.45rem 0 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #163b66;
}

.bytown-sidepanel-roster {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.bytown-sidepanel-roster li {
  margin: 0.2rem 0;
}

.bytown-sidepanel-roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bytown-sidepanel-player-line {
  min-width: 0;
}

.bytown-sidepanel-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.bytown-sidepanel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.45rem;
  border: 1px solid transparent;
}

.bytown-sidepanel-badge-captain {
  color: #1b5e20;
  background: #e8f5e9;
  border-color: #9ccc65;
}

.bytown-sidepanel-badge-goalie {
  color: #0d47a1;
  background: #e3f2fd;
  border-color: #90caf9;
}

.bytown-sidepanel-empty {
  list-style: none;
  margin-left: -1.1rem;
  color: #5a6a7f;
}

.bytown-other-team-panels {
  margin-top: 1rem;
}

.bytown-other-team-panel {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid #d6dbe1;
}

.bytown-other-team-panel h4 {
  margin-top: 0;
}

.bytown-board-section {
  margin-top: 1.4rem;
}

.bytown-board-section::after {
  content: "";
  display: block;
  clear: both;
}

.bytown-board-warning {
  color: #9a5a00;
  background: #fff6e6;
  border: 1px solid #ffd59a;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
}

.bytown-skip-pick-box {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid #ffd59a;
  border-radius: 6px;
  background: #fffaf0;
}

.bytown-skip-pick-box p {
  margin: 0 0 0.6rem;
  color: #6b4b16;
}

.bytown-skip-pick-status {
  margin-left: 0.6rem;
  color: #4f5d6f;
}

.bytown-team-order {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.bytown-player-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  width: 100%;
  min-width: 0;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .bytown-live-draft-layout {
    grid-template-columns: 1fr;
  }

  .bytown-live-draft-sidepanel {
    position: static;
  }

  .bytown-board-section .bytown-team-order::before,
  .bytown-board-section .bytown-player-grid::before {
    content: "Swipe horizontally to see all 4 columns";
    display: block;
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: #5a6a7f;
    margin-bottom: 0.2rem;
    letter-spacing: 0.01em;
  }
}

.bytown-team-card,
.bytown-player-card {
  border: 1px solid #d6dbe1;
  border-radius: 10px;
  padding: 0.8rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.bytown-team-card-active {
  border: 3px solid #c62828;
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.12);
}

.bytown-team-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 0.65rem;
  border-radius: 8px;
  background: #f4f7fb;
  overflow: hidden;
}

.bytown-team-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bytown-player-card {
  position: relative;
  padding-top: 2.25rem;
}

.bytown-player-card-captain {
  border: 2px solid #2e7d32;
  box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.15);
}

.bytown-team-card[draggable="true"],
.bytown-player-card[draggable="true"] {
  cursor: move;
}

.bytown-team-card.is-dragging,
.bytown-player-card.is-dragging {
  opacity: 0.45;
}

.bytown-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  background: #0057a8;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.bytown-team-card h3,
.bytown-player-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.bytown-player-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.bytown-player-card p {
  margin: 0;
  color: #4f5d6f;
  font-size: 0.9rem;
}

.bytown-player-card p.bytown-player-position {
  color: #0057a8;
  font-weight: 600;
}

.bytown-player-stats-line {
  margin-top: 0.5rem !important;
  padding-top: 0.45rem;
  border-top: 1px solid #e2e7ee;
  font-size: 0.82rem !important;
  color: #344255 !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 0.55rem;
  align-items: center;
}

.bytown-player-stats-item {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  min-width: 0;
  gap: 0.28rem;
}

.bytown-player-stats-key {
  color: #5a6a7f;
  font-weight: 700;
}

.bytown-player-stats-val {
  margin-left: 0;
  font-variant-numeric: tabular-nums;
}

.bytown-player-stats-line-secondary {
  margin-top: 0.28rem !important;
  padding-top: 0;
  border-top: 0;
  font-size: 0.8rem !important;
}

.bytown-player-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.bytown-player-card-header h3 {
  min-width: 0;
}

.bytown-player-team-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #f4f7fb;
  overflow: hidden;
}

.bytown-player-team-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bytown-player-card-header + p {
  clear: both;
}

.bytown-draft-round {
  min-width: 2.25rem;
  text-align: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e8f1fc;
  border: 1px solid #b9d1ef;
  color: #0a4076;
  font-weight: 700;
}

.bytown-player-card .bytown-draft-round {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
}

.bytown-goalie-section {
  margin-top: 2rem;
  padding-top: 0.6rem;
  border-top: 2px dashed #d3dbe6;
}

.bytown-goalie-card {
  background: #fbfcfe;
}

.bytown-save-status {
  font-weight: 600;
  color: #174f1f;
}

.bytown-pick-player-btn {
  margin-top: 0.55rem;
  width: 100%;
  min-height: 34px;
  border: 1px solid #245d9b;
  background: #2f78c3;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.bytown-pick-player-btn:hover:not(:disabled) {
  background: #245d9b;
}

.bytown-pick-player-btn:disabled {
  background: #d9dee4;
  border-color: #c5ccd5;
  color: #6b7785;
  cursor: not-allowed;
}

.bytown-player-card-drafted {
  opacity: 0.6;
}

.bytown-drafted-by {
  display: block;
  margin-top: 0.55rem;
  font-weight: 700;
  color: #415267;
}

