/* Survivors product host: Manage Tournament embed (surv_embed=1). Does not change league Manage. */

html.sv-surv-embed,
html.sv-surv-embed body.sv-surv-embed {
  background-image: none !important;
  background-color: #f5f5f7 !important;
  height: 100%;
  min-height: 100%;
}

html.sv-surv-embed:has(body.dark-theme),
html.sv-surv-embed body.sv-surv-embed.dark-theme {
  background-color: #0e1114 !important;
  color: #f8f9fa;
}

html.sv-surv-embed body.sv-surv-embed {
  margin: 0;
  padding-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

html.sv-surv-embed body.sv-surv-embed > .container-fluid:nth-of-type(2) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding-left: 8px;
  padding-right: 8px;
}

html.sv-surv-embed body.sv-surv-embed > .container-fluid:first-of-type,
html.sv-surv-embed .navbar,
html.sv-surv-embed #new_navbar,
html.sv-surv-embed #fave_div,
html.sv-surv-embed .idx-header-marquee,
html.sv-surv-embed #adminwarning,
html.sv-surv-embed #namepara,
html.sv-surv-embed .jumbotron > h3,
html.sv-surv-embed #divsel,
html.sv-surv-embed #divlist,
html.sv-surv-embed .jumbotron > div:has(#divsel),
html.sv-surv-embed .jumbotron:not(#tourny_tab_1_jumbotron) > div:first-of-type:not(#tourny_tabs),
html.sv-surv-embed #tourny_tabs > ul.nav-tabs,
html.sv-surv-embed:not(.sv-surv-create) #tourny_tab-1,
html.sv-surv-embed #tourny_tab-3,
html.sv-surv-embed #tourny_tab-league-status,
html.sv-surv-embed #theme-toggle,
html.sv-surv-embed #chalksta-git-footer-bar,
html.sv-surv-embed .sv2-overview-picker-col,
html.sv-surv-embed #select_header_div {
  display: none !important;
}

html.sv-surv-embed .jumbotron {
  background: transparent !important;
  padding: 2px 6px 4px !important;
  margin: 0 !important;
  color: inherit !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

html.sv-surv-embed #tourny_tabs,
html.sv-surv-embed #tourny_tabs > .tab-content {
  background: transparent !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

html.sv-surv-embed:not(.sv-surv-create) #tourny_tab-2.sv2-manage-tab {
  flex: 1 1 auto;
  min-height: 0;
}

html.sv-surv-embed #sv2-mng-cockpit-tab.tab-pane.active.show:not(:fullscreen) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

html.sv-surv-embed #sv2-mng-cockpit-tab.tab-pane.active.show
  #survivors-admin-v2-root:not(.d-none):not(:fullscreen):not(.sv2-cockpit-fs-active) {
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
}

html.sv-surv-embed .survivors-admin-v2 .sv2-cockpit-body {
  padding: 0.3rem 0.5rem 0.35rem;
}

html.sv-surv-embed #sv2-mng-cockpit-tab > hr {
  display: none !important;
}

html.sv-surv-embed #sv2-mng-cockpit-tab.tab-pane.active.show
  #survivors-admin-v2-root:not(.d-none) {
  height: 100%;
}

/* Overview: row is taller than settings (roster table). Stretch left so no html “blank”. */
html.sv-surv-embed .sv2-mng-overview-split {
  align-items: stretch !important;
}

html.sv-surv-embed .sv2-mng-overview-left {
  background: transparent;
}

