

/* --- 1. THEME OVERRIDES (Force White Background & Fix Top Gap) --- */

/* Target Single Events & Calendar Page */
body.single-sc_event, 
body:has(.sc-calendar-wrapper) {
    background-color: #ffffff !important;
}

/* Force Inner Containers White & SET GAP TO 30PX */
body.single-sc_event #main, 
body:has(.sc-calendar-wrapper) #main {
    background-color: #ffffff !important;
    background-image: none !important;
    padding-top: 30px !important;     /* <--- FORCE EXACT 30PX GAP */
    padding-bottom: 0 !important;
}

/* Reset inner wrappers so they don't add extra spacing */
body.single-sc_event .wf-wrap,            body:has(.sc-calendar-wrapper) .wf-wrap,
body.single-sc_event .wf-container-main, body:has(.sc-calendar-wrapper) .wf-container-main {
    background-color: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 0 !important;          /* <--- Remove extra margin */
    padding-top: 0 !important;         /* <--- Remove extra padding */
}

/* =====================================================
   FIX: HORIZONTAL OVERFLOW ("WHITE LINE" AT RIGHT)

   Some mobile browsers show a thin white strip on the
   right edge of the footer on Event Hub / Event pages.
   This is caused by small horizontal overflow.
   We safely clamp overflow on those pages only.
   ===================================================== */
/* Clamp overflow on Event Hub UI pages.
   Note: we avoid :has() here for broader mobile support.
   The .sc-eh-ui class is added by JS only when Event Hub UI is present. */
html.sc-eh-ui,
body.sc-eh-ui,
body.single-sc_event{
  /* Avoid 100vw here (it can create a 1–2px horizontal overflow on mobile).
     Just clamp overflow so the footer doesn't show a right-side "white line". */
  overflow-x: hidden !important;
}

/* Mobile safety clamp:
   The Event Hub UI includes fixed-position elements (filters bar/drawer).
   On some mobile browsers a sub-pixel layout can introduce a tiny horizontal
   overflow which shows as a "white line" at the right edge + a horizontal scroll.
   This stylesheet is only enqueued on Event Hub / event views, so it's safe to
   clamp globally within this CSS.
*/
@media (max-width: 768px){
  html, body{ overflow-x: hidden !important; }
}

/* Hide the little summary line under "Filter events" in the
   mobile sticky bar (keeps the main label + button). */
@media (max-width: 768px){
  #scMobileFilterSummary{
    display: none !important;
  }
}

/* Hide the Blue Gradient Overlay */
body.single-sc_event .main-gradient, 
body:has(.sc-calendar-wrapper) .main-gradient {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
}


/* --- 2. MAIN WRAPPER (Full Width & Flat) --- */
/* UNIVERSAL RESET: Ensure nothing exceeds screen width */
.sc-calendar-wrapper, .sc-event-container, .sc-event-container * {
    box-sizing: border-box !important; /* CRITICAL FIX for overflow */
    max-width: 100% !important;       /* Prevent horizontal scroll without vw rounding */
}

.sc-calendar-wrapper, .sc-event-container {
    width: 100%;             /* Full width */
    margin: 0 auto;          /* Remove top/bottom spacing conflicts */
    padding: 0;              /* Let theme handle padding */
    font-family: inherit;    /* Use site font */
    background: #fff;        /* Pure white */
}

/* --- SEARCH & FILTERS --- */
.sc-header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    width: 100%;
}

/* Sport Filter Tabs */

.sc-filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px;
    background: #fff;
    border: none;
    border-radius: 12px;
}


.sc-filter-bar a {
    text-decoration: none;
    color: #243041;
    background: transparent;
    padding: 9px 14px;
    border: 0;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.sc-filter-bar a:hover {
    background: #eef2f6;
    color: #111827;
}

.sc-filter-bar a.active {
    background: #2c3e50;
    color: #fff;
}

/* Mobile: tabs fill the row */
@media (max-width: 640px) {
    
.sc-filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px;
    background: #fff;
    border: none;
    border-radius: 12px;
}

    .sc-filter-bar a {
        flex: 1;
        text-align: center;
        padding: 10px 10px;
    }
}

/* Search Box */
.sc-search-box {
    width: 100%;
    position: relative;
}

.sc-search-box input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 0; /* Square edges */
    font-size: 1.1rem;
    outline: none;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sc-search-box input:focus {
    background-color: #fff;
    border-color: #2c3e50;
}

/* Search Icon */
.sc-search-box::before {
    content: '🔍';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
    pointer-events: none;
}

/* --- EVENT LIST (Flat & Full Width) --- */
.sc-event-list {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove gap, use border instead for list look */
}

.sc-list-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 25px 0; /* Vertical spacing only */
    border-bottom: 1px solid #eee; /* Separator line */
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border-radius: 0; /* Square edges */
}

.sc-list-item:hover {
    background: #fafafa; /* Subtle hover tint */
}

/* Date Box */
.sc-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: #f8f9fa;
    margin-right: 25px;
    border: 1px solid #eee;
    color: #2c3e50;
    border-radius: 0; /* Square edges */
}

