/* ============================================
   LTF WEBSCORER FRONTEND STYLES v1.6
   Comprehensive styling with full customization
   ============================================ */

/* CSS VARIABLES - Customize these to match your theme */
:root {
    /* Brand Colors */
    --ltf-primary-color: #e31e24;
    --ltf-secondary-color: #000000;
    --ltf-text-color: #333333;
    --ltf-text-light: #666666;
    --ltf-background: #ffffff;
    --ltf-background-alt: #f9f9f9;

    /* Table Colors */
    --ltf-table-header-bg: #000000;
    --ltf-table-header-text: #ffffff;
    --ltf-table-border: #e0e0e0;
    --ltf-table-hover: #f5f5f5;

    /* Row Colors */
    --ltf-row-bg: #ffffff;
    --ltf-row-bg-alt: #f9f9f9;
    --ltf-row-text-color: #333333;

    /* Link Colors */
    --ltf-link-color: #e31e24;
    --ltf-link-hover-color: #000000;

    /* Border Color */
    --ltf-border-color: #e0e0e0;

    /* Filter Button Colors */
    --ltf-filter-bg: #ffffff;
    --ltf-filter-text: #333333;
    --ltf-filter-border: #e0e0e0;
    --ltf-filter-active-bg: #e31e24;
    --ltf-filter-active-text: #ffffff;
    --ltf-filter-active-border: #e31e24;
    --ltf-filter-container-bg: #f9f9f9;
    --ltf-filter-container-border: #e0e0e0;

    /* Podium Colors */
    --ltf-gold-start: #ffd700;
    --ltf-gold-end: #ffed4e;
    --ltf-silver-start: #c0c0c0;
    --ltf-silver-end: #e8e8e8;
    --ltf-bronze-start: #cd7f32;
    --ltf-bronze-end: #e9967a;

    /* Typography */
    --ltf-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --ltf-title-size: 32px;
    --ltf-subtitle-size: 22px;
    --ltf-text-size: 16px;

    /* Spacing */
    --ltf-spacing-xs: 8px;
    --ltf-spacing-sm: 12px;
    --ltf-spacing-md: 20px;
    --ltf-spacing-lg: 30px;
    --ltf-spacing-xl: 40px;

    /* Borders & Shadows */
    --ltf-border-radius: 8px;
    --ltf-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ltf-box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --ltf-table-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   CONTAINER STYLES
   ============================================ */

.ltf-ws-standings,
.ltf-ws-race-results,
.ltf-ws-athlete-card {
    margin: var(--ltf-spacing-lg) 0;
    padding: var(--ltf-spacing-md);
    font-family: var(--ltf-font-family);
    background: var(--ltf-background);
    border-radius: var(--ltf-border-radius);
    box-shadow: var(--ltf-box-shadow);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.ltf-ws-title {
    font-size: var(--ltf-title-size);
    font-weight: 700;
    margin: 0 0 var(--ltf-spacing-md) 0;
    color: var(--ltf-primary-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ltf-ws-group-title {
    font-size: var(--ltf-subtitle-size);
    font-weight: 600;
    margin: var(--ltf-spacing-xl) 0 var(--ltf-spacing-md) 0;
    color: var(--ltf-secondary-color);
    padding-bottom: var(--ltf-spacing-xs);
    border-bottom: 3px solid var(--ltf-primary-color);
}

/* Section title - like group title but without the underline */
.ltf-ws-section-title {
    font-size: var(--ltf-subtitle-size);
    font-weight: 600;
    margin: var(--ltf-spacing-xl) 0 var(--ltf-spacing-md) 0;
    color: var(--ltf-primary-color);
}

.ltf-ws-date {
    text-align: center;
    color: var(--ltf-text-light);
    font-size: 14px;
    margin-bottom: var(--ltf-spacing-md);
}

/* ============================================
   TABLE STYLES
   ============================================ */

.ltf-ws-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--ltf-spacing-lg) 0;
    background: var(--ltf-background);
    box-shadow: var(--ltf-table-shadow, var(--ltf-box-shadow));
    border-radius: var(--ltf-border-radius);
    border: 1px solid var(--ltf-border-color);
    overflow: hidden;
}

/* Table Header */
.ltf-ws-table thead {
    background: var(--ltf-table-header-bg);
    color: var(--ltf-table-header-text);
}

.ltf-ws-table th {
    padding: var(--ltf-spacing-md) var(--ltf-spacing-sm);
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    border-bottom: 1px solid var(--ltf-border-color) !important;
    border-left: 1px solid var(--ltf-border-color) !important;
    color: var(--ltf-table-header-text);
}

.ltf-ws-table th:first-child {
    border-left: none !important;
    padding-left: var(--ltf-spacing-md);
}

.ltf-ws-table th:last-child {
    padding-right: var(--ltf-spacing-md);
}

/* Table Body */
.ltf-ws-table td {
    padding: var(--ltf-spacing-sm) var(--ltf-spacing-sm);
    border: none !important;
    border-bottom: 1px solid var(--ltf-border-color) !important;
    border-left: 1px solid var(--ltf-border-color) !important;
    font-size: var(--ltf-text-size);
    color: var(--ltf-row-text-color);
}

.ltf-ws-table td:first-child {
    padding-left: var(--ltf-spacing-md);
    font-weight: 600;
    border-left: none !important;
}

.ltf-ws-table td:last-child {
    padding-right: var(--ltf-spacing-md);
}

.ltf-ws-table tbody tr {
    transition: background-color 0.2s ease;
    background-color: var(--ltf-row-bg);
}

/* Zebra striping - alternating row colors */
.ltf-ws-table tbody tr:nth-child(even) {
    background-color: var(--ltf-row-bg-alt);
}

.ltf-ws-table tbody tr:hover {
    background: var(--ltf-table-hover);
}

.ltf-ws-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   PODIUM HIGHLIGHTING
   ============================================ */

.ltf-ws-gold {
    background: linear-gradient(135deg, var(--ltf-gold-start) 0%, var(--ltf-gold-end) 100%) !important;
    font-weight: 700 !important;
}

.ltf-ws-gold td:first-child::before {
    content: "🥇 ";
}

.ltf-ws-silver {
    background: linear-gradient(135deg, var(--ltf-silver-start) 0%, var(--ltf-silver-end) 100%) !important;
    font-weight: 600 !important;
}

.ltf-ws-silver td:first-child::before {
    content: "🥈 ";
}

.ltf-ws-bronze {
    background: linear-gradient(135deg, var(--ltf-bronze-start) 0%, var(--ltf-bronze-end) 100%) !important;
    font-weight: 600 !important;
}

.ltf-ws-bronze td:first-child::before {
    content: "🥉 ";
}

/* ============================================
   ATHLETE CARD
   ============================================ */

.ltf-ws-athlete-card {
    padding: var(--ltf-spacing-lg);
    background: var(--ltf-background);
    border: 2px solid var(--ltf-border-color);
    border-radius: var(--ltf-border-radius);
    box-shadow: var(--ltf-box-shadow-lg);
}

.athlete-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 var(--ltf-spacing-md) 0;
    color: var(--ltf-primary-color);
    text-align: center;
}

.athlete-category {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ltf-primary-color);
    margin: 0 0 var(--ltf-spacing-md) 0;
}

