/* =============================================================
   SWS Team Pages — Matching Roster & Schedule Columns
   Titles sit ABOVE the box. Both columns identical in style.
   ============================================================= */

/* ---- Team photo (featured image via shortcode OR Gutenberg wp:image block) ---- */
.sws-team-photo,
figure.sws-team-photo-block {
    text-align: center;
    margin: 0 auto 1.5rem !important;
    max-width: 560px !important;
}
.sws-team-photo__img,
figure.sws-team-photo-block img {
    width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
    display: block !important;
}

/* ---- Coaches info ---- */
.sws-team-coaches {
    text-align: center;
    margin: 0 0 1.5rem;
}
.sws-team-coaches__item {
    font-family: inherit;
    font-size: 0.95rem;
    color: #2a2a2a;
    margin: 0.25rem 0;
}
.sws-team-coaches__item strong {
    color: #5a1a2a;
}

/* ---- Grid: equal-width columns, same height ---- */
.sws-team-tables {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    align-items: start !important;
    margin: 2rem 0 3rem !important;
}

/* ---- Column wrapper: no box — just a flex column ---- */
.sws-team-tables__col {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 620px !important;
}

/* ---- Title: outside the box, maroon text, orange underline ---- */
.sws-team-tables__title {
    font-family: 'Barlow Condensed', 'Oswald', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: #5a1a2a !important;
    margin: 0 0 0.6rem !important;
    padding: 0 0 0.5rem !important;
    border-bottom: 3px solid #e87722 !important;
    background: transparent !important;
}

/* ---- Body: white box with shadow, consistent padding ---- */
.sws-team-tables__body {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
    padding: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* ---- Roster body: stretch to fill full column height so both white boxes match ---- */
.sws-team-tables__col--roster .sws-team-tables__body {
    flex: 1 !important;
}

/* ---- Roster table: fixed layout so it always fills the full column width ---- */
.sws-team-tables__col .mstw-tr-scroll-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
}
.sws-team-tables__col .mstw-tr-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: inherit !important;
    font-size: 0.84rem !important;
    table-layout: fixed !important;
}
/* Roster column widths: NAME stretches, NBR is fixed, WT is hidden */
.sws-team-tables__col .mstw-tr-table thead th,
.sws-team-tables__col .mstw-tr-table tbody td { overflow: hidden; text-overflow: ellipsis; }
.sws-team-tables__col .mstw-tr-table .roster-table-nbr { width: 22% !important; text-align: center !important; }
/* Hide weight column — not used on this site */
.sws-team-tables__col .mstw-tr-table .roster-table-wt  { display: none !important; }

/* ---- Schedule body: fixed max-height + vertical scroll ---- */
/* max-height ≈ roster height so both columns look balanced visually.     */
/* Using max-height (not overflow:hidden on the column) so the box-shadow */
/* is never clipped and the frame matches the roster box.                 */
.sws-team-tables__body--scroll {
    max-height: 572px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #5a1a2a #f0ebe8;
}
.sws-team-tables__body--scroll::-webkit-scrollbar          { width: 6px; }
.sws-team-tables__body--scroll::-webkit-scrollbar-track    { background: #f0ebe8; border-radius: 3px; }
.sws-team-tables__body--scroll::-webkit-scrollbar-thumb    { background: #5a1a2a; border-radius: 3px; }

/* ---- Schedule table: auto layout so content never breaks mid-word ---- */
.sws-team-tables__col .mstw-ss-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: inherit !important;
    font-size: 0.84rem !important;
    table-layout: auto !important;
}
/* Keep date on one line */
.sws-team-tables__col .mstw-ss-table tbody td:first-child,
.sws-team-tables__col .mstw-ss-table thead th:first-child {
    white-space: nowrap !important;
    width: 80px !important;
}

/* Remove bold on home-game rows — uniform weight for all rows */
.sws-team-tables__col .mstw-ss-home td,
.sws-team-tables__col .mstw-ss-home th {
    font-weight: 400 !important;
}

/* ---- Table header rows — same maroon for both ---- */
.sws-team-tables__col thead th,
.sws-team-tables__col .mstw-ss-table thead th,
.sws-team-tables__col .mstw-tr-table thead th {
    background: #5a1a2a !important;
    color: #ffffff !important;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    padding: 11px 10px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    border: none !important;
}

/* ---- Body cells — same font, padding, and row lines for both ---- */
.sws-team-tables__col tbody td,
.sws-team-tables__col .mstw-ss-table tbody td,
.sws-team-tables__col .mstw-tr-table tbody td {
    font-family: inherit !important;
    font-size: 0.84rem !important;
    color: #2a2a2a !important;
    padding: 9px 10px !important;
    border-bottom: 1px solid #e4e4e4 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    line-height: 1.35 !important;
    vertical-align: top !important;
}

/* ---- Alternating row color — same for both ---- */
.sws-team-tables__col tbody tr:nth-child(even) td,
.sws-team-tables__col .mstw-ss-table tbody tr:nth-child(even) td,
.sws-team-tables__col .mstw-tr-table tbody tr:nth-child(even) td {
    background: #f8f4f4 !important;
}

.sws-team-tables__col tbody tr:nth-child(odd) td,
.sws-team-tables__col .mstw-ss-table tbody tr:nth-child(odd) td,
.sws-team-tables__col .mstw-tr-table tbody tr:nth-child(odd) td {
    background: #ffffff !important;
}

/* ---- Hover ---- */
.sws-team-tables__col tbody tr:hover td {
    background: #f0e8e9 !important;
}

/* ---- Links inside tables ---- */
.sws-team-tables__col tbody td a,
.sws-team-tables__col tbody td a:link,
.sws-team-tables__col tbody td a:visited,
.sws-team-tables__col .mstw-ss-table tbody td a,
.sws-team-tables__col .mstw-ss-table tbody td a:link,
.sws-team-tables__col .mstw-ss-table tbody td a:visited,
.sws-team-tables__col .mstw-tr-table tbody td a,
.sws-team-tables__col .mstw-tr-table tbody td a:link,
.sws-team-tables__col .mstw-tr-table tbody td a:visited {
    color: #2a2a2a !important;
    text-decoration: none !important;
    font-weight: inherit !important;
}
.sws-team-tables__col tbody td a:hover,
.sws-team-tables__col .mstw-ss-table tbody td a:hover,
.sws-team-tables__col .mstw-tr-table tbody td a:hover {
    color: #5a1a2a !important;
    text-decoration: underline !important;
}

/* ---- "No players found" notice ---- */
.sws-roster-notice,
.sws-team-tables__body h1 {
    font-family: inherit !important;
    font-size: 0.9rem !important;
    font-weight: normal !important;
    color: #888 !important;
    font-style: italic !important;
    padding: 16px !important;
    margin: 0 !important;
}

/* ---- "View Schedule" link — used when no per-team MSTW schedule exists ---- */
.sws-schedule-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 80px;
}
.sws-schedule-link__btn {
    display: inline-block;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #5a1a2a !important;
    text-decoration: none !important;
    border: 2px solid #5a1a2a;
    border-radius: 4px;
    padding: 0.65rem 1.4rem;
    transition: background 0.15s, color 0.15s;
}
.sws-schedule-link__btn:hover {
    background: #5a1a2a !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ---- Responsive: stack on tablet/mobile ---- */
@media (max-width: 800px) {
    .sws-team-tables {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}