.sc-day { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.sc-month { font-size: 0.75rem; text-transform: uppercase; color: #e74c3c; font-weight: 700; }

/* Info Section */
.sc-info { flex-grow: 1; }
.sc-sport-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #eef2f5;
    color: #6c7a89;
    padding: 3px 8px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0;
    border-radius: 0; /* Square edges */
}

.sc-badges-row{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
    margin-bottom:6px;
}

.sc-state-badge{
    display:inline-block;
    font-size:0.7rem;
    background:#f3f4f6; /* lighter grey than sport badge */
    color:#6b7280;
    padding:3px 8px;
    text-transform:uppercase;
    font-weight:600;
    border:1px solid #e5e7eb;
    border-radius:0; /* Square edges */
}

.sc-info h3 { margin: 0 0 5px 0; font-size: 1.2rem; color: #2c3e50; font-weight: 700; }
.sc-meta { font-size: 0.95rem; color: #7f8c8d; }

/* Arrow */
.sc-action { padding-left: 20px; }
.sc-arrow { font-size: 1.5rem; color: #ccc; }

/* --- SINGLE EVENT PAGE (Clean & Flat) --- */
.sc-single-wrapper {
    background: #fff;
    box-shadow: none; /* Removed shadow */
    padding: 20px 0;  /* Remove side padding */
    margin-top: 0;
    border-radius: 0;
}

/* Header - Reduced Size */
.sc-single-header { text-align: left; margin-bottom: 30px; }
.sc-single-header h1 {
    font-size: 2.2rem; /* Reduced from 2.8rem */
    color: #2c3e50;
    margin-top: 10px;
    line-height: 1.2;
}

/* Status Badges */
.sc-sport-badge-lg {
    background: #e74c3c; color: #fff; padding: 5px 12px; font-size: 0.8rem; text-transform: uppercase; font-weight: 700; border-radius: 0;
}
.sc-status-badge {
    font-size: 0.7rem; padding: 5px 10px; text-transform: uppercase; font-weight: bold; margin-left: 10px; vertical-align: middle; border-radius: 0;
}
.sc-status-upcoming, .sc-status-entries_open { background: #27ae60; color: #fff; }
.sc-status-cancelled { background: #c0392b; color: #fff; text-decoration: line-through; }
.sc-status-sold_out { background: #e67e22; color: #fff; }

/* Meta Bar */
.sc-single-meta-bar {
    display: flex;
    justify-content: flex-start; /* Align left */
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px 0;
    background: transparent; /* Removed grey background */
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    border-radius: 0;
}

.sc-meta-item { display: flex; align-items: center; gap: 10px; text-align: left; }
.sc-meta-item .dashicons { font-size: 20px; color: #e74c3c; }
.sc-meta-item strong { display: block; font-size: 0.75rem; text-transform: uppercase; color: #999; }
.sc-meta-item span { font-size: 1rem; font-weight: 600; color: #333; }

/* Layout Grid */
.sc-single-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }

/* Content Area */
.sc-course-info-box {
    display: flex; gap: 20px; background: #f9f9f9; padding: 15px; margin-bottom: 25px; border: 1px solid #eee; border-radius: 0;
}
.sc-body-text { font-size: 1.05rem; line-height: 1.6; color: #444; margin-bottom: 30px; }

/* Official Box */
.sc-official-box {
    background: #fcfcfc; border: 1px solid #eee; padding: 25px; text-align: center; border-radius: 0;
}
.button {
    border-radius: 0 !important; /* Force square buttons */
}

/* --- SIDEBAR (Clean) --- */
.sc-cta-card {
    background: #2c3e50;
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0; /* Square edges */
}

.sc-cta-card h3 {
    color: #ffffff !important; /* Forces text to be White */
    margin-top: 0;
    font-size: 1.4rem;
    font-family: inherit;
}

.sc-cta-card p {
    color: #bdc3c7;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
    font-family: inherit;
}

.sc-cta-card .button.full-width {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 4px auto;
    padding: 8px 16px;
    line-height: 1;
    font-size: 0.9rem;
    min-width: 130px;
    border-radius: 0; /* Square buttons */
}

/* --- RELATED POSTS --- */
.sc-related-wrapper { margin-top: 60px; padding-top: 40px; border-top: 1px solid #eee; }
.sc-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sc-related-card {
    display: block; text-decoration: none; background: #fff; border: 1px solid #eee;
    transition: transform 0.2s; border-radius: 0; /* Square edges */
}
.sc-related-card:hover { transform: translateY(-3px); }
.sc-related-thumb { height: 150px; background-size: cover; background-position: center; }
.sc-related-content { padding: 15px; }
.sc-related-content h4 { margin: 0 0 10px 0; font-size: 1rem; color: #2c3e50; line-height: 1.4; font-weight: 600; }
.sc-related-content .read-more { font-size: 0.85rem; color: #e74c3c; font-weight: bold; }

/* --- PAGINATION --- */
.sc-pagination { margin-top: 40px; display: flex; justify-content: center; }
.sc-pagination ul { list-style: none !important; padding: 0; margin: 0; display: flex; gap: 5px; }
.sc-pagination a, .sc-pagination span.current {
    display: block; padding: 10px 15px; background: #fff; border: 1px solid #eee;
    text-decoration: none; color: #555; border-radius: 0; /* Square edges */
}
.sc-pagination a:hover, .sc-pagination span.current {
    background: #2c3e50; color: #fff; border-color: #2c3e50;
}

/* --- Fix Page Titles (Calendar & Single Event) --- */
body:has(.sc-calendar-wrapper) h2.elementor-heading-title,
body.single-sc_event .sc-single-header h1 {
    color: #2c3e50 !important;      /* Dark Blue */
    font-size: 22px !important;       /* Exact size requested */
    font-family: "Manrope", sans-serif !important; /* Client's Font */
    font-weight: 700 !important;      /* Bold */
    line-height: 1.3 !important;      /* Better spacing */
    margin-top: 0 !important;
}

/* --- Fix Related Articles Typography --- */
.sc-related-wrapper > h3 {
    color: #2c3e50 !important;        /* Dark Blue */
    font-size: 22px !important;       /* Client's Size */
    font-family: "Manrope", sans-serif !important; /* Client's Font */
    font-weight: 700 !important;
    text-transform: none;             /* Optional: Removes uppercase if theme forces it */
}
.sc-related-content h4 {
    font-family: "Manrope", sans-serif !important; /* Match the font */
    color: #2c3e50 !important;        /* Dark Blue */
    font-weight: 600 !important;
    font-size: 16px !important;       /* Keep cards slightly smaller for hierarchy */
}

/* --- Fix Fonts for ENTIRE Single Event Page --- */
.sc-event-container h3 {
    font-family: "Manrope", sans-serif !important;
    color: #2c3e50 !important;
    font-size: 1.5rem !important; /* Nice sub-header size */
    font-weight: 700 !important;
}
.sc-body-text, .sc-body-text p {
    font-family: "Manrope", sans-serif !important;
    font-size: 16px !important;    /* Readable body size */
    line-height: 1.6 !important;
    color: #444 !important;
}
.sc-official-box p {
    font-family: "Manrope", sans-serif !important;
    font-size: 16px !important;
    color: #2c3e50 !important;
}
.sc-course-info-box, .sc-course-item {
    font-family: "Manrope", sans-serif !important;
    font-size: 15px !important;
}
.sc-official-box .button {
    font-family: "Manrope", sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 14px !important;
}
.sc-cta-card h3 {
    color: #ffffff !important; /* Force white text */
    margin-top: 0;             /* Reset spacing */
}
.sc-cta-card p {
    color: #bdc3c7 !important; /* Light grey for the description */
}

/* --- Google Map Section --- */
.sc-map-container {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #eee;
    padding: 0; 
}
.sc-map-container h3 {
    padding: 15px 20px 5px 20px; 
    margin: 0;
    font-size: 1.5rem !important;
    font-family: "Manrope", sans-serif !important;
    color: #2c3e50 !important;
}
.sc-map-container iframe {
    display: block; 
    border: none;
    width: 100%;
}
.sc-map-link {
    display: block;
    padding: 10px 20px;
    background: #f9f9f9;
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid #eee;
    font-family: "Manrope", sans-serif !important;
    transition: background 0.2s;
}
.sc-map-link:hover {
    background: #f0f0f0;
    color: #c0392b;
}

/* --- Table Styles --- */
.sc-table-responsive {
    width: 100%;
    overflow-x: auto; /* Allows scrolling on mobile */
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.sc-frontend-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px; /* Forces scroll on very small screens */
    background: #fff;
    font-size: 15px;
}
.sc-frontend-table thead {
    background-color: #f7f7f7;
    border-bottom: 2px solid #eaeaea;
}
.sc-frontend-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}
.sc-frontend-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}
.sc-frontend-table tr:last-child td {
    border-bottom: none;
}
.sc-frontend-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* ================================================================= */
/* MOBILE RESPONSIVENESS FIXES (Completely Revised)                  */
/* This forces a strictly vertical layout and prevents all overflow  */
/* ================================================================= */
@media only screen and (max-width: 900px) {

    /* 1. Force Single Column Layout using Flexbox (Stronger than Grid) */
    .sc-single-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 30px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .sc-related-grid {
        grid-template-columns: 1fr !important;
    }

    /* 2. Reset Content & Sidebar Widths to 100% */
    .sc-content-area, 
    .sc-sidebar-area {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }
    
    /* 3. Add top margin to Sidebar so it doesn't touch content */
    .sc-sidebar-area {
        margin-top: 30px !important;
    }

    /* 4. Fix Map Iframe Width */
    .sc-map-container iframe {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 5. Fix "Train Smarter" Card */
    .sc-cta-card {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* 5b. Mobile UX: hide the sidebar "Filter Events" card.
       On mobile we use the sticky/bottom filter UI, so this prevents the
       duplicate filter panel from appearing in the sidebar stack. */
    .sc-event-filters-card,
    .sc-cal-filters-card {
        display: none !important;
    }

    /* 6. Allow Table Scrolling (Specific override for the table wrapper) */
    /* Note: The universal reset above sets max-width: 100vw, which is good. */
    /* This ensures the scroll bar appears inside the div. */
    .sc-table-responsive {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
    }
    
    /* 7. Fix Header & Meta Bar stacking */
    .sc-single-meta-bar { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    .sc-list-item { 
        flex-direction: column; 
        align-items: flex-start; 
    }
    
    .sc-date-box { 
        margin-bottom: 15px; 
        flex-direction: row; 
        width: 100%; 
        height: auto; 
        padding: 10px; 
        justify-content: flex-start; 
        background: transparent; 
        border: none; 
    }
    
    .sc-date-box .sc-day { margin-right: 10px; }
    
    .sc-action { 
        position: absolute; 
        top: 20px; 
        right: 20px; 
    }
}

.sc-distance-tag {
    font-size: 12px;
    padding: 6px 6px;
    border-radius: 4px;
    font-weight: 300;
    display: inline-block;
    line-height: 1.2;
    background-color: #f8f8f8;
    border: none;
}


    border: none;
}

/* Prevent hover/focus colour changes */
.sc-distance-tag:hover,
.sc-distance-tag:focus {
    background-color: #f8f8f8;
    color: inherit;
}

/* Distance badge final enforced styling */
.sc-distance-tag {
    font-size: 12px !important;
    padding: 6px 6px !important;
    border-radius: 4px;
    font-weight: 300;
    display: inline-block;
    line-height: 1.2;
    background-color: #f8f8f8 !important;
    border: none !important;
}

/* Disable hover/focus/active colour changes */
.sc-distance-tag:hover,
.sc-distance-tag:focus,
.sc-distance-tag:active {
    background-color: #f8f8f8 !important;
    color: inherit !important;
}

/* Neutralise anchor hover styles affecting distance tags */
.sc-distance-tag,
.sc-distance-tag a,
.sc-distance-tag a:hover,
.sc-distance-tag a:focus,
.sc-distance-tag a:active {
    color: inherit !important;
    text-decoration: none !important;
    background-color: #f8f8f8 !important;
}

/* FINAL: completely disable hover/link behaviour for distance badges */
.sc-distance-tag {
    pointer-events: none !important;
    cursor: default !important;
}

.sc-distance-tag,
.sc-distance-tag:hover,
.sc-distance-tag:focus,
.sc-distance-tag:active,
.sc-distance-tag a,
.sc-distance-tag a:hover,
.sc-distance-tag a:focus,
.sc-distance-tag a:active {
    background-color: #f8f8f8 !important;
    color: inherit !important;
    text-decoration: none !important;
}

/* Disable list card hover tint (keeps cards visually static on hover) */
.sc-list-item:hover,
.sc-list-item:focus,
.sc-list-item:active {
    background: #fff !important;
}

/* Disable ANY hover text colour changes on the whole card (theme/link hover overrides) */
.sc-list-item,
.sc-list-item * {
    color: inherit;
}

.sc-list-item:hover,
.sc-list-item:hover *,
.sc-list-item:focus,
.sc-list-item:focus *,
.sc-list-item:active,
.sc-list-item:active * {
    color: inherit !important;
    text-decoration: none !important;
}

/* Distance label */
.sc-distance-label {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280; /* muted grey */
    margin-right: 6px;
    white-space: nowrap;
}



/* --- Filter alignment fix (v2) --- */
.sc-page-filter-row{
    align-items: flex-end; /* align controls to same baseline */
}

.sc-page-filter-field label{
    margin: 0 0 6px 0;
    min-height: 16px;
    line-height: 16px;
}

.sc-page-filter-input{
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    line-height: normal;
}

.sc-page-filter-input[type="month"]{
    padding-right: 40px; /* room for calendar icon */
}

.sc-page-filter-actions{
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.sc-page-filter-btn{
    box-sizing: border-box;
    height: 42px;
    padding: 0 16px;
    line-height: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure native select arrow doesn't change height */
.sc-page-filter-field select.sc-page-filter-input{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}


/* --- Filter alignment fix (v3 override) --- */
.sc-page-filter-row{
    align-items: flex-start;
}

.sc-page-filter-field{
    align-items: flex-start;
}

.sc-page-filter-field label{
    min-height: 18px;
    line-height: 18px;
    margin-bottom: 8px;
}

/* Force identical visual height + vertical centering */
.sc-page-filter-input{
    height: 44px !important;
    padding: 0 12px !important;
    line-height: 44px !important;
    display: block;
}

.sc-page-filter-field select.sc-page-filter-input{
    line-height: 44px !important;
}

.sc-page-filter-input[type="month"]{
    padding-right: 44px !important;
}

/* Align action buttons with inputs (same top offset as inputs) */
.sc-page-filter-actions{
    padding-top: 26px; /* label(18) + margin(8) */
    align-items: flex-start;
}

.sc-page-filter-btn{
    height: 44px !important;
    line-height: 44px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px !important;
}


/* --- Calendar filter layout: grid-based alignment (override) --- */
.sc-page-filter-row{
    display: grid !important;
    grid-template-columns: 200px 220px auto;
    column-gap: 14px;
    row-gap: 10px;
    align-items: end !important;
    justify-content: start !important;
}

.sc-page-filter-field{
    display: grid;
    grid-template-rows: 18px 44px;
    row-gap: 8px;
}

.sc-page-filter-field label,
.sc-page-filter-label-spacer{
    font-size: 12px;
    line-height: 18px;
    height: 18px;
    margin: 0;
    color: #111827;
}

.sc-page-filter-label-spacer{
    visibility: hidden; /* keeps row height for buttons column */
}

.sc-page-filter-input{
    box-sizing: border-box;
    height: 44px !important;
    width: 100%;
    padding: 0 12px !important;
    border: 1px solid #e1e5ea !important;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    line-height: 44px;
}

.sc-page-filter-input[type="month"]{
    padding-right: 44px !important;
}

.sc-page-filter-actions{
    display: flex;
    gap: 10px;
    align-items: center;
    height: 44px;
}

.sc-page-filter-btn{
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 8px;
    line-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px){
    .sc-page-filter-row{
        grid-template-columns: 1fr 1fr;
    }
    .sc-page-filter-actions-field{
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px){
    .sc-page-filter-row{
        grid-template-columns: 1fr;
    }
}


/* --- Calendar filter: INLINE alignment override --- */
.sc-page-filter-row--inline{
    display: flex !important;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Remove any grid/flex-end effects from older versions */
.sc-page-filter-row--inline .sc-page-filter-item{
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sc-page-filter-row--inline .sc-page-filter-label{
    font-size: 13px;
    line-height: 1;
    color: #111827;
    min-width: 48px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.sc-page-filter-row--inline .sc-page-filter-input{
    box-sizing: border-box;
    height: 44px !important;
    min-width: 200px;
    padding: 0 12px !important;
    border: 1px solid #e1e5ea !important;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    line-height: normal !important;
}

.sc-page-filter-row--inline .sc-page-filter-input[type="month"]{
    padding-right: 44px !important;
}

.sc-page-filter-row--inline .sc-page-filter-actions{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
}

.sc-page-filter-row--inline .sc-page-filter-btn{
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: normal !important;
}

/* Mobile */
@media (max-width: 640px){
    .sc-page-filter-row--inline .sc-page-filter-input{ min-width: 100%; width: 100%; }
    .sc-page-filter-row--inline .sc-page-filter-item{ width: 100%; justify-content: space-between; }
    .sc-page-filter-row--inline .sc-page-filter-actions{ width: 100%; }
    .sc-page-filter-row--inline .sc-page-filter-btn{ flex: 1; }
}


/* --- Calendar filter: input-group layout (better inline alignment) --- */
.sc-page-filter-row--groups{
    display:flex !important;
    flex-wrap:wrap;
    gap:12px;
    align-items:center !important;
    justify-content:flex-start !important;
}

/* Group with built-in label prefix */
.sc-page-filter-row--groups .sc-filter-group{
    display:inline-flex;
    align-items:center;
    height:44px;
    border:1px solid #e1e5ea;
    border-radius:10px;
    background:#fff;
    overflow:hidden;
}

.sc-page-filter-row--groups .sc-filter-prefix{
    height:44px;
    display:inline-flex;
    align-items:center;
    padding:0 12px;
    font-size:13px;
    color:#111827;
    background:#f7f9fb;
    border-right:1px solid #eef2f6;
    white-space:nowrap;
}

/* Actual controls inside group: borderless, same height */
.sc-page-filter-row--groups .sc-filter-control{
    height:44px;
    border:0 !important;
    background:transparent;
    padding:0 12px;
    font-size:14px;
    line-height:44px;
    outline:none;
    min-width:180px;
    box-shadow:none !important;
    box-sizing:border-box;
}

/* Month icon spacing */
.sc-page-filter-row--groups .sc-filter-control[type="month"]{
    padding-right:42px;
}

/* Normalize select arrow without affecting height */
.sc-page-filter-row--groups select.sc-filter-control{
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
                      linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat:no-repeat;
    padding-right:34px;
    line-height: normal;
}

/* Buttons */
.sc-page-filter-row--groups .sc-filter-actions{
    display:inline-flex;
    align-items:center;
    gap:10px;
    height:44px;
}

.sc-page-filter-row--groups .sc-filter-btn{
    height:44px;
    padding:0 16px;
    border-radius:10px;
    border:0;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.sc-page-filter-row--groups .sc-filter-btn.secondary{
    background:transparent;
    border:1px solid #e1e5ea;
}

/* Responsive */
@media (max-width: 860px){
    .sc-page-filter-row--groups .sc-filter-control{ min-width: 140px; }
}
@media (max-width: 640px){
    .sc-page-filter-row--groups{ gap:10px; }
    .sc-page-filter-row--groups .sc-filter-group,
    .sc-page-filter-row--groups .sc-filter-actions{
        width:100%;
    }
    .sc-page-filter-row--groups .sc-filter-control{ width:100%; min-width:0; flex:1; }
    .sc-page-filter-row--groups .sc-filter-btn{ flex:1; }
}


/* --- HARD SCOPE: Calendar page filter only --- */
.sc-event-calendar .sc-page-filter-row--groups{
    display:flex !important;
    flex-wrap:wrap;
    gap:12px;
    align-items:center !important;
    justify-content:flex-start !important;
}

.sc-event-calendar .sc-filter-group{
    display:inline-flex;
    align-items:center;
    height:44px;
    border:1px solid #e1e5ea;
    border-radius:10px;
    background:#fff;
    overflow:hidden;
}

.sc-event-calendar .sc-filter-prefix{
    height:44px;
    display:inline-flex;
    align-items:center;
    padding:0 12px;
    font-size:13px;
    background:#f7f9fb;
    border-right:1px solid #eef2f6;
}

.sc-event-calendar .sc-filter-control{
    height:44px;
    border:0 !important;
    background:transparent;
    padding:0 12px;
    font-size:14px;
    box-shadow:none !important;
}

.sc-event-calendar .sc-filter-actions{
    display:inline-flex;
    align-items:center;
    gap:10px;
    height:44px;
}

.sc-event-calendar .sc-filter-btn{
    height:44px;
    padding:0 16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}


/* --- Event Hub Calendar filter (scoped) --- */
.sc-eh-cal-filters{
    margin-top: 14px;
    width: 100%;
    padding: 12px 14px;
    background: #f7f9fb;
    border-radius: 10px;
}

.sc-eh-cal-filters .sc-eh-filter-row{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

.sc-eh-cal-filters .sc-eh-filter-group{
    display: inline-flex;
    align-items: center;
    height: 44px;
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.sc-eh-cal-filters .sc-eh-filter-prefix{
    height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    color: #111827;
    background: #f7f9fb;
    border-right: 1px solid #eef2f6;
    white-space: nowrap;
}

.sc-eh-cal-filters .sc-eh-filter-control{
    height: 44px;
    border: 0 !important;
    background: transparent;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    min-width: 180px;
    box-shadow: none !important;
    box-sizing: border-box;
}

.sc-eh-cal-filters .sc-eh-filter-control[type="month"]{
    padding-right: 42px;
}

.sc-eh-cal-filters select.sc-eh-filter-control{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
                      linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.sc-eh-cal-filters .sc-eh-filter-actions{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
}

.sc-eh-cal-filters .sc-eh-filter-btn{
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sc-eh-cal-filters .sc-eh-filter-btn.secondary{
    background: transparent;
    border: 1px solid #e1e5ea;
}

/* Mobile */
@media (max-width: 640px){
    .sc-eh-cal-filters .sc-eh-filter-group,
    .sc-eh-cal-filters .sc-eh-filter-actions{
        width: 100%;
    }
    .sc-eh-cal-filters .sc-eh-filter-control{
        width: 100%;
        min-width: 0;
        flex: 1;
    }
    .sc-eh-cal-filters .sc-eh-filter-btn{
        flex: 1;
    }
}

/* --- Mobile only: hide event card image --- */
@media (max-width: 640px){
    .sc-list-item .sc-event-image,
    .sc-list-item .sc-event-thumb,
    .sc-list-item .sc-event-image-wrap,
    .sc-list-item img{
        display: none !important;
    }
}

/* --- Mobile only: hide event card thumbnail block (Event Hub) --- */
@media (max-width: 640px){
    .sc-list-item .sc-thumb{
        display:none !important;
    }
    /* tighten gap where thumbnail was */
    .sc-list-item{
        grid-template-columns: 70px 1fr !important;
    }
}

/* --- Desktop only: larger square thumbnail with inner spacing --- */
@media (min-width: 1024px){
    /* Large square image */
    .sc-list-item .sc-thumb{
        width: 140px;
        height: 140px;
        margin: 10px 22px 10px 0; /* spacing from card border + content */
        border-radius: 10px;
        overflow: hidden;
        flex-shrink: 0;
    }

    /* Ensure the image fills the square without distortion */
    .sc-list-item .sc-thumb img{
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Placeholder SVG also fills the square */
    .sc-list-item .sc-thumb .sc-thumb-placeholder{
        width: 100%;
        height: 100%;
        display: block;
    }
}

/* Tighten spacing between sport buttons and filters */
.sc-header-controls {
    gap: 8px; /* reduced from 12px+ */
    margin-bottom: 16px;
}


.sc-filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 6px;
    background: #fff;
    border: none;
    border-radius: 12px;
}


.sc-eh-cal-filters {
    margin-top: 6px;
}

/* --- Related Events (Single Event): match Event Hub card styling --- */
/* Scoped ONLY to the "More Events in XX" section so nothing else changes. */
.sc-related-wrapper .sc-event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sc-related-wrapper .sc-list-item {
    display: grid;
    grid-template-columns: 70px 64px 1fr auto; /* date | square thumb | info | arrow */
    gap: 18px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none !important;
    color: inherit;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.sc-related-wrapper .sc-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sc-related-wrapper .sc-list-item::after {
    display: none !important;
}

.sc-related-wrapper .sc-date-box {
    background: #f8f9fa;
    padding: 10px 5px;
    border-radius: 6px;
    text-align: center;
    min-width: 60px;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
}

/* Month label colour: match Event Hub red (scoped to Related Events only) */
.sc-related-wrapper .sc-date-box .sc-month {
    color: #CB1E41 !important;
}

.sc-related-wrapper .sc-thumb {
    width: 64px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-related-wrapper .sc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-related-wrapper .sc-thumb-placeholder {
    width: 22px;
    height: 22px;
    opacity: 0.55;
}

.sc-related-wrapper .sc-info {
    min-width: 0;
}

.sc-related-wrapper .sc-distance-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sc-related-wrapper .sc-list-title {
    margin: 0 0 4px 0 !important;
    font-size: 18px !important;
    font-weight: 700;
    color: #222;
}

.sc-related-wrapper .sc-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 767px) {
    .sc-related-wrapper .sc-list-item {
        grid-template-columns: 56px 56px 1fr auto;
        gap: 12px;
        padding: 12px;
    }
    .sc-related-wrapper .sc-date-box {
        padding: 8px 2px !important;
        min-width: 50px;
    }
    .sc-related-wrapper .sc-list-title {
        font-size: 16px !important;
    }
    .sc-related-wrapper .sc-thumb {
        width: 56px;
    }
}

@media (max-width: 640px) {
    /* Match Event Hub mobile cards: hide thumbnail, tighten columns */
    .sc-related-wrapper .sc-thumb {
        display: none !important;
    }
    .sc-related-wrapper .sc-list-item {
        grid-template-columns: 70px 1fr !important;
    }
}



/* Event breadcrumbs + state hub link */
.sc-event-breadcrumbs{font-size:14px;margin:0 0 12px 0;}
.sc-event-breadcrumbs a{text-decoration:none;}
.sc-event-breadcrumbs .sc-bc-sep{margin:0 6px;opacity:.7;}
.sc-event-breadcrumbs .sc-bc-current{opacity:.85;}
.sc-state-hub-link{margin:0 0 12px 0;font-size:14px;color:#6b7280;}
.sc-state-hub-link a{text-decoration:none;font-weight:400;color:inherit;font-size:inherit;position:relative;}




/* Ensure desktop thumbnail + grid sizing applies on ALL card lists (calendar + related events) */
@media (min-width: 1024px) {
  .sc-event-list .sc-list-item{
    display: grid;
    align-items: center;
    grid-template-columns: 70px clamp(120px, 14vw, 170px) 1fr auto;
  }
  .sc-event-list .sc-thumb{
    width: clamp(120px, 14vw, 170px);
    height: clamp(120px, 14vw, 170px);
    margin: 10px 22px 10px 0;
    border-radius: 10px;
    overflow: hidden;
  }
  .sc-event-list .sc-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

.sc-state-hub-link a::after{content:' →';}

/* =========================
   MOBILE COMPACT STICKY BAR
   ========================= */
@media (max-width: 768px){

  /* Hide the normal filter bar in its original spot (we'll show it inside a drawer) */
  .sc-page-filter-bar.sc-eh-cal-filters{
    display: none;
  }

  /* Right-side filter tab (fixed) */
  .sc-mobile-filters-bar{
    position: fixed;
    right: 0;
    top: 50%;
    bottom: auto;
    left: auto;
    transform: translateY(-50%);
    z-index: 9999;
    background: #f4f6f8;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
    border-radius: 14px 0 0 14px;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 32px;
    height: 55vh;
    min-height: 180px;
    max-height: 260px;
  }

  .sc-mobile-filters-bar__label{
    display: none;
  }

  .sc-mobile-filters-bar__sub{
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
  }

  /* Hide summary line under "Filter events" (requested) */
  #scMobileFilterSummary{
    display: none !important;
  }

  .sc-mobile-filters-bar__btn{
    background: transparent;
    color: #111827;
    border: none;
    border-radius: inherit;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 0;
  }

  .sc-mobile-filters-bar__btn:focus{
    outline: none;
  }

  .sc-mobile-filters-bar__btn:active{
    background: rgba(17,24,39,0.06);
  }

  .sc-mobile-filters-bar__btn::after{
    content: 'Filters';
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    opacity: 0.65;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    line-height: 1;
  }

  .sc-mobile-filters-bar__btn svg{
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
  }

  /* Drawer overlay */
  .sc-mobile-filters-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    /* Must sit above any floating widgets (e.g. chat toggle) */
    z-index: 10001;
    display: none;
  }

  /* Drawer panel (slide-in from right) */
  .sc-mobile-filters-drawer{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 88vw;
    max-width: 360px;
    background: #fff;
    z-index: 10002;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.18);
    transform: translateX(110%);
    transition: transform 220ms ease;
    padding: 14px 14px 18px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Elementor / theme global form spacing can add unwanted gaps inside the drawer */
  .sc-mobile-filters-drawer select:not(.elementor-field):not(.elementor-field-textual),
  .sc-mobile-filters-drawer textarea:not(.elementor-field){
    margin-bottom: 0px !important;
  }

  .sc-mobile-filters-drawer__header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
  }

  .sc-mobile-filters-drawer__title{
    font-weight: 800;
    font-size: 16px;
  }

  .sc-mobile-filters-drawer__close{
    background: #f2f2f2;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
  }

  /* When open (calendar uses body class; single-event uses .active) */
  body.sc-mobile-filters-open .sc-mobile-filters-overlay,
  .sc-mobile-filters-overlay.active{
    display: block;
  }

  /* Hide the tab while the drawer is open so it never blocks buttons */
  body.sc-mobile-filters-open .sc-mobile-filters-bar{
    display: none;
  }

  body.sc-mobile-filters-open .sc-mobile-filters-drawer,
  .sc-mobile-filters-drawer.active{
    transform: translateX(0);
  }

  /* Ensure the filters drawer sits above the floating chat toggle button */
  body.sc-mobile-filters-open #sc-chat-toggle{
    z-index: 0 !important;
    pointer-events: none !important;
  }

  /* Ensure the filters overlay/drawer sits above the chat toggle button */
  body.sc-mobile-filters-open #sc-chat-toggle{
    z-index: 0 !important;
    pointer-events: none !important;
  }

  /* Prevent horizontal overflow (fixes thin white strip on right) */
  html, body{
    overflow-x: hidden !important;
  }

  .sc-calendar-wrapper,
  #sc-calendar-main,
  .sc-event-container{
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Make sure content isn't hidden behind the fixed mini bar */
  .sc-calendar-wrapper{
    padding-bottom: 90px !important;
  }
}



/* --- Enforce 3-wide meta bar on all breakpoints (matches sc-info-grid) --- */
.sc-single-meta-bar{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch;
}

.sc-single-meta-bar .sc-meta-item{
  width: 100%;
  min-width: 0;
}

/* Keep 3-wide even on mobile */
@media (max-width: 768px){
  .sc-single-meta-bar{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}



/* --- sc-single-meta-bar: match info cards, mobile 2-up + full width third --- */
.sc-single-meta-bar.sc-meta-grid { margin-top: 20px; padding: 0; }
@media (max-width: 768px) {
  .sc-single-meta-bar.sc-meta-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .sc-single-meta-bar.sc-meta-grid .sc-info-card:nth-child(3) { grid-column: 1 / -1; }
}


/* --- SC Event Hub: UI tweaks (brand + borders) --- */

/* Remove top/bottom borders from meta bar */
.sc-single-meta-bar {
  border-top: none !important;
  border-bottom: none !important;
}

/* Brand color for SVG icons */
.sc-info-card svg,
.sc-meta-card svg {
  color: #CB1E41 !important;
  
}

/* Brand color for image icons (PNG/WebP/etc.) */
.sc-info-card img,
.sc-meta-card img {
  
}



/* --- SC Event Hub: Proper outline icon color (no fill) --- */

.sc-info-card svg,
.sc-meta-card svg {
  stroke: #CB1E41 !important;
  fill: none !important;
  color: #CB1E41 !important;
}

.sc-info-card svg path,
.sc-meta-card svg path {
  stroke: #CB1E41 !important;
  fill: none !important;
}

/* Remove any raster recolor tricks */
.sc-info-card img,
.sc-meta-card img {
  filter: none !important;
}



/* --- SC Event Hub: More appealing frontend tables --- */

/* Wrapper */
.sc-table-responsive {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

/* Table base */
table.sc-frontend-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

/* Header */
table.sc-frontend-table thead th {
  background: #F3F7FB;
  color: #1f2937;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Cells */
table.sc-frontend-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
  color: #111827;
}

/* Zebra + hover */
table.sc-frontend-table tbody tr:nth-child(even) td {
  background: rgba(0,0,0,0.015);
}
table.sc-frontend-table tbody tr:hover td {
  background: rgba(203, 30, 65, 0.06);
}

/* First column emphasis */
table.sc-frontend-table tbody td:first-child {
  font-weight: 700;
  color: #111827;
}

/* Last row border cleanup */
table.sc-frontend-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Mobile: keep table but tighten spacing (no ugly squish) */
@media (max-width: 640px) {
  table.sc-frontend-table {
    font-size: 14px;
  }
  table.sc-frontend-table thead th,
  table.sc-frontend-table tbody td {
    padding: 12px 12px;
  }
}



/* --- PATCH: Remove unwanted margins --- */
.sc-filter-bar {
    margin-bottom: 0 !important;
}

.sc-page-filter-bar {
    margin: 0 !important;
    padding: 2px !important;
}



/* --- PATCH: Calendar filter styling + form spacing --- */
.sc-eh-cal-filters,
.sc-page-filter-bar.sc-eh-cal-filters {
    background: #fff !important;
}

select:not(.elementor-field):not(.elementor-field-textual),
textarea:not(.elementor-field) {
    margin-bottom: 0 !important;
}



/* --- PATCH: Ensure mobile filter button is clickable --- */
.sc-mobile-filters-bar { pointer-events: auto !important; }
.sc-mobile-filters-bar * { pointer-events: auto !important; }
.sc-mobile-filters-bar__btn { position: relative; z-index: 10000; }



/* --- PATCH: Ensure mobile drawer opens when .active is set (some themes override base styles) --- */
.sc-mobile-filters-overlay.active{
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.sc-mobile-filters-drawer.active{
  transform: translateX(0) !important;
}



/* --- PATCH: Calendar wrapper spacing --- */
.sc-calendar-wrapper {
    margin-top: 0 !important;
    padding: 0 0 !important;
}


/* --- Sidebar sticky rules --- */
/* Keep the sidebar itself and other cards non-sticky, but allow the Filter card to stick (desktop only). */
.sc-sidebar-area{
  position: relative !important;
  overflow: visible !important;
  top: auto !important;
}

/* Ensure all sidebar cards are NOT sticky by default */
.sc-sidebar-area .sc-cta-card,
.sc-sidebar-area .sc-context-cta{
  position: static !important;
  top: auto !important;
}

/* Desktop: keep filter card normal in CSS (JS handles the sticky lock to avoid flicker with theme layouts) */
@media (min-width: 769px){
  .sc-sidebar-area .sc-event-filters-card,
  .sc-sidebar-area .sc-cal-filters-card{
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }
}


/* Sport badge text + background */
.sc-sport-badge,
.sc-sport-badge span,
.sc-sport-badge * {
  background-color: #E74C3B !important;
  color: #ffffff !important;
}

/* State badge text + background */
.sc-state-badge,
.sc-state-badge span,
.sc-state-badge * {
  background-color: #27ae60 !important;
  color: #ffffff !important;
}


/* Keep badge text white on hover states (theme may override on card hover) */
.sc-sport-badge:hover,
.sc-sport-badge:hover span,
.sc-sport-badge:hover *,
.sc-state-badge:hover,
.sc-state-badge:hover span,
.sc-state-badge:hover *,
.sc-event-card:hover .sc-sport-badge,
.sc-event-card:hover .sc-sport-badge span,
.sc-event-card:hover .sc-sport-badge *,
.sc-event-card:hover .sc-state-badge,
.sc-event-card:hover .sc-state-badge span,
.sc-event-card:hover .sc-state-badge *,
.sc-event-card a:hover .sc-sport-badge,
.sc-event-card a:hover .sc-sport-badge span,
.sc-event-card a:hover .sc-sport-badge *,
.sc-event-card a:hover .sc-state-badge,
.sc-event-card a:hover .sc-state-badge span,
.sc-event-card a:hover .sc-state-badge *{
  color: #ffffff !important;
}


/* FORCE: keep badge text white even on card hover/link hover (The7/Elementor can override with higher specificity) */
html body .sc-sport-badge,
html body .sc-sport-badge *,
html body .sc-sport-badge a,
html body .sc-sport-badge a:hover,
html body .sc-sport-badge:hover,
html body .sc-sport-badge:hover *,
html body .sc-sport-badge:hover a,
html body .sc-sport-badge:hover a:hover,
html body .sc-state-badge,
html body .sc-state-badge *,
html body .sc-state-badge a,
html body .sc-state-badge a:hover,
html body .sc-state-badge:hover,
html body .sc-state-badge:hover *,
html body .sc-state-badge:hover a,
html body .sc-state-badge:hover a:hover,
html body .sc-event-card:hover .sc-sport-badge,
html body .sc-event-card:hover .sc-sport-badge *,
html body .sc-event-card:hover a .sc-sport-badge,
html body .sc-event-card:hover a .sc-sport-badge *,
html body .sc-event-card:hover .sc-state-badge,
html body .sc-event-card:hover .sc-state-badge *,
html body .sc-event-card:hover a .sc-state-badge,
html body .sc-event-card:hover a .sc-state-badge *,
html body [class*="sc-event-card"]:hover .sc-sport-badge,
html body [class*="sc-event-card"]:hover .sc-sport-badge *,
html body [class*="sc-event-card"]:hover .sc-state-badge,
html body [class*="sc-event-card"]:hover .sc-state-badge *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* Status badge font size */
.sc-status-badge{
  font-size: 0.8rem !important;
}


/* Mobile: keep date box same as desktop (square, stacked day/month) */
@media (max-width:768px){
  .sc-list-item{
    flex-direction: row !important;
    align-items: center !important;
  }
  .sc-date-box{
    display:flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 60px !important;
    height: 60px !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 15px 0 0 !important;
    background: #f8f9fa !important;
    border: 1px solid #eee !important;
  }
  .sc-date-box .sc-day{ margin-right: 0 !important; }
}


/* Ensure chat toggle shows on every page */
#sc-chat-toggle{
  display:block !important;
}

/* Desktop positioning */
@media (min-width:769px){
  #sc-chat-toggle{
    bottom:10px !important;
    right:70px !important;
  }
}