.athlete-place,
.athlete-points {
    font-size: 18px;
    margin: var(--ltf-spacing-xs) 0;
    text-align: center;
    color: var(--ltf-text-color);
}

.athlete-place strong,
.athlete-points strong {
    color: var(--ltf-secondary-color);
    font-weight: 700;
}

.athlete-races {
    list-style: none;
    padding: 0;
    margin-top: var(--ltf-spacing-lg);
}

.athlete-races li {
    padding: var(--ltf-spacing-sm) 0;
    border-bottom: 1px solid var(--ltf-border-color);
    font-size: var(--ltf-text-size);
}

.athlete-races li:last-child {
    border-bottom: none;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.ltf-ws-error {
    padding: var(--ltf-spacing-md);
    background: #fee;
    border: 2px solid #fcc;
    border-radius: var(--ltf-border-radius);
    color: #c00;
    font-weight: 600;
    text-align: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
    .ltf-ws-table {
        font-size: 14px;
    }

    .ltf-ws-table th,
    .ltf-ws-table td {
        padding: var(--ltf-spacing-xs);
    }

    .ltf-ws-title {
        font-size: 24px;
    }

    .ltf-ws-group-title {
        font-size: 18px;
    }

    /* Hide columns marked for mobile hiding */
    .ltf-ws-hide-mobile {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .ltf-ws-standings,
    .ltf-ws-race-results {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .ltf-ws-table {
        box-shadow: none;
    }
    
    .ltf-ws-table tbody tr:hover {
        background: transparent;
    }
}

/* ============================================
   CLICKABLE LINKS
   ============================================ */

.ltf-ws-athlete-link,
.ltf-ws-race-link {
    color: var(--ltf-link-color);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.ltf-ws-athlete-link:hover,
.ltf-ws-race-link:hover {
    color: var(--ltf-link-hover-color);
    text-decoration: underline;
}

/* Keep links visible on podium rows */
.ltf-ws-gold .ltf-ws-athlete-link,
.ltf-ws-gold .ltf-ws-race-link,
.ltf-ws-silver .ltf-ws-athlete-link,
.ltf-ws-silver .ltf-ws-race-link,
.ltf-ws-bronze .ltf-ws-athlete-link,
.ltf-ws-bronze .ltf-ws-race-link {
    color: var(--ltf-secondary-color);
}

.ltf-ws-gold .ltf-ws-athlete-link:hover,
.ltf-ws-gold .ltf-ws-race-link:hover,
.ltf-ws-silver .ltf-ws-athlete-link:hover,
.ltf-ws-silver .ltf-ws-race-link:hover,
.ltf-ws-bronze .ltf-ws-athlete-link:hover,
.ltf-ws-bronze .ltf-ws-race-link:hover {
    color: var(--ltf-link-color);
}

/* ============================================
   BACK LINK
   ============================================ */

.ltf-ws-back-link {
    margin-bottom: var(--ltf-spacing-md);
}

.ltf-ws-back-link a {
    display: inline-flex;
    align-items: center;
    gap: var(--ltf-spacing-xs);
    color: var(--ltf-text-light);
    text-decoration: none;
    font-size: 14px;
    padding: var(--ltf-spacing-xs) var(--ltf-spacing-sm);
    border: 1px solid var(--ltf-border-color);
    border-radius: var(--ltf-border-radius);
    transition: all 0.2s ease;
}

.ltf-ws-back-link a:hover {
    color: var(--ltf-primary-color);
    border-color: var(--ltf-primary-color);
    background: var(--ltf-background-alt);
}

/* ============================================
   FILTER UI
   ============================================ */

/* Filter container */
.ltf-ws-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ltf-spacing-sm);
    margin-bottom: var(--ltf-spacing-xl);
    padding: var(--ltf-spacing-lg);
    background: var(--ltf-filter-container-bg);
    border-radius: var(--ltf-border-radius);
    border: 1px solid var(--ltf-filter-container-border);
}

/* Filter row */
.ltf-ws-filter-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Filter buttons container */
.ltf-ws-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--ltf-spacing-sm);
}