html.sv-surv-embed:has(#sv2-mng-overview-tab.active) body.sv-surv-embed,
html.sv-surv-embed:has(#sv2-mng-overview-tab.active) body.sv-surv-embed > .container-fluid:nth-of-type(2),
html.sv-surv-embed:has(#sv2-mng-overview-tab.active) .jumbotron,
html.sv-surv-embed:has(#sv2-mng-overview-tab.active) #tourny_tabs,
html.sv-surv-embed:has(#sv2-mng-overview-tab.active) #tourny_tabs > .tab-content,
html.sv-surv-embed:has(#sv2-mng-overview-tab.active) #tourny_tab-2 {
  height: auto;
  min-height: 100%;
  flex: 1 1 auto;
  overflow: visible;
}

html.sv-surv-embed #chalksta-git-footer-bar {
  display: none !important;
}

/* Staging host injects an orange env bar into every HTML document (SPA + iframe). Hide the iframe copy. */
html.sv-surv-embed body > div[style*="#ff9800"],
html.sv-surv-player-embed body > div[style*="#ff9800"] {
  display: none !important;
}

html.sv-surv-embed body.sv-surv-embed:not(.dark-theme) .jumbotron,
html.sv-surv-embed body.sv-surv-embed:not(.dark-theme) #tourny_tabs,
html.sv-surv-embed body.sv-surv-embed:not(.dark-theme) #tourny_tabs > .tab-content {
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
}

html.sv-surv-embed:not(.sv-surv-create) #tourny_tab-2 {
  display: flex !important;
  flex-direction: column;
  opacity: 1;
}

html.sv-surv-embed:not(.sv-surv-create) #tourny_tab-2 > .sv2-manage-inner-tabs {
  flex-shrink: 0;
}

html.sv-surv-embed:not(.sv-surv-create) #tourny_tab-2 > .sv2-manage-inner-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

html.sv-surv-embed.sv-surv-create #tourny_tab-1 {
  display: block !important;
  opacity: 1;
}

html.sv-surv-embed.sv-surv-create #tourny_tab-2 {
  display: none !important;
}

html.sv-surv-embed.sv-surv-create .type_picker,
html.sv-surv-embed.sv-surv-create #elim_add_options_div,
html.sv-surv-embed.sv-surv-create #tourn_specific_options_div,
html.sv-surv-embed.sv-surv-create #gen_tournament_button {
  display: none !important;
}

html.sv-surv-embed.sv-surv-create .btn-group-vertical {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
}

html.sv-surv-embed.sv-surv-create .tourny-create-top-row,
html.sv-surv-embed.sv-surv-create .sv-create-stage-meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin: 0;
}

html.sv-surv-embed.sv-surv-create #stage_tournament_button {
  display: inline-block !important;
  width: auto !important;
  white-space: nowrap;
  margin: 0 !important;
}

html.sv-surv-embed.sv-surv-create .sv-create-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

html.sv-surv-embed.sv-surv-create .sv-create-field label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

html.sv-surv-embed.sv-surv-create .sv-create-field #tourny_name_input {
  min-width: 16rem;
  max-width: 22rem;
}

html.sv-surv-embed.sv-surv-create #lives_builder_div > p:first-of-type {
  display: none !important;
}

html.sv-surv-embed.sv-surv-create #sv_save_default_note {
  display: block !important;
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #5c6570;
}

html.sv-surv-embed.sv-surv-create.dark-theme #sv_save_default_note,
html.sv-surv-embed.sv-surv-create body.dark-theme #sv_save_default_note {
  color: #9aa3ad;
}

