/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

 /**
  * Main Wrapper used on the plugin template files, use this to remove styles from theme
  */
.echd-lms-wrapper ol, .echd-lms-wrapper li{
    margin: 0;
}

.echd-lms-wrapper table, .echd-lms-wrapper th, .echd-lms-wrapper td{
    border-left: 0;
    border-right: 0;
}

 /**
 * Tables For Leagues and Matches.
 */

 h3.lms_title {
    color: #21759b;
    font-size: 30px;
    margin: 20px 0;
 }

table.lms_league_table, table.lms_match_table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 36px;
}

table.lms_league_table th, table.lms_league_table td, table.lms_match_table td:nth-child(1){
    white-space: nowrap;
}

table.lms_league_table th, table.lms_league_table td, table.lms_match_table th, table.lms_match_table td {
    border-bottom: 1px solid #BFBFBF;
    text-align: right;
    font-size: 0.9em;
}

table.lms_league_table td:nth-of-type(2) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

table.lms_match_table td:nth-child(3), table.lms_match_table td:nth-child(5) {
    white-space: wrap;
}

table.lms_league_table th, table.lms_match_table th {
    border-top: 1px solid #21759b;
    border-bottom: 1px solid #BFBFBF;
    background-color: #F2F2F2;
    padding: 16px 6px 4px 6px;
}

table.lms_league_table td, table.lms_match_table td {
    padding: 8px 6px;
}

table.lms_league_table td:nth-child(2), table.lms_league_table th:nth-child(2),
table.lms_match_table td:first-child, table.lms_match_table th:first-child,
table.lms_match_table td:nth-child(5), table.lms_match_table th:nth-child(5),
table.lms_match_table td:last-child, table.lms_match_table th:last-child {
    text-align: left;
}

table.lms_match_table td:nth-child(2),table.lms_match_table td:nth-child(4) {
    text-wrap: balance;
}

table.lms_match_table th:nth-child(3) {
    text-align: center;
}

table.lms_match_table td:nth-child(3) {
    text-align: center;
    color: #787878;
    padding: 0 12px;
    white-space: nowrap;
}

table.lms_league_table td:nth-child(2)::before {
    content: '- ';
    color: #BFBFBF;
    font-weight: bold;
}

.lms_mobile{
    display: none;
}

@media (max-width: 740px) {
    table.lms_league_table th:first-child, table.lms_league_table td:first-child, table.lms_league_table td:nth-child(2)::before,
	table.lms_league_table th:nth-child(7), table.lms_league_table th:nth-child(8), 
    table.lms_league_table td:nth-child(7), table.lms_league_table td:nth-child(8),
    .lms_desktop{
		display: none;
	}
    table th .lms_mobile, table td .lms_mobile{
		display: inline-block;
	}
    table.lms_league_table th, table.lms_league_table td, table.lms_match_table th, table.lms_match_table td {
        font-size: 0.9em;
    }
    table.lms_match_table td {
        padding: 8px 3px;
    }
}

@media (max-width: 540px) {

    table.lms_league_table td:nth-of-type(2) {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    table.lms_match_table th, table.lms_match_table td {
        font-size: 0.8em;
    }
}


/**
* Club Fixtures / Results Page.
*/

ol.lms_dates_list {
    padding: 0;
}

ol.lms_dates_list > li {
    border-top: 1px solid #BFBFBF;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 24px;
    padding-top: 6px;
}

ol.lms_dates_list li {
    list-style-type: none;
}

ol.lms_divisions_list {
    padding: 0;
}

ol.lms_divisions_list > li{
    display: grid;
    grid-template-columns: 1fr 4fr;
    column-gap: 12px;
}

ol.lms_divisions_list > li > h4, .division_name{
    color: #21759b;
    font-size: 20px;
    font-weight: 600;
    border-top: 1px solid #D9D9D9;
    margin: 0 0 16px 0;
    padding: 4px 0 16px 0;
}

ol.lms_fixtures_list {
    padding: 0;
    margin-bottom: 36px;
}

ol.lms_fixtures_list > li.lms_fixture, ol.lms_fixtures_list > li.lms_result a {
    border-top: 1px solid #D9D9D9;
    background-color: #F2F2F2;
    padding: 12px 0 8px 0;
    font-size: 0.8em;
    width: 100%;
    column-gap: 12px;
}

@media (min-width: 640px) {
    ol.lms_fixtures_list > li.lms_fixture, ol.lms_fixtures_list > li.lms_result a {
        display: grid;
        grid-template-columns: 1fr 9fr;
    }
}


ol.lms_fixtures_list > li.lms_result a {
    text-decoration: none;
}

ol.lms_fixtures_list > li.lms_result a:hover {
    background-color: #E4E4E4;
}

ol.lms_fixtures_list > li:first-child {
    border-top: 1px solid #21759b;
}

ol.lms_fixtures_list li .lms_fixture_container {
    display: inline-grid;
    grid-template-columns: 7fr 2fr 7fr;
    width: 100%;
}

ol.lms_fixtures_list li .lms_fixture_home_team {
    text-align: right;
    padding-left: 12px;
    text-wrap: balance;
}

ol.lms_fixtures_list li .lms_fixture_away_team {
    padding-right: 12px;
    text-wrap: balance;
}

ol.lms_fixtures_list li .lms_fixture_vs {
    text-align: center;
    color: #787878;
    white-space: nowrap;
    padding: 0 12px;
}

ol.lms_fixtures_list li .lms_fixture_date {
    padding-left: 12px;
    color: #787878;
    white-space: nowrap;
}

@media (max-width: 640px) {
    ol.lms_fixtures_list > li.lms_result a {
        display: inline-block;
    }
    ol.lms_fixtures_list > li.lms_fixture, ol.lms_fixtures_list > li.lms_result a {
        padding-top: 8px;
    }
    ol.lms_fixtures_list li .lms_fixture_date {
        font-size: 0.9em;
    }
    ol.lms_divisions_list > li{
        display: flex;
        flex-direction: column;
	}
    ol.lms_divisions_list > li h4{
        display: flex;
        flex-direction: column;
        margin: 0 0 8px 0;
        padding: 4px 0 8px 0;
	}
    ol.lms_dates_list > li {
        margin-bottom: 16px;
        padding-top: 6px;
    }
}

/* General */

p.lms-error {
    color: #ff4545;
}