
.tournament-card-header {
	overflow: hidden;
	padding: .5rem .5rem;
	margin-bottom: 0;
	background-color: rgba(0, 0, 0, .08);
	border-bottom: 1px solid rgba(0, 0, 0, .125);
	border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.tournament-card-header-live {
    background-color: var(--danger);
    color:  var(--white);
}

.tournament-name {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.tournament-name-sm {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.tournament-title {
    font-style: italic;
    font-size: .8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.tournament-title-sm {
    font-style: italic;
    font-size: .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.tournament-code {
	font-size: .65rem;
	max-width: 7rem;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.tournament-surface {
    height: 4px;
}

.grass {
    background-color: rgba(79,202,36,0.8);
}

.clay {
    background-color: rgba(238,134,39,0.8);
}

.hard {
    background-color: rgba(41,112,142,0.7);
}

.widget-frame-header {
    border: solid 3px var(--primary);
    border-bottom: none;
    border-radius: .5rem .5rem 0 0;
    padding: 0;
    font-size: 1rem;
}

.widget-frame {
    display: block;
    width: 100%;
    height: 40vh;
    border: solid 3px var(--primary);
    border-radius: 0 0 .5rem .5rem;
}

/* Ledwall / Scoreboard iframe headers: Preview icon on the right */
#frame-oncourt .dashboard-frame-popout-btn,
#frame-ledwall .dashboard-frame-popout-btn {
    font-size: 0.8rem;
}

#frame-oncourt .dashboard-frame-popout-btn:hover:not(:disabled):not(.disabled),
#frame-ledwall .dashboard-frame-popout-btn:hover:not(:disabled):not(.disabled) {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: .25rem;
}

#frame-oncourt .dashboard-frame-popout-btn:disabled,
#frame-oncourt .dashboard-frame-popout-btn.disabled,
#frame-ledwall .dashboard-frame-popout-btn:disabled,
#frame-ledwall .dashboard-frame-popout-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Dashboard side panels */
.dashboard-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .4rem;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-panel-title {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #212529;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary, #00cbba);
}

/* Ledwall side panel: compact card; Settings centered without forcing extra height */
.dashboard-panel-ledwall {
    padding: 0.75rem 1rem 1rem;
}

.dashboard-panel-ledwall .dashboard-panel-title {
    margin-bottom: 0;
    padding-bottom: 0.35rem;
    font-size: 1rem;
    border-bottom-width: 1px;
}

.dashboard-panel-ledwall .dashboard-ledwall-actions {
    min-height: 0;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
}

.dashboard-panel-ledwall .dashboard-ledwall-actions .btn {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Scoreboard console: no body padding; bordered panel wraps slider flush, panes padded below */
.sb-console {
    border-radius: 0.5rem;
}

/* Tighter header title in scoreboard card */
.sb-console > .card-header .dashboard-panel-title {
    padding-bottom: 0.25rem;
    border-bottom-width: 1px;
    font-size: 1rem;
}

/* Match space below the green title rule to bottom margin (push block slightly up vs py-2 + pt-2) */
.sb-console.sb-console--clean > .card-header {
    padding: 0.5rem 1rem 0.25rem 1rem;
}

.sb-console .sb-mode-tabs {
    padding: 0.25rem 1rem 0.25rem 1rem !important;
}

.sb-console .sb-sponsor-strip {
    padding: 0.25rem 1rem 0.5rem 1rem !important;
}

/* Live/GFX + grey pane + logo share vertical space; sponsor row stays at bottom */
.sb-console-mid {
    gap: 1.125rem;
}

/* Grey court/GFX pane: only as tall as content; logo block uses remaining space */
.sb-console-mid > .sb-source {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 0.45rem;
}

.sb-console-mid > .sb-tlogo-strip {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Court/GFX pane only (not the whole card) — same light green gradient as logo + sponsor panes */
.sb-source {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--surface-wizard-gradient);
}

/* Live / GFX segmented control (sits above .sb-source); sliding thumb */
.sb-seg-track {
    padding: 4px;
    border-radius: 999px;
    background: transparent;
}

.sb-seg-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 6px);
    border-radius: 999px;
    background: var(--primary, #00cbba);
    z-index: 0;
    pointer-events: none;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sibling selector (thumb follows radios in markup) — avoids :has(), works with CSS minifiers */
#scoreboard-mode-gfx:checked ~ .sb-seg-thumb {
    left: calc(50% + 2px);
}

@media (prefers-reduced-motion: reduce) {
    .sb-seg-thumb {
        transition: none;
    }
}

.sb-pane {
    padding: 0.4rem 0.65rem 0.65rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Section titles: Court, Screen, Match ID, tournament logo, sponsor list — same look */
.sb-console .sb-console-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
    line-height: 1.25;
}

.sb-console .sb-pane .form-label {
    margin-bottom: 0.25rem;
}

.sb-console #dashboard-scoreboard-gfx .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

/* Court row: dropdown + two icon buttons (compact, not full .btn) */
#dashboard-scoreboard-live .court-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex-shrink: 0;
    margin: 0;
    padding: 0 0.55rem;
    min-width: 2.25rem;
    box-sizing: border-box;
    border: 1px solid var(--primary, #00cbba);
    border-radius: 0.3rem;
    background: #fff;
    color: var(--primary, #00cbba);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

#dashboard-scoreboard-live .court-icon-btn:hover {
    border-color: var(--primary, #00cbba);
    background: var(--primary-hover-tint);
    color: var(--primary, #00cbba);
}

#dashboard-scoreboard-live .court-icon-btn:focus-visible {
    outline: 2px solid var(--primary, #00cbba);
    outline-offset: 2px;
}

#dashboard-scoreboard-live .court-icon-btn:disabled,
#dashboard-scoreboard-live .court-icon-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
    box-shadow: none;
    background: #f1f3f5;
    border-color: rgba(0, 0, 0, 0.1);
}

#dashboard-scoreboard-live .court-copy-feedback {
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}

.sb-seg-opt {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.3rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2;
    color: #212529;
    border: none;
    border-radius: 9999px;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
}

.sb-console--clean .sb-seg-track .btn-check:checked + .sb-seg-opt {
    background: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: none;
}

.sb-console--clean .sb-seg-track .btn-check:not(:checked) + .sb-seg-opt {
    color: #212529;
    font-weight: 400;
}

.sb-seg-track .btn-check:focus-visible + .sb-seg-opt {
    outline: 2px solid var(--primary, #00cbba);
    outline-offset: 2px;
}

.dashboard-panel .btn:not(.dashboard-match-id-btn),
.sb-console .btn:not(.dashboard-match-id-btn) {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.sb-console .dashboard-match-id-input {
    letter-spacing: 0.1em;
}

.sb-console .dashboard-match-id-input.border-danger,
.sb-console .dashboard-match-id-input.dashboard-match-id-empty:not(:disabled) {
    border-width: 4px;
    border-color: var(--bs-danger, #dc3545) !important;
}

.sb-console .input-group {
    flex-wrap: nowrap;
    align-items: stretch;
}

.sb-console .input-group > .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.sb-console .input-group > .btn.dashboard-match-id-btn {
    flex: 0 0 auto;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    min-width: 1.75rem;
    max-width: 1.75rem;
    padding: 0 !important;
    line-height: 1;
}

.sb-console .input-group > .btn.dashboard-match-id-btn .fa-check {
    font-size: 0.65rem;
}

/* Scoreboard console — tournament logo strip: no card chrome; no extra horizontal inset (aligns with .sb-source + sponsor row) */
.sb-console .sb-tlogo-strip {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    justify-content: flex-start;
    color: #000;
}

.sb-console .sb-tlogo-strip > .d-flex {
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
}

/* Preview: reserved rectangle for image (object-fit: contain on img); empty = icon only.
   Stretch to at least the height of the stacked Upload + Delete buttons (no max-height cap). */
.sb-console .sb-tlogo-preview {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    align-self: stretch;
    min-height: 4.75rem;
    border: 1px dashed #ced4da;
    border-radius: 0.375rem;
    background: var(--surface-wizard-gradient);
    overflow: hidden;
}

.sb-console .sb-tlogo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
    box-sizing: border-box;
}

.sb-console .sb-tlogo-placeholder {
    position: absolute;
    inset: 0;
    padding: 0.25rem;
    pointer-events: none;
}

.sb-console .sb-tlogo-placeholder-icon {
    font-size: 2rem;
    line-height: 1;
    color: #000;
    opacity: 0.35;
}

/* Sponsor list row: placeholder + manage (aligned with court / logo rows) */
.sb-console .sb-sponsor-placeholder {
    border: 1px dashed #ced4da;
    border-radius: 0.375rem;
    background: var(--surface-wizard-gradient);
    color: #000;
    font-size: 0.8125rem;
    min-height: 2.35rem;
}

a.recent-link {
	margin: 0 1rem 0 1rem;
}

.recent-link span {
	text-transform: uppercase;
	opacity: .7;
	font-size: .7rem;
	margin-right: 6px;
}

/* Language selector — _layout_Simple does not load layout-main.css; scope beats Bootstrap/img defaults */
.app-language-switcher .flag-current-language {
	width: 30px !important;
	max-width: 30px !important;
	height: auto !important;
	object-fit: contain;
	vertical-align: middle;
	display: inline-block;
	border: solid 1px var(--accent1, rgba(255, 255, 255, 0.35));
	box-sizing: content-box;
}

.app-language-switcher .dropdown-menu .flag-language {
	width: 22px !important;
	max-width: 22px !important;
	height: auto !important;
	object-fit: contain;
	vertical-align: middle;
	border: solid 1px var(--accent1, rgba(255, 255, 255, 0.35));
	box-sizing: content-box;
}