/*
	Theme Name: BpGuide
*/

/* =========================================================
   Timetable
   ========================================================= */
section.timetable {
    padding: 80px 0;
    background: url(./assets/dist/img/section-bg-white.svg) repeat;
}

section.timetable .container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

section.timetable table#timetable-bpguide tbody tr:not(:last-child) > td {
    border: none !important;
}

.mobile-date {
    display: none;
}



@media (min-width: 767px) {
    section.timetable .hide-desktop {
        display: none !important;
    }
}

/* ---------------------------------------------------------
   Mobile: turn the data table into stacked cards.
   Each departure time becomes a card, each vessel offering
   is shown with its vessel name as a label.
   --------------------------------------------------------- */
@media (max-width: 767px) {

    section.timetable {
        padding: 40px 0;
    }

    section.timetable .container {
        overflow-x: visible;
    }

    /* The big number title scales down a bit. */
    section.timetable .timetable__title {
        font-size: 28px;
        font-size: 1.75rem;
        margin-bottom: 1em;
    }

    /* Break the table layout so each row can become a card. */
    section.timetable table#timetable-bpguide,
    section.timetable table#timetable-bpguide tbody {
        display: block;
        width: 100%;
    }

    /* The desktop column headers are not needed in card mode. */
    section.timetable table#timetable-bpguide thead {
        display: none;
    }

    section.timetable table#timetable-bpguide tbody tr {
        display: block;
        background: #fff;
        border: 1px solid rgba(55, 55, 55, 0.12);
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(32, 32, 32, 0.06);
        padding: 14px 16px;
        margin-bottom: 16px;
        text-align: left;
    }

    section.timetable table#timetable-bpguide tbody tr:last-child {
        margin-bottom: 0;
    }

    /* Every cell stacks vertically and drops the table borders/widths. */
    section.timetable table#timetable-bpguide tbody tr > th,
    section.timetable table#timetable-bpguide tbody tr > td {
        display: block;
        width: auto !important;
        padding: 4px 0;
        border: 0 !important;
        line-height: 1.4;
    }



    /* Empty cells (vessels with no departure at this time) are hidden. */
    section.timetable table#timetable-bpguide tbody tr > th:empty,
    section.timetable table#timetable-bpguide tbody tr > td:empty {
        display: none;
    }

    /* Departure time acts as the card heading. */
    section.timetable table#timetable-bpguide tbody td.departure {
        font-weight: 700;
        font-size: 1.375rem;
        padding-right: 0;
        margin-bottom: 4px;
    }

    section.timetable table#timetable-bpguide tbody td.departure > small {
        display: block;
        font-size: 0.9375rem;
        font-style: italic;
        opacity: 0.625;
    }

    /* Vessel offering: prefix it with the vessel name as an inline label. */
    section.timetable table#timetable-bpguide tbody td.vessel[data-label]:not(:empty)::before {
        content: attr(data-label) ": ";
        font-family: "Josefin Sans", sans-serif;
        font-weight: 700;
    }

    /* Booking-button cells: vessel name shown as a block heading + button. */
    section.timetable table#timetable-bpguide tbody th[data-label]:not(:empty)::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
    }

    section.timetable table#timetable-bpguide tbody th .btn-book-bpcard {
        display: inline-flex;
        width: 100%;
        height: auto;
        min-height: 46px;
        padding: 10px 16px;
        white-space: normal;
        text-align: center;
    }

    section.timetable table#timetable-bpguide tbody tr > td:before {
        display: block;
    }

    section.timetable .mobile-date {
        display: block;
        font-size: 0.85em;
        color: #666;
        margin-bottom: 2px;
    }

    section.timetable .hide-mobile {
        display: none !important;
    }

    section.timetable table#timetable-bpguide tbody tr > td.departure {
        text-align: left;
    }

}