/* Create layout (product host only): players stay left; config + tables stay right. */
html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_row.row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_row > .col-auto.col-lg-7 {
  flex: 1 1 42%;
  min-width: 0;
  max-width: 46%;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_col {
  flex: 1 1 54%;
  min-width: 0;
  max-width: 54%;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.15fr);
  grid-template-rows: auto auto auto;
  column-gap: 1rem;
  align-items: start;
  border-left: 1px solid var(--sv2-border, #2a2a2a);
  margin-left: 0;
  padding-left: 1rem !important;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_builder_config {
  grid-column: 1;
  grid-row: 1;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_table {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_table td:first-child:not(.sv2-fun-team-create-cell) {
  white-space: nowrap;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_table .sv2-fun-team-create-cell,
html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_table .sv2-fun-team-help,
html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_table .sv2-fun-team-switch .custom-control-label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_col > div:last-of-type {
  grid-column: 2;
  grid-row: 1 / span 3;
  min-width: 0;
}

html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_table_selection {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 1199px) {
  html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_col {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_table_selection {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sv2-border, #2a2a2a);
  }
}

@media (max-width: 719px) {
  html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_row.row {
    flex-wrap: wrap;
  }

  html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_row > .col-auto.col-lg-7,
  html.sv-surv-embed.sv-surv-create .lives2-tab1-host #lives_config_col {
    flex: 1 1 100%;
    max-width: 100%;
    border-left: none;
    padding-left: 0 !important;
  }
}

html.sv-surv-embed #tab2_tourny_date_text {
  color: #1d1d1f !important;
}

html.sv-surv-embed body.sv-surv-embed.dark-theme #tab2_tourny_date_text {
  color: #f8f9fa !important;
}

/* Player board embed on Survivors product host (surv_player_embed=1). League tournaments.html unchanged. */
html.sv-surv-player-embed .idx-header-wrap,
html.sv-surv-player-embed .idx-topbar-wrap,
html.sv-surv-player-embed #selector_col,
html.sv-surv-player-embed #share_tourny,
html.sv-surv-player-embed #registration_table,
html.sv-surv-player-embed #chalksta-git-footer-bar,
html.sv-surv-player-embed #theme-toggle,
html.sv-surv-player-embed #tourn_date,
html.sv-surv-player-embed #main_jumbo > .row:has(#tourn_date),
html.sv-surv-player-embed #time_date_info_div,
html.sv-surv-player-embed #lives_div #time_date_info_div,
html.sv-surv-player-embed #time_date_info_div * {
  display: none !important;
}

html.sv-surv-player-embed body {
  margin: 0;
  padding-bottom: 0 !important;
  background-image: none !important;
  background-color: #f3efe6 !important;
  color: #1a1d21;
}

html.sv-surv-player-embed body.dark-theme {
  background-color: #0e1114 !important;
  color: #f4f1ea;
}

html.sv-surv-player-embed .idx-content-wrap,
html.sv-surv-player-embed .chalksta-tournaments-main,
html.sv-surv-player-embed #main_jumbo {
  margin: 0 !important;
  padding: 8px 10px !important;
  max-width: none !important;
}

html.sv-surv-player-embed:not(.dark-theme) #main_jumbo {
  background: #fffdf8 !important;
  color: #1a1d21 !important;
  border-color: #d8d0c4 !important;
}

html.sv-surv-player-embed.dark-theme #main_jumbo,
html.sv-surv-player-embed body.dark-theme #main_jumbo {
  background: #181c21 !important;
  color: #f4f1ea !important;
  border-color: #2a3138 !important;
}

html.sv-surv-player-embed #sv2-v2-open-event,
html.sv-surv-player-embed .sv2-v2-open-event {
  display: none !important;
}

/* React /play/t/ already shows the date under the title — no iframe date strip. */
html.sv-surv-player-embed #lives_div #time_date_info_div,
html.sv-surv-player-embed #time_date_info_div {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

html.sv-surv-player-embed #lives_tourny_row > .col {
  margin-top: 0 !important;
}

html.sv-surv-player-embed #main_jumbo.sv2-player-jumbo-lives2-active {
  min-height: 0 !important;
}

@media (max-width: 767px) {
  html.sv-surv-player-embed .idx-content-wrap,
  html.sv-surv-player-embed .chalksta-tournaments-main,
  html.sv-surv-player-embed #main_jumbo {
    padding: 4px 6px !important;
  }

  html.sv-surv-player-embed #player-sv2-lives-board-shell.survivors-admin-v2.sv2-player-lives-board {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  html.sv-surv-player-embed #main_jumbo.sv2-player-jumbo-lives2-active #player-sv2-lives-board-shell:not(.sv2-player-cockpit-fs-active) .sv2-main {
    overflow: visible !important;
  }

  html.sv-surv-player-embed #player-sv2-lives-board-shell.survivors-admin-v2.sv2-player-lives-board:not(.sv2-player-cockpit-fs-active) .sv2-v2-board-root {
    height: auto !important;
    max-height: none !important;
  }

  html.sv-surv-player-embed .survivors-admin-v2 {
    --sv2-v2-match-card-min-h: 2.85rem;
    --sv2-v2-match-row-column-gap: 0.22rem;
  }

  html.sv-surv-player-embed .survivors-admin-v2 .sv2-v2-board-inner .sv2-v2-player-name {
    font-size: clamp(0.68rem, 2.8vw, 0.92rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.sv-surv-player-embed .survivors-admin-v2 .sv2-v2-match-card {
    min-height: var(--sv2-v2-match-card-min-h);
    padding: 0.02rem 0.1rem;
  }

  html.sv-surv-player-embed .survivors-admin-v2 .sv2-v2-board-inner .sv2-v2-board-title {
    display: none !important;
  }
}

