/**
 * Табличные клубные карты (widgets/clubCards, class club-card-table).
 * Не смешивать с flex-макетом .club-card-block в dopstyle.css.
 */

.club-cards-container-adpt {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

.time-picker-cards {
    display: table;
    width: 50%;
    table-layout: fixed;
    overflow: hidden;
    border: 1px solid #6eb9c3;
    border-radius: 8px;
    margin: 0 auto;
    text-align: center;
}

.time-picker-button {
    display: table-cell;
    padding: 10px;
    color: #6eb9c3;
    cursor: pointer;
    border-right: 1px solid #6eb9c3;
}

.time-picker-button-active {
    background-color: #6eb9c3;
    color: #fff;
}

.time-picker-button:last-child {
    border-right: none;
}

/* В этом блоке должен быть только переключатель из 2 пунктов */
.time-picker-cards .time-picker-button:nth-child(n+3) {
    display: none;
}

.time-picker-cards .time-picker-button:nth-child(-n+2) {
    width: 50%;
}

/* Не давать глобальным правилам .club-card-block-info (dopstyle) ломать ячейки */
.clubs-block .time-cards table.club-card-table .club-card-block-info,
.clubs-block .time-cards table.club-card-table .club-card-block-dop-info {
    flex: none;
}

/* <table> нельзя делать flex — ломается первая строка / колонки. */
.club-cards-container-adpt .club-card-table {
    display: table;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #fcfcfc;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 3px 8px #00000024;
    margin: 10px;
    box-sizing: border-box;
    table-layout: fixed;
}

.club-cards-container-adpt > table.club-card-table {
    min-width: 550px;
    max-width: 550px;
    flex-shrink: 0;
    margin: 10px;
}

.club-cards-container-adpt table.club-card-table {
    margin: 10px;
}

.club-cards-mobile-container-adpt table.club-card-table {
    display: table;
    width: 100%;
    min-width: 270px;
    max-width: 700px;
    border-radius: 20px;
    background-color: #fcfcfc;
    overflow: hidden;
    box-shadow: 0 3px 8px #00000024;
    margin: 20px auto 20px;
    table-layout: fixed;
    border-collapse: collapse;
    box-sizing: border-box;
}

.club-cards-mobile-container-adpt table.club-card-table .club-card-block-duration-table-validity {
    padding: 10px;
}

.club-cards-mobile-container-adpt table.club-card-table tr p {
    margin: 0;
}

.club-cards-mobile-container-adpt table.club-card-table td {
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.clubs-block .time-cards .club-cards-container-adpt {
    display: flex;
}

.clubs-block .time-cards .club-cards-mobile-container-adpt {
    display: none;
}

@media all and (max-width: 1240px) {
    .clubs-block .time-cards .club-cards-mobile-container-adpt,
    .clubs-block .time-cards .club-cards-container-adpt {
        display: none;
    }

    .clubs-block .time-cards .club-cards-mobile-container-adpt {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .clubs-block .time-cards .club-cards-mobile-container-adpt table.club-card-table {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
    }
}

@media all and (max-width: 680px) {
    .time-picker-cards {
        width: 100%;
    }
}

@media (max-width: 450px) {
    .time-picker-cards {
        display: block;
    }

    .time-picker-button {
        display: block;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #6eb9c3;
        padding: 14px;
    }

    .time-picker-button:last-child {
        border-bottom: none;
    }
}
