/* ================================
   FootballHub single page cleanup
================================ */

/* Hide theme default title / featured image on custom single pages */

body.single-fh_team .wp-block-post-title,
body.single-fh_team .wp-block-post-featured-image,
body.single-fh_championship .wp-block-post-title,
body.single-fh_championship .wp-block-post-featured-image,
body.single-fh_tournament .wp-block-post-title,
body.single-fh_tournament .wp-block-post-featured-image {
    display: none !important;
}

/* Hide theme default More Posts / query blocks on custom single pages */

body.single-fh_team .wp-block-query,
body.single-fh_championship .wp-block-query,
body.single-fh_tournament .wp-block-query,
body.single-fh_match .wp-block-query,
body.single-fh_player .wp-block-query {
    display: none !important;
}

/* ================================
   Match single page design
================================ */

body.single-fh_match .wp-block-post-title {
    width: calc(100vw - 40px) !important;
    max-width: 1000px !important;
    margin: 0 auto 18px !important;
    padding: 16px 20px !important;
    border: 1px solid #e4e4e4 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04) !important;
    font-size: 26px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-sizing: border-box !important;
}

body.single-fh_match .entry-content,
body.single-fh_match .wp-block-post-content,
body.single-fh_match .wp-block-shortcode {
    width: calc(100vw - 40px) !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.fh-match-events {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-match-details-header {
    margin-bottom: 22px;
}

.fh-match-section {
    margin-bottom: 26px;
}

.fh-match-section h3 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

.fh-match-goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.fh-match-goal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.fh-match-goal-minute {
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.fh-match-goal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fh-match-goal-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

.fh-match-goal-icon {
    width: 20px;
    display: inline-block;
}

.fh-match-mvp-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    font-weight: 700;
}

.fh-match-events-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e4e4e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.fh-match-events-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.fh-match-events-table th,
.fh-match-events-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eeeeee;
    text-align: center;
    font-size: 15px;
}

.fh-match-events-table th:first-child,
.fh-match-events-table td:first-child {
    text-align: left;
}

.fh-match-events-table th {
    background: #f7f7f7;
    font-weight: 800;
}

.fh-match-events-table tr:last-child td {
    border-bottom: none;
}

.fh-empty-text {
    padding: 14px;
    border: 1px solid #e4e4e4;
    border-radius: 14px;
    background: #ffffff;
}

/* ================================
   Championship / Tournament page design
================================ */

body.single-fh_championship .entry-content,
body.single-fh_championship .wp-block-post-content,
body.single-fh_championship .wp-block-shortcode,
body.single-fh_tournament .entry-content,
body.single-fh_tournament .wp-block-post-content,
body.single-fh_tournament .wp-block-shortcode {
    width: calc(100vw - 40px) !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.fh-championship-page,
.fh-tournament-page {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.fh-championship-page > h2,
.fh-tournament-page > h2 {
    margin: 0 0 16px;
    padding: 18px 20px;
    border: 1px solid #e4e4e4;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    font-size: 28px;
    line-height: 1.25;
    box-sizing: border-box;
}

.fh-competition-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.fh-competition-page-meta p {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.25;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.fh-championship-page > h3,
.fh-tournament-page > h3 {
    margin: 24px 0 14px;
    font-size: 22px;
    line-height: 1.3;
}

.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 14px;
}

.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;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.fh-championship-standings-image {
    width: 100%;
    max-width: 1000px;
    margin: 12px auto 0;
    border: 1px solid #e4e4e4;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.fh-championship-standings-image img {
    width: 100%;
    height: auto;
    max-height: 760px;
    object-fit: contain;
    display: block;
}


/* ================================
   Mobile
================================ */

@media (max-width: 700px) {
    body.single-fh_match .wp-block-post-title {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        padding: 12px 14px !important;
        font-size: 18px !important;
    }

    body.single-fh_match .entry-content,
    body.single-fh_match .wp-block-post-content,
    body.single-fh_match .wp-block-shortcode,
    body.single-fh_championship .entry-content,
    body.single-fh_championship .wp-block-post-content,
    body.single-fh_championship .wp-block-shortcode,
    body.single-fh_tournament .entry-content,
    body.single-fh_tournament .wp-block-post-content,
    body.single-fh_tournament .wp-block-shortcode {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
    }

    .fh-match-goals-grid {
        grid-template-columns: 1fr;
    }

    .fh-match-section h3 {
        font-size: 19px;
    }

    .fh-championship-page > h2,
    .fh-tournament-page > h2 {
        padding: 14px;
        font-size: 20px;
    }

    .fh-competition-page-meta {
        gap: 8px;
    }

    .fh-competition-page-meta p {
        width: 100%;
        border-radius: 14px;
    }

    .fh-championship-page > h3,
    .fh-tournament-page > h3 {
        font-size: 19px;
    }

    .fh-championship-standings-image img {
        max-height: none;
    }
}

/* Hide remaining More Posts heading / separators on custom single pages */

body.single-fh_team .wp-block-heading,
body.single-fh_championship .wp-block-heading,
body.single-fh_tournament .wp-block-heading,
body.single-fh_match .wp-block-heading,
body.single-fh_player .wp-block-heading,
body.single-fh_team .wp-block-separator,
body.single-fh_championship .wp-block-separator,
body.single-fh_tournament .wp-block-separator,
body.single-fh_match .wp-block-separator,
body.single-fh_player .wp-block-separator,
body.single-fh_team .wp-block-post-template,
body.single-fh_championship .wp-block-post-template,
body.single-fh_tournament .wp-block-post-template,
body.single-fh_match .wp-block-post-template,
body.single-fh_player .wp-block-post-template,
body.single-fh_team .wp-block-query-pagination,
body.single-fh_championship .wp-block-query-pagination,
body.single-fh_tournament .wp-block-query-pagination,
body.single-fh_match .wp-block-query-pagination,
body.single-fh_player .wp-block-query-pagination {
    display: none !important;
}