.team-ident-online{
	display:inline-flex;
	align-items:center;
	gap:8px;
	vertical-align:middle;
}

.team-ident-flag{
	width:18px;
	height:18px;
	object-fit:cover;
	display:inline-block;
}

.team-ident-logo{
	width:24px;
	height:24px;
	object-fit:contain;
	display:inline-block;
}

.team-ident-name{
	white-space:nowrap;
}

/* Nastavení zobrazení */
.tables-settings-panel{
	width:380px !important;
	max-width:92vw;
}

.tables-settings-panel .offcanvas-header{
	padding:16px 18px 10px;
}

.tables-settings-panel .offcanvas-body{
	padding:14px 18px 18px;
}

.tables-settings-panel .form-select,
.tables-settings-panel .form-control{
	font-size:14px;
	padding:7px 34px 7px 10px;
}

.tables-settings-panel .form-check{
	margin-bottom:8px;
}

.tables-settings-panel .form-text{
	font-size:12px;
	color:#6c757d !important;
}

.tables-settings-panel hr{
	margin:16px 0 !important;
}

.offcanvas-backdrop.show{
	opacity:.35;
	background-color:#000;
}

/* panel držíme světlý i když se zapne noční režim */
.tables-settings-panel{
	background:#fff !important;
	color:#111 !important;
}

/* zvýraznění */
table[data-role="matches-table"] tbody tr.hl-team > td,
table[data-role="group-table"] tbody tr.hl-team > td{
	background:rgba(255,193,7,.28) !important;
}

table[data-role="matches-table"] tbody tr.hl-group > td{
	background:rgba(13,110,253,.14) !important;
}

table[data-role="matches-table"] tbody tr.hl-team.hl-group > td{
	background:rgba(25,135,84,.22) !important;
}

.team-ident-online.hl-team-name .team-ident-name{
	font-weight:500;
}

/* skrytí sloupců */
body.hide-match-group table[data-role="matches-table"] th:nth-child(2),
body.hide-match-group table[data-role="matches-table"] td:nth-child(2){
	display:none;
}

body.hide-table-vrp table[data-role="group-table"] th:nth-child(4),
body.hide-table-vrp table[data-role="group-table"] th:nth-child(5),
body.hide-table-vrp table[data-role="group-table"] th:nth-child(6),
body.hide-table-vrp table[data-role="group-table"] td:nth-child(4),
body.hide-table-vrp table[data-role="group-table"] td:nth-child(5),
body.hide-table-vrp table[data-role="group-table"] td:nth-child(6){
	display:none;
}

body.hide-table-score table[data-role="group-table"] th:nth-child(7),
body.hide-table-score table[data-role="group-table"] td:nth-child(7){
	display:none;
}

body.hide-table-diff table[data-role="group-table"] th:nth-child(8),
body.hide-table-diff table[data-role="group-table"] td:nth-child(8){
	display:none;
}