/* Filter button base styles */
.ltf-ws-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--ltf-spacing-md) var(--ltf-spacing-lg);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ltf-font-family);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ltf-filter-text);
    background: var(--ltf-filter-bg);
    border: 2px solid var(--ltf-filter-border);
    border-radius: var(--ltf-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.ltf-ws-filter-btn:hover {
    border-color: var(--ltf-filter-active-border);
    color: var(--ltf-filter-active-border);
}

/* Active filter button */
.ltf-ws-filter-btn.active {
    background: var(--ltf-filter-active-bg);
    border-color: var(--ltf-filter-active-border);
    color: var(--ltf-filter-active-text);
}

.ltf-ws-filter-btn.active:hover {
    background: var(--ltf-filter-active-bg);
    border-color: var(--ltf-filter-active-border);
    color: var(--ltf-filter-active-text);
    opacity: 0.9;
}

/* Hidden result groups */
.ltf-ws-result-group.ltf-ws-hidden {
    display: none;
}

/* No results message */
.ltf-ws-no-results {
    text-align: center;
    padding: var(--ltf-spacing-xl);
    color: var(--ltf-text-light);
    font-style: italic;
}

/* Filter responsive styles */
@media screen and (max-width: 768px) {
    .ltf-ws-filters {
        padding: var(--ltf-spacing-md);
    }

    .ltf-ws-filter-buttons {
        gap: var(--ltf-spacing-xs);
    }

    .ltf-ws-filter-btn {
        padding: var(--ltf-spacing-sm) var(--ltf-spacing-md);
        font-size: 13px;
        min-width: 70px;
    }
}

/* ============================================
   CUSTOM THEME OVERRIDES
   Add your custom styles below this line
   ============================================ */
