/*
 * Schedule structure-preview table (Views/Shared/_ScheduleTableStyles.cshtml)
 * Rendered from ScheduleController.FormatScheduleStructure into the
 * "Schedule Details" / "Preview Schedule" modal.
 *
 * Styled to mirror the public agenda page (Views/ScheduleView/Index.cshtml):
 * spaced "card" rows, navy event pills with an EVENT badge, number-plate race
 * labels, surface-tint class chips. Poppins / navy-blue-surface tokens, no gray.
 */

/* Structure Preview Table — rows float as separate cards */
.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    min-width: 560px; /* scrolls inside .table-responsive on phones */
    font-family: 'Poppins', sans-serif;
    color: var(--color-navy, #181c32);
    background: transparent;
}

/* Header — light surface bar so it never competes with the navy event rows */
.schedule-table thead th {
    background-color: transparent;
    color: var(--color-navy, #181c32);
    text-align: left;
    padding: 0.25rem 1rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--border-subtle, #e7edf3);
}

/* ---- Race rows: white bordered cards ---- */
.schedule-table tbody tr:not(.schedule-event-row) td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-navy, #181c32);
    background: #ffffff;
    border-top: 1px solid var(--border-subtle, #e7edf3);
    border-bottom: 1px solid var(--border-subtle, #e7edf3);
}

.schedule-table tbody tr:not(.schedule-event-row) td:first-child {
    border-left: 1px solid var(--border-subtle, #e7edf3);
    border-top-left-radius: var(--radius-card, 0.75rem);
    border-bottom-left-radius: var(--radius-card, 0.75rem);
    white-space: nowrap;
    width: 1%;
}

.schedule-table tbody tr:not(.schedule-event-row) td:last-child {
    border-right: 1px solid var(--border-subtle, #e7edf3);
    border-top-right-radius: var(--radius-card, 0.75rem);
    border-bottom-right-radius: var(--radius-card, 0.75rem);
}

/* "Race N" as a number-plate chip (WSBK/MotoGP style used across the app) */
.schedule-table td:first-child strong {
    display: inline-block;
    min-width: 3.25rem;
    text-align: center;
    padding: 0.3rem 0.55rem;
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 0.475rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-navy, #181c32);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* ---- Wave label + class chips ---- */
.wave-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.wave-text:last-child {
    margin-bottom: 0;
}

.wave-text > strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-blue, #0069b4);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 0.1rem;
}

.wave-separator {
    display: none;
}

/* Each class name rendered as a surface-tint pill, like the agenda chips */
.class-name {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: var(--surface-tint, #f5f8fa);
    border: 1px solid var(--border-subtle, #e7edf3);
    border-radius: 0.475rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-navy, #181c32);
}

/* ---- Event rows: navy pill with an EVENT badge, mirroring .agenda-event ---- */
.schedule-table tr.schedule-event-row td {
    padding: 0.75rem 1rem;
    background-color: var(--color-navy, #181c32);
    color: #ffffff;
    border-radius: var(--radius-card, 0.75rem);
}

.schedule-table .event-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}

.schedule-table .event-name::before {
    content: "Event";
    display: inline-block;
    margin-right: 0.7rem;
    padding: 0.28rem 0.65rem;
    background: #ffffff;
    color: var(--color-navy, #181c32);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 0.475rem;
    vertical-align: middle;
}

.schedule-table .event-notes {
    font-weight: 500;
    color: #ffffff;
    opacity: 0.92;
}

.schedule-table .event-notes::before {
    content: " | ";
    opacity: 0.55;
}

/* No-gray rule: the generated markup uses .text-muted for empty states. */
.schedule-table .text-muted {
    color: var(--color-navy, #181c32) !important;
    font-weight: 500;
}
