/* Practice board */
.lb-date-picker {
    max-width: 200px;
}

.lb-lane-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.lb-lane {
    min-height: 120px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    transition: background-color 120ms ease, border-color 120ms ease;
}

/* The holding area for members who have a place but no lane yet. */
.lb-lane-unassigned {
    border-style: dashed;
}

/* The clock next to a lane's estimated running time, sat on the text baseline. */
.lb-lane-clock {
    font-size: 0.95rem;
    vertical-align: text-bottom;
    margin-right: 0.15rem;
}

/* Members holding no place in the window. Dashed like the holding area, but tinted so it does not read
   as another place to leave people. */
.lb-lane-waitlist {
    border-style: dashed;
    border-color: var(--mud-palette-warning);
    background-color: rgba(255, 152, 0, 0.06);
}

/* MudDropZone applies this while a dragged bowler is over a lane that will accept them. */
.lb-lane-can-drop {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-action-default-hover);
}

.lb-bowler {
    padding: 0.15rem 0;
    cursor: grab;
}

.lb-bowler-dragging {
    opacity: 0.5;
}

/* Roster — deliberately plain, because this is printed and handed over */
.lb-roster-day {
    margin-bottom: 2rem;
}

.lb-roster-date {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid currentColor;
}

.lb-roster-slot {
    margin: 0 0 1rem;
}

/* Reuses the date heading so the day's roll-up reads as a peer of the day itself. */
.lb-roster-summary-heading {
    margin-top: 1.5rem;
}

.lb-roster-slot h3 {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.lb-roster-slot-title {
    font-weight: 400;
    opacity: 0.75;
    margin-left: 0.5rem;
}

.lb-roster-cancelled {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #b3261e;
}

.lb-roster-summary {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.lb-roster-notes,
.lb-roster-empty {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    opacity: 0.75;
}

.lb-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.lb-roster-table th,
.lb-roster-table td {
    text-align: left;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.35);
    vertical-align: top;
}

.lb-roster-table th {
    font-weight: 600;
    white-space: nowrap;
}

.lb-numeric {
    text-align: right;
    white-space: nowrap;
}

.lb-roster-lane {
    white-space: nowrap;
    font-weight: 600;
}

.lb-roster-unplaced td {
    font-style: italic;
}

/* Closes a lane's block of bowlers with what that lane accounts for. */
.lb-roster-lane-total td {
    font-weight: 600;
    border-bottom-width: 2px;
}

.lb-roster-bowler-notes {
    font-size: 0.8rem;
    opacity: 0.75;
}

.lb-roster-totals {
    margin-top: 0.5rem;
}

.lb-muted {
    opacity: 0.6;
}

.lb-met {
    color: #1b5e20;
}

.lb-short {
    color: #b3261e;
    font-weight: 600;
}

.lb-print-only {
    display: none;
}

@media print {
    .lb-no-print,
    header,
    nav,
    aside,
    .mud-appbar,
    .mud-drawer {
        display: none !important;
    }

    .lb-print-only {
        display: block;
    }

    .lb-roster-title h1 {
        font-size: 1.25rem;
        margin: 0 0 0.15rem;
    }

    .lb-roster-title p {
        margin: 0 0 1rem;
        font-size: 0.85rem;
    }

    .lb-roster {
        color: #000;
    }

    /* A day should not be split across pages if it can be helped. */
    .lb-roster-day {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .lb-roster-slot {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Shared roster page — the bowling centre's view. No app chrome, so it styles itself. */
.lb-shared-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.lb-shared-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.4);
}

.lb-shared-header h1 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
}

.lb-shared-header p {
    margin: 0;
    font-size: 0.85rem;
}

.lb-shared-actions {
    display: flex;
    gap: 0.4rem;
}

.lb-shared-actions button {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid rgba(128, 128, 128, 0.6);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    color: inherit;
}

.lb-shared-actions button:hover {
    background: rgba(128, 128, 128, 0.12);
}

.lb-shared-message {
    padding: 2rem 0;
    text-align: center;
}

.lb-shared-message h1 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

@media print {
    .lb-shared-page {
        max-width: none;
        padding: 0;
    }

    .lb-shared-header {
        border-bottom-width: 2px;
    }
}
