/* StatsBet Results Frontend Styles */

/* Statistics Bar with Integrated Toggles */
.statsbet-results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.statsbet-results-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.statsbet-results-stats .stat-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.statsbet-results-stats .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #212529;
}

.statsbet-results-stats .stat-wins .stat-value {
    color: #28a745;
}

.statsbet-results-stats .stat-losses .stat-value {
    color: #dc3545;
}

.statsbet-results-stats .stat-draws .stat-value {
    color: #ffc107;
}

.statsbet-results-stats .stat-rate .stat-value {
    color: #0d6efd;
}

.statsbet-results-stats .stat-positive .stat-value {
    color: #28a745;
}

.statsbet-results-stats .stat-negative .stat-value {
    color: #dc3545;
}

/* Time Filter Toggles inside Stats Bar */
.statsbet-results-filters {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
}

.filter-toggle {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid #dee2e6;
    background: #ffffff;
    color: #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

.filter-toggle.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

/* Results Container */
.statsbet-results-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.statsbet-result-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.statsbet-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Win/Loss/Draw Styling */
.statsbet-result-card.result-w {
    border-color: #28a745;
    background: linear-gradient(to right, rgba(40, 167, 69, 0.05) 0%, #ffffff 20%);
}

.statsbet-result-card.result-l {
    border-color: #dc3545;
    background: linear-gradient(to right, rgba(220, 53, 69, 0.05) 0%, #ffffff 20%);
}

.statsbet-result-card.result-d {
    border-color: #ffc107;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.05) 0%, #ffffff 20%);
}

/* Header Section */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

.league-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.country {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.league-name {
    font-weight: 700;
    font-size: 15px;
    color: #212529;
}

.match-datetime {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0 20px;
}

.kickoff-date {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.kickoff-time {
    font-size: 14px;
    color: #212529;
    font-weight: 700;
    background: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.result-badge-wrapper {
    display: flex;
    align-items: center;
}

.result-badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 8px;
    color: #fff;
    text-transform: uppercase;
}

.result-badge.badge-win {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.result-badge.badge-loss {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.result-badge.badge-draw {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    color: #000;
}

/* Match Section */
.result-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    background: #ffffff;
    gap: 16px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.team-name {
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    color: #212529;
    line-height: 1.3;
    word-wrap: break-word;
    width: 100%;
}

.match-vs {
    padding: 0 16px;
    font-weight: 800;
    font-size: 14px;
    color: #adb5bd;
    letter-spacing: 1px;
}

/* Result Info Section */
.result-info {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.result-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.result-main > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.result-main .label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.result-main .value {
    font-weight: 800;
    font-size: 22px;
    color: #212529;
}

.result-prediction .value {
    color: #0d6efd;
    font-size: 22px;
}

.result-bet-value .value {
    color: #198754;
    font-size: 22px;
}

.result-odds .value {
    color: #fd7e14;
    font-size: 22px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-results p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .statsbet-results-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .statsbet-results-stats .stat-item {
        min-width: unset;
    }

    .statsbet-results-stats .stat-label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .statsbet-results-stats .stat-value {
        font-size: 16px;
    }

    .statsbet-results-filters {
        justify-content: center;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .filter-toggle {
        padding: 6px 12px;
        font-size: 10px;
    }

    .filter-toggle:hover {
        transform: none;
    }

    .statsbet-results-container {
        gap: 12px;
        padding: 0;
    }

    .statsbet-result-card {
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .statsbet-result-card:hover {
        transform: none;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .result-header {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 10px;
    }

    .league-info {
        flex: 1 1 100%;
        gap: 2px;
    }

    .country {
        font-size: 10px;
    }

    .league-name {
        font-size: 13px;
    }

    .match-datetime {
        margin: 0;
    }

    .kickoff-date {
        font-size: 11px;
    }

    .kickoff-time {
        font-size: 12px;
        padding: 3px 8px;
    }

    .result-badge {
        padding: 6px 12px;
        font-size: 11px;
    }

    .result-match {
        flex-direction: row;
        padding: 16px 12px;
        gap: 8px;
    }

    .team {
        gap: 8px;
    }

    .team-logo {
        width: 35px;
        height: 35px;
    }

    .team-name {
        font-size: 11px;
    }

    .match-vs {
        padding: 0 8px;
        font-size: 11px;
    }

    .result-info {
        padding: 8px;
    }

    .result-main {
        gap: 6px;
    }

    .result-main > div {
        padding: 8px 4px;
        border-radius: 6px;
        border-width: 1.5px;
    }

    .result-main .label {
        font-size: 9px;
    }

    .statsbet-results-container .result-main .value {
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    .statsbet-results-container .result-prediction .value {
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    .statsbet-results-container .result-bet-value .value {
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    .statsbet-results-container .result-odds .value {
        font-size: 11px !important;
        font-weight: 700 !important;
    }
}

@media (max-width: 480px) {
    .statsbet-results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .statsbet-results-stats .stat-label {
        font-size: 8px;
    }

    .statsbet-results-stats .stat-value {
        font-size: 14px;
    }

    /* Make Profit/Loss stand out on mobile */
    .statsbet-results-stats .stat-profit {
        grid-column: 1 / -1;
        margin-top: 6px;
        padding: 12px;
        border-radius: 8px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 2px solid #dee2e6;
    }

    .statsbet-results-stats .stat-profit.stat-positive {
        background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
        border-color: #28a745;
    }

    .statsbet-results-stats .stat-profit.stat-negative {
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        border-color: #dc3545;
    }

    .statsbet-results-stats .stat-profit .stat-label {
        font-size: 9px;
    }

    .statsbet-results-stats .stat-profit .stat-value {
        font-size: 18px;
        font-weight: 900;
    }

    .statsbet-results-container {
        gap: 10px;
    }

    .result-header {
        padding: 10px 12px;
    }

    .league-name {
        font-size: 12px;
    }

    .result-match {
        padding: 12px 10px;
    }

    .team-logo {
        width: 30px;
        height: 30px;
    }

    .team-name {
        font-size: 10px;
    }

    .match-vs {
        font-size: 10px;
        padding: 0 6px;
    }

    .result-info {
        padding: 6px;
    }

    .result-main {
        gap: 4px;
    }

    .result-main > div {
        padding: 6px 3px;
    }

    .result-main .label {
        font-size: 8px;
    }

    .statsbet-results-container .result-main .value {
        font-size: 10px !important;
    }

    .statsbet-results-container .result-prediction .value {
        font-size: 10px !important;
    }

    .statsbet-results-container .result-bet-value .value {
        font-size: 10px !important;
    }

    .statsbet-results-container .result-odds .value {
        font-size: 10px !important;
    }
}

/* WordPress Mobile Body Class Support */
body.mobile .statsbet-results-container .result-main .value {
    font-size: 11px !important;
    font-weight: 700 !important;
}

body.mobile .statsbet-results-container .result-prediction .value {
    font-size: 11px !important;
    font-weight: 700 !important;
}

body.mobile .statsbet-results-container .result-bet-value .value {
    font-size: 11px !important;
    font-weight: 700 !important;
}

body.mobile .statsbet-results-container .result-odds .value {
    font-size: 11px !important;
    font-weight: 700 !important;
}