/* =========================
   OGÓLNY STYL KONTEJNERÓW
========================= */
.table, .matches-container, .ranking-container {
    overflow-x: auto;
    margin-top: 5px;
    width: 100%;
}

.table table,
.matches-table-inner,
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th, .table td,
.matches-table-inner th, .matches-table-inner td,
.ranking-table th, .ranking-table td {
    padding: 6px 8px;
    border: none;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

/* =========================
   MATCHES TABLE
========================= */
.matches-table-inner th {
    background-color: #f8f8f8;
    text-align: left;
}

.matches-table-inner tbody tr:hover {
    background-color: #f1f1f1;
}

.matches-table-inner tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Drużyna A: nazwa | logo, do prawej */
.matches-table-inner td.team-a {
    text-align: right;
}
.matches-table-inner td.team-a span {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}
.matches-table-inner td.team-a img {
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    margin: 0;
}

/* Drużyna B: logo | nazwa, do lewej */
.matches-table-inner td.team-b {
    text-align: left;
}
.matches-table-inner td.team-b span {
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}
.matches-table-inner td.team-b img {
    display: inline-block;
    vertical-align: middle;
    width: 24px;
    height: 24px;
    margin: 0;
}

.matches-table-inner td.score {
    font-weight: bold;
}

/* =========================
   RANKING TABLE
========================= */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ranking-table th, .ranking-table td {
    padding: 6px 8px;
    border: none;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
}

.ranking-table th {
    background-color: #f8f8f8;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.ranking-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Drużyna w ranking-table: logo | nazwa */
.ranking-table td:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 5px;
}
.ranking-table td:nth-child(2) img {
    width: 24px;
    height: 24px;
    margin: 0;
}

/* =========================
   MOBILNE SKRÓTY NAGŁÓWKÓW
========================= */
@media (max-width: 768px) {
    .table table,
    .matches-table-inner,
    .ranking-table {
        font-size: 12px;
        min-width: 600px; /* wymuszenie scrolla */
    }

    .table th, .table td,
    .matches-table-inner th, .matches-table-inner td,
    .ranking-table th, .ranking-table td {
        padding: 4px 6px;
    }
}

/* =========================
   FIELDS (LABEL + SELECT)
========================= */
.lnp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.lnp-label {
    font-size: 14px;
    font-weight: 600;
}

.lnp-field select {
    padding: 6px 8px;
    font-size: 14px;
}

/* =========================
   RESULTS CONTAINER
========================= */
#lnp-results {
    margin-top: 10px;
}

/* =========================
   LOADER W KOLUMNACH TABELI (Runda, Wynik itp.)
========================= */
td .loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin: 0 auto;
}

/* =========================
   LOADER DLA TREŚCI CAŁYCH TABEL
========================= */
.table-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-style: italic;
    color: #555;
    padding: 10px 0;
}

.table-loader .loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =========================
   ANIMACJA OBRACANIA
========================= */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   DROPDOWNY I LISTY PLAY
========================= */
.lnp-play-item {
    cursor: pointer;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.lnp-play-item:hover {
    background: #f5f5f5;
}

.lnp-play-item.active {
    background: #e9f2ff;
    font-weight: 600;
}

/* =========================
   PRZYCISKI NAWIGACJI KOLEJKI
========================= */
.lnp-queue-nav {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.lnp-queue-nav button {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
}

.lnp-queue-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
