/* TRCodex Fikstür Styles */

:root {
    --trcodex-primary: #e31e24;
    /* Red as per example */
    --trcodex-primary-dark: #b91318;
    --trcodex-secondary: #0f172a;
    /* Dark Blue/Black */
    --trcodex-text: #333;
    --trcodex-light-bg: #f8f9fa;
    --trcodex-border: #e2e8f0;
    --trcodex-white: #ffffff;
    --trcodex-success: #10b981;
    /* Green for Ave or something */
}

/* Base */
.trcodex-leagues-wrapper {
    font-family: 'Inter', sans-serif;
}

.trcodex-section-title {
    color: var(--trcodex-primary);
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Tabs Navigation */
.trcodex-league-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.trcodex-tab-btn {
    background: #f1f5f9;
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.trcodex-tab-btn:hover {
    background: #e2e8f0;
    color: var(--trcodex-secondary);
}

.trcodex-tab-btn.active {
    background: var(--trcodex-primary);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(227, 30, 36, 0.3);
}

/* Tabs Content */
.trcodex-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.trcodex-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* League Header inside tab */
.trcodex-league-header {
    background: var(--trcodex-secondary);
    color: #fff;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.trcodex-league-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    text-transform: uppercase;
}

.trcodex-group-badges {
    display: flex;
    gap: 10px;
}

.trcodex-group-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.trcodex-group-badge:hover,
.trcodex-group-badge.active {
    background: var(--trcodex-primary);
    font-weight: bold;
}

/* Group Content */
.trcodex-group-content {
    display: none;
}

.trcodex-group-content.active {
    display: block;
}

/* Standings Table */
.trcodex-standings-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.trcodex-standings-table thead {
    background: #10b981;
    /* Green header as per image? Or Red? Let's assume green from image or red from theme. */
    background: #0eae67;
    /* The image had a green header row */
    color: #fff;
}

.trcodex-standings-table th {
    padding: 12px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.trcodex-standings-table th.team {
    text-align: left;
    padding-left: 15px;
}

.trcodex-standings-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
    text-align: center;
}

.trcodex-standings-table td.team {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.team-mini-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.trcodex-standings-table tr:nth-child(even) {
    background: #f8fafc;
}

.trcodex-standings-table tr:hover {
    background: #f1f5f9;
}

/* Pos Colors */
.trcodex-standings-table tr:nth-child(1) td.pos {
    background: var(--trcodex-primary);
    color: #fff;
    font-weight: bold;
}

.trcodex-standings-table tr:nth-child(2) td.pos {
    background: var(--trcodex-primary);
    /* Maybe same? */
    color: #fff;
}

.trcodex-standings-table td.pts {
    font-weight: 800;
    color: #000;
}


/* Ticker Widget (Existing updates) */
.trcodex-ticker-container {
    padding: 2px 2px;
    background: #f1f1f1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* ... rest of existing CSS ... */
/* Re-including previous CSS for completeness if this overwrites */
.trcodex-ticker-container .swiper-slide {
    width: auto;
}

.trcodex-match-card-ticker {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 250px;
}

.trcodex-ticker-teams {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-bottom: 10px;
}

.trcodex-team-ticker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-align: center;
}

.trcodex-team-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 5px;
}

.trcodex-team-name {
    font-size: 12px;
    font-weight: bold;
    color: var(--trcodex-secondary);
    line-height: 1.2;
}

.trcodex-score-ticker {
    font-size: 18px;
    font-weight: 800;
    color: var(--trcodex-text);
}

.trcodex-match-meta {
    font-size: 11px;
    color: #666;
    text-align: center;
    border-top: 1px solid #eee;
    width: 100%;
    padding-top: 5px;
}

/* List Widget Defaults */
.trcodex-match-list-wrapper {
    background: #fff;
    border: 1px solid var(--trcodex-border);
    border-radius: 8px;
    overflow: hidden;
}

.trcodex-list-header {
    background: var(--trcodex-bg);
    padding: 15px;
    font-weight: bold;
    color: var(--trcodex-secondary);
    border-bottom: 1px solid var(--trcodex-border);
    display: flex;
    justify-content: space-between;
}

.trcodex-match-table {
    width: 100%;
    border-collapse: collapse;
}

.trcodex-match-table th,
.trcodex-match-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--trcodex-border);
}

.trcodex-match-table th {
    background: #f8f9fa;
    font-size: 13px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
}

.trcodex-list-team {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.trcodex-list-team.home {
    justify-content: flex-end;
    text-align: right;
}

.trcodex-list-team.away {
    justify-content: flex-start;
    text-align: left;
}

.trcodex-list-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.trcodex-list-score {
    font-weight: bold;
    background: var(--trcodex-secondary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Latest Results Section */
.trcodex-latest-results {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trcodex-results-title {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    display: inline-block;
    width: 100%;
}

.trcodex-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trcodex-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    transition: all 0.2s;
}

.trcodex-result-item:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.trcodex-result-item .team {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    color: var(--trcodex-secondary);
}

.trcodex-result-item .team.home {
    text-align: left;
}

.trcodex-result-item .team.away {
    text-align: right;
}

.trcodex-result-item .score-box {
    background: var(--trcodex-secondary);
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 14px;
    margin: 0 15px;
    min-width: 60px;
    text-align: center;
    white-space: nowrap;
}

/* Week Selector - Premium Redesign */
.trcodex-week-selector {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    margin-top: 30px;
    margin-bottom: 25px;
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.trcodex-week-selector::-webkit-scrollbar {
    height: 4px;
}

.trcodex-week-selector::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.trcodex-week-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #4a5568;
    cursor: pointer;
    border-radius: 30px;
    /* Capsule shape */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.trcodex-week-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e1;
    color: var(--trcodex-secondary);
    transform: translateY(-1px);
}

.trcodex-week-btn.active {
    background: var(--trcodex-primary);
    color: #ffffff !important;
    border-color: var(--trcodex-primary);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.25);
    transform: translateY(-1px);
}

.trcodex-week-content {
    display: none !important;
    animation: fadeIn 0.4s ease-out;
}

.trcodex-week-content.active {
    display: block !important;
}

/* Fixture Score Box Refined */
.trcodex-result-item.upcoming {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-left: 4px solid #94a3b8;
}

.score-box.fixture {
    background: var(--trcodex-secondary);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.match-date-hint {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    font-family: inherit;
    background: #f8fafc;
    padding: 0 8px;
    border-radius: 10px;
}

.trcodex-result-item {
    position: relative;
    padding-bottom: 22px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.trcodex-results-title {
    font-size: 15px;
    letter-spacing: 1.5px;
    color: var(--trcodex-secondary);
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid var(--trcodex-primary);
    margin-bottom: 15px !important;
}