/* Global match row */

.fh-match-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 10px;
    padding: 12px 14px;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    background: #ffffff;
    color: #111111 !important;
    text-decoration: none !important;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.fh-match-row:hover {
    border-color: #111111;
    color: #111111 !important;
    text-decoration: none !important;
}

.fh-match-row * {
    text-decoration: none !important;
}

.fh-match-row-date {
    width: 90px;
    min-width: 90px;
    font-weight: 600;
    font-size: 14px;
    color: #444444;
}

.fh-match-row-separator {
    display: none;
}

.fh-match-row-team-name,
.fh-match-row-opponent-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    color: #111111;
}

.fh-match-row-team-name {
    text-align: right;
    flex: 1;
}

.fh-match-row-opponent-name {
    text-align: left;
    flex: 1;
}

.fh-match-row-logo {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f1f1;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fh-match-row-logo img {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.fh-match-row-score {
    width: 58px;
    min-width: 58px;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
    color: #111111;
}

.fh-match-row-extra {
    min-width: 80px;
    text-align: right;
    font-size: 16px;
    white-space: nowrap;
    color: #111111;
}

/* Friendly matches page */

.fh-friendly-matches-wrap {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-friendly-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.fh-friendly-search {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}

.fh-friendly-search:focus {
    border-color: #111111;
}

.fh-friendly-year-label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
}

.fh-friendly-year-filter {
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #ffffff;
    font-size: 15px;
}

/* Team page match history */

.fh-team-page {
    width: 100%;
}

.fh-team-tab-panel[data-tab-panel="matches"] {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-team-matches-list {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-team-match-controls {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: flex-end;
}

.fh-team-match-year-label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
}

.fh-team-match-year-filter {
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #ffffff;
    font-size: 15px;
}

/* Championship and Tournament pages */

.fh-championship-page,
.fh-tournament-page {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-championship-rounds-list,
.fh-tournament-matches-list {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-championship-match-item,
.fh-tournament-match-item {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 12px;
}

.fh-match-round-label {
    display: inline-block;
    margin-bottom: 6px;
    padding: 5px 11px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
    color: #444444;
}

.fh-competition-page-meta {
    margin-bottom: 18px;
}

.fh-competition-page-meta p {
    margin: 6px 0;
}

.fh-championship-standings-image {
    width: 100%;
    max-width: 1000px;
    margin: 12px auto 0;
}

.fh-championship-standings-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

/* Player page layout */

body.single-fh_player .entry-content,
body.single-fh_player .wp-block-post-content,
body.single-fh_player .wp-block-shortcode {
    width: calc(100vw - 40px) !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.fh-player-page {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-player-page h2,
.fh-player-page h3 {
    max-width: 1000px;
}

.fh-player-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.fh-player-tab-button {
    cursor: pointer;
}

.fh-player-tab-panel {
    width: 100%;
    max-width: 1000px;
}

.fh-player-matches-list {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-player-match-item {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-player-match-item .fh-match-row {
    width: 100%;
    max-width: 1000px;
}

/* Mobile */

@media (max-width: 700px) {
    .fh-match-row {
        gap: 5px;
        padding: 10px;
        overflow-x: auto;
    }

    .fh-match-row-date {
        width: 72px;
        min-width: 72px;
        font-size: 12px;
    }

    .fh-match-row-team-name,
    .fh-match-row-opponent-name {
        font-size: 12px;
    }

    .fh-match-row-logo {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    .fh-match-row-logo img {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    .fh-match-row-score {
        width: 46px;
        min-width: 46px;
        font-size: 14px;
    }

    .fh-match-row-extra {
        min-width: 60px;
        font-size: 13px;
    }

    .fh-friendly-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .fh-friendly-search {
        width: 100%;
        min-width: 0;
    }

    .fh-friendly-year-label {
        justify-content: space-between;
    }

    .fh-friendly-year-filter {
        min-width: 120px;
    }

    .fh-team-match-controls {
        justify-content: stretch;
    }

    .fh-team-match-year-label {
        width: 100%;
        justify-content: space-between;
    }

    .fh-team-match-year-filter {
        min-width: 120px;
    }

    body.single-fh_player .entry-content,
    body.single-fh_player .wp-block-post-content,
    body.single-fh_player .wp-block-shortcode {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }

    .fh-player-tabs {
        gap: 5px;
    }

    .fh-player-tab-button {
        font-size: 12px;
        padding: 5px 7px;
    }
}