.round {
    border: 1px solid #aaa;
    border-radius: 10px;
    margin: 0.5rem 0;
}

/* Unreleased rounds: faded to signal they are hidden from players */
.round.round-unreleased {
    opacity: 0.55;
    border-style: dashed;
}

.round-header {
    background: #bbb;
    padding: 0.3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: 1px solid #999;
}

.round-actions button {
    background: var(--color-on-plain-button-bg);
    border-radius: 5px;
    border: none;
    color: var(--color-on-plain-button-text);
    font-size: 1.2em;
    margin: 0 0.3em;
    cursor: pointer;
}

.round-actions button:hover {
    background: var(--color-on-plain-button-bg-hover);
}

.match-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.match-table tr {
    border-bottom: 1px dashed black;
}

.match-table tr:last-child {
    border-bottom: none;
}

.match-table td {
    vertical-align: middle;
    horiz-align: center;
    padding: 0.5rem;
    border: inherit;
}

.court_id {
    text-align: center;
    font-weight: bold;
    width: 80px;
}

.team {
    min-width: 150px;
}

.team div {
    line-height: 1.2;
}

.score {
    text-align: center;
    white-space: nowrap;
    min-width: 100px;
}

.score input {
    width: 4rem;
    text-align: center;
    border: 1px dotted black;
    border-radius: 5px;
}

.match_gender_class {
    text-align: center; /* center text in the cell */
}

.match-gender-select {
    border-style: dotted;
    background-color: transparent;
    width: 100%;
    max-width: 75px;
    min-width: 75px;
}


/* Floating add button */
.floating-add-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0d6efd;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-align: center;
    line-height: 56px;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1055;
    transition: background-color 0.3s ease;
}

.floating-add-btn:hover {
    background-color: #0056b3;
}

.highlight {
    background-color: #6f776f; /* yellow highlight */
    color: #00fa21;
    font-weight: bold;
}


/* Small screens: slightly smaller padding/font */
@media (max-width: 576px) {
    .floating-add-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        line-height: 48px;
    }
}


@media (max-width: 768px) {
    table.match-table,
    table.match-table thead,
    table.match-table tbody,
    table.match-table th,
    table.match-table td,
    table.match-table tr {
        display: block;
        width: 100%;
    }

    table.match-table thead {
        display: none; /* hide headers */
    }

    table.match-table tr {
        border: 2px solid black;
        margin-bottom: 1em;
        padding: 1em;
        background: white;
    }

    table.match-table td {
        position: relative;
        padding-left: 25%;
        border: none;
        border-bottom: 1px solid #ddd;
    }

    table.match-table td::before {
        position: absolute;
        top: 50%;
        left: 10px;
        transform: translateY(-50%);
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
        text-align: left; /* ensures left alignment */
    }
}


/* ── Accordion (round-body collapse) ─────────────────────────────────── */
.round-body.collapsed {
    display: none;
}

.round-header-chevron {
    margin-left: auto;
    font-size: 1rem;
    padding-left: 0.5rem;
    color: #555;
    flex-shrink: 0;
}

.round-header-status {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: bold;
    margin-left: 0.4rem;
}

.round-header-name {
    /* inline with siblings */
    flex: 1;
}


/* ── Mobile compact match cards ──────────────────────────────────────── */
.mobile-matches-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
}

.mobile-match-card {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

.mobile-match-card.my-match {
    border-color: #0d6efd;
    background: #f0f6ff;
}

.mobile-match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.3rem;
    gap: 0.5rem;
}

.mobile-match-label {
    color: #555;
    font-size: 0.85rem;
    white-space: nowrap;
}

.mobile-match-score {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mobile-score-input {
    width: 3rem;
    text-align: center;
    border: 1px dotted #888;
    border-radius: 4px;
    font-size: 1rem;
    padding: 2px 4px;
}

.mobile-match-grid {
    font-size: 0.9rem;
}

.mobile-match-row {
    display: grid;
    grid-template-columns: 1.5rem 1fr auto 1fr;
    align-items: center;
    gap: 0 0.4rem;
    min-height: 1.4rem;
}

.mobile-pos-label {
    color: #777;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: right;
}

.mobile-net {
    color: #aaa;
    text-align: center;
    font-size: 1rem;
}

.mobile-match-row .me {
    font-weight: bold;
    color: #0d6efd;
}

.mobile-match-row .captain {
    background-color: yellow;
    border-radius: 3px;
    padding: 0 3px;
}