/* neutrální noční režim bez zeleného překryvu */
html[data-theme="dark"] body{
	background:#111827;
	color:#e5e7eb;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table-light,
html[data-theme="dark"] .table-spaced tbody tr,
html[data-theme="dark"] footer{
	background:#1f2937 !important;
	color:#e5e7eb !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary{
	color:#9ca3af !important;
}

html[data-theme="dark"] .navbar-admin{
	background:#15803d !important;
}

/* Vlastní select s vlajkou/logem v panelu nastavení */
.rich-select-original{
	display:none !important;
}

.rich-select{
	position:relative;
	width:100%;
}

.rich-select-toggle{
	width:100%;
	min-height:39px;
	border:1px solid #dee2e6;
	border-radius:6px;
	background:#fff;
	color:#111;
	padding:7px 34px 7px 10px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:8px;
	font-size:14px;
	line-height:1.35;
	text-align:left;
}

.rich-select-toggle:focus{
	outline:0;
	border-color:#86b7fe;
	box-shadow:0 0 0 .2rem rgba(13,110,253,.18);
}

.rich-select-caret{
	position:absolute;
	right:11px;
	top:50%;
	transform:translateY(-50%);
	font-size:16px;
	color:#6c757d;
	pointer-events:none;
}

.rich-select-menu{
	display:none;
	position:absolute;
	z-index:1085;
	left:0;
	right:0;
	top:calc(100% + 4px);
	max-height:260px;
	overflow:auto;
	background:#fff;
	border:1px solid #dee2e6;
	border-radius:8px;
	box-shadow:0 10px 28px rgba(0,0,0,.12);
	padding:4px;
}

.rich-select.open .rich-select-menu{
	display:block;
}

.rich-select-item{
	width:100%;
	border:0;
	background:transparent;
	padding:7px 8px;
	border-radius:6px;
	text-align:left;
	font-size:14px;
	color:#111;
}

.rich-select-item:hover,
.rich-select-item.active{
	background:#f1f3f5;
}

.rich-select-option-inner{
	display:inline-flex;
	align-items:center;
	gap:7px;
	min-width:0;
	max-width:100%;
}

.rich-select-flag{
	width:18px;
	height:18px;
	object-fit:cover;
	flex:0 0 auto;
	border-radius:1px;
}

.rich-select-logo{
	width:22px;
	height:22px;
	object-fit:contain;
	flex:0 0 auto;
}

.rich-select-text{
	min-width:0;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap;
}

/* Nastavení: skrytí vlajek/log týmů v rozpisu, tabulkách i playoff */
body.hide-team-flags .team-ident-flag{
	display:none !important;
}

body.hide-team-logos .team-ident-logo{
	display:none !important;
}

.rank-arrow--sure {
	color: #198754 !important;
}

.rank-arrow--maybe {
	color: #adb5bd !important;
}


.ftb-round--empty {
	min-width: 220px;
	pointer-events: none;
	visibility: hidden;
}

@media (min-width: 768px) {
	.ftb-round--empty {
		display: none;
	}
}

.match-live-ball {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    animation: matchBallBounce 1s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes matchBallBounce{
	0%,100%{
		transform:translateY(0) scale(1);
	}
	45%{
		transform:translateY(-6px) scale(1.05);
	}
}


/* Veřejný indikátor komentovaného utkání */
.match-result-wrap{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:.55rem;
	white-space:nowrap;
}
.match-commentary-indicator{
	display:inline-flex;
	align-items:center;
	gap:.22rem;
	color:var(--bs-secondary-color, #6c757d);
	font-size:.9em;
	line-height:1;
}
.match-commentary-indicator .fa-microphone{
	font-size:.95em;
}
.match-commentary-count{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-width:1.25rem;
	height:1.25rem;
	padding:0 .3rem;
	border-radius:999px;
	background:#e9ecef;
	color:#495057;
	font-size:.72rem;
	font-weight:600;
	line-height:1;
}

.match-commentary-indicator{border:0;background:transparent;padding:0;cursor:pointer}
.match-commentary-indicator:hover{color:#198754}
.public-comments-list{display:flex;flex-direction:column}
.public-comment-row{display:grid;grid-template-columns:80px minmax(0,1fr) 145px;gap:1rem;align-items:start;padding:1rem .25rem;border-bottom:1px solid #e9ecef}
.public-comment-row:last-child{border-bottom:0}
.public-comment-minute{font-weight:600;white-space:nowrap}
.public-comment-head{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;font-size:.88rem;margin-bottom:.25rem}
.public-comment-text{line-height:1.55}


/* Komentáře v pravém sloupci – stejné vizuální principy jako tabulky turnaje */
.public-comments-panel{
	scroll-margin-top:80px;
}
.public-comments-panel-body{
	max-height:310px;
	overflow-y:auto;
	overscroll-behavior:contain;
	padding-right:.2rem;
}
.public-comments-list{
	display:flex;
	flex-direction:column;
	gap:.28rem;
}
.public-comment-row{
	display:grid;
	grid-template-columns:54px minmax(0,1fr);
	gap:.5rem;
	align-items:start;
	padding:.48rem .6rem;
	background:#f2f2f2;
	border-radius:.55rem;
}
.public-comment-minute{
	font-size:.82rem;
	font-weight:500;
	white-space:nowrap;
	padding-top:.05rem;
}
.public-comment-head{
	display:flex;
	flex-wrap:wrap;
	gap:.22rem;
	align-items:center;
	font-size:.78rem;
	margin-bottom:.08rem;
}
.public-comment-text{
	font-size:.9rem;
	line-height:1.38;
}
	margin-top:.18rem;
	color:#777;
	font-size:.7rem;
}
.public-comments-panel-body::-webkit-scrollbar{width:7px}
.public-comments-panel-body::-webkit-scrollbar-thumb{background:#c7c7c7;border-radius:8px}
.public-comments-panel-body::-webkit-scrollbar-track{background:transparent}


/* Samostatna stranka pro nenalezeny turnaj ve slozce /turnaj/. */
.ft-notfound-page { margin:0; min-height:1vh; display:flex; flex-direction:column; background:#f8f9fa; color:#171c1a; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.ft-notfound-page * { box-sizing:border-box; }
.ft-notfound-container { width:min(100% - 2rem,1140px); margin-inline:auto; }
.ft-notfound-header { background:#1e9446; color:#fff; }
.ft-notfound-nav { display:flex; justify-content:space-between; align-items:center; gap:1rem; min-height:74px; }
.ft-notfound-brand { color:#fff; text-decoration:none; font-size:1.25rem; font-weight:750; }
.ft-notfound-navlink { color:#fff; text-decoration:none; font-size:.95rem; }
.ft-notfound-navlink:hover,.ft-notfound-brand:hover { color:#e1f9e7; text-decoration:underline; }
.ft-notfound-main { flex:1; display:grid; place-items:center; padding:3rem 1rem; }
.ft-notfound-card { width:min(100%,650px); padding:clamp(2rem,5vw,3.5rem); border:1px solid #dee2e6; border-radius:16px; background:#fff; text-align:center; box-shadow:0 12px 36px rgba(0,0,0,.055); }
.ft-notfound-code { display:block; margin-bottom:.5rem; color:#1e9446; font-size:clamp(3rem,9vw,5rem); font-weight:800; line-height:1; }
.ft-notfound-card h1 { margin:0 0 1rem; font-size:clamp(1.6rem,4vw,2.3rem); line-height:1.18; font-weight:700; }
.ft-notfound-card p { color:#495057; font-size:1.05rem; line-height:1.6; margin:.5rem 0 1rem; }
.ft-notfound-card .ft-notfound-id { margin:0 0 1.65rem; font-size:.95rem; }
.ft-notfound-action { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:.75rem 1.4rem; border-radius:10px; background:#1e9446; color:#fff; text-decoration:none; font-weight:600; }
.ft-notfound-action:hover,.ft-notfound-action:focus-visible { background:#177939; color:#fff; }
.ft-notfound-footer { padding:1.3rem 1rem; text-align:center; font-size:.9rem; }
.ft-notfound-footer a { color:#495057; text-decoration:none; }
@media (max-width:575.98px) { .ft-notfound-nav { min-height:64px; } .ft-notfound-brand { font-size:1rem; } .ft-notfound-navlink { font-size:.85rem; } .ft-notfound-main { padding:2rem 1rem; } }

/* Stranka nenalezeneho turnaje: stejna hlavicka, obsah i footer jako O projektu. */
.ft-notfound-page .home-nav { position:relative; top:auto; left:auto; right:auto; width:100%; flex:0 0 auto; }
.ft-notfound-page .public-titlebar, .ft-notfound-page .public-content-section { width:100%; }
.ft-notfound-page .public-content-section { flex:1 0 auto; padding-bottom:2.5rem; }
.ft-notfound-page .public-content-card > .card-body { min-height:20rem; }
.ft-notfound-page .ft-notfound-content { max-width:38rem; padding:1rem 0 2rem; }
.ft-notfound-page .ft-notfound-code { display:block; color:#1e9446; font-size:3rem; font-weight:800; line-height:1; margin-bottom:1rem; }
.ft-notfound-page .ft-notfound-content h2 { margin:0 0 1rem; }
.ft-notfound-page .ft-notfound-content p { margin-bottom:1.5rem; }
.ft-notfound-page .site-footer { width:100%; flex-shrink:0; }

/* Turnaj nenalezen: kompaktni titulkovy blok i obsah jako 404. */
.ft-notfound-page .public-titlebar .container { padding:1.5rem 2.75rem .85rem; min-height:0; }
.ft-notfound-page .public-titlebar-copy { padding-top:0; }
.ft-notfound-page .public-breadcrumb { margin-bottom:.75rem; }
.ft-notfound-page .public-titlebar h1 { margin-bottom:.3rem; }
.ft-notfound-page .public-content-section { padding-bottom:0; }
.ft-notfound-page .public-content-card > .card-body { min-height:0; padding:.85rem 2.75rem 2.5rem; }
.ft-notfound-page .ft-notfound-content { padding:.25rem 0 0; }
.ft-notfound-page .ft-notfound-code { margin-bottom:.65rem; }
@media (max-width:767.98px) {
  .ft-notfound-page .public-titlebar .container { padding:1.25rem 1.25rem .75rem; }
  .ft-notfound-page .public-content-card > .card-body { padding:.75rem 1.25rem 2rem; }
}

/* Nenalezeny turnaj sdili rozlozeni a prvky s detailem turnaje. */
.tournament-brand-icon { height:48px; width:auto; }
.tournament-not-found { min-height:100vh; display:flex; flex-direction:column; }
.tournament-not-found > main.container { flex:1 0 auto; min-height:1vh; }
.tournament-notfound-breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; font-size:.875rem; color:#6c757d; }
.tournament-notfound-breadcrumb a { color:#198754; text-decoration:none; }
.tournament-notfound-breadcrumb a:hover { text-decoration:underline; }
.tournament-not-found .admin-footer { margin-top:auto !important; }

/* Rozpis: jednotne rozmery sloupcu spravovane pouze v CSS. */
table[data-role="matches-table"] {
    width: 100%;
    min-width: 600px;
    table-layout: fixed;
}
/* Skupina je volitelny sloupec; zbytek sirky se rozdeli mezi oba tymy. */
table[data-role="matches-table"] col.match-col-time  { width: 65px; }
table[data-role="matches-table"] col.match-col-group { width: 60px; }
table[data-role="matches-table"] col.match-col-home  { width: calc((100% - 200px) / 2); }
table[data-role="matches-table"] col.match-col-away  { width: calc((100% - 200px) / 2); }
table[data-role="matches-table"] col.match-col-score { width: 75px; }

/* Pokud se skryje skupina, musi zmizet take prislusny col.
   Ve zbylem miste jsou oba tymove sloupce opet stejne siroke. */
body.hide-match-group table[data-role="matches-table"] col.match-col-group {
    display: none;
}
body.hide-match-group table[data-role="matches-table"] col.match-col-home,
body.hide-match-group table[data-role="matches-table"] col.match-col-away {
    width: calc((100% - 140px) / 2);
}

table[data-role="matches-table"] th,
table[data-role="matches-table"] td {
    overflow: hidden;
    text-overflow: ellipsis;
}
table[data-role="matches-table"] .team-ident-online {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
}
table[data-role="matches-table"] .team-ident-name {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
table[data-role="matches-table"] th:last-child,
table[data-role="matches-table"] td:last-child {
    text-align: center;
    white-space: nowrap;
}
