.vn-train-schedule {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
    overflow: visible;
}

.vn-train-table-wrap {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.vn-train-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.vn-train-header h3 {
    margin: 0;
    color: #0073aa;
    font-size: 18px;
}

.vn-train-date-range {
    color: #666;
    font-size: 14px;
}

.vn-train-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vn-train-schedule .vn-train-table-wrap .vn-train-table {
    width: 100%;
    min-width: 680px;
}

.vn-train-table th,
.vn-train-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.vn-train-table th {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.vn-train-table tbody tr:hover {
    background: #f9f9f9;
}

.vn-train-table th:first-child,
.vn-train-table td:first-child {
    position: sticky;
    left: 0;
}

.vn-train-table th:first-child {
    z-index: 3;
    background: #0073aa;
}

.vn-train-table td:first-child {
    z-index: 1;
    background: #fff;
    color: #e63946;
    font-weight: 600;
}

.no-trains {
    text-align: center;
    color: #666;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .vn-train-table {
        font-size: 13px;
    }
    
    .vn-train-table th,
    .vn-train-table td {
        padding: 8px 10px;
    }
    
    .vn-train-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.vn-train-price {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 20px 0;
}

.vn-train-price-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.vn-train-price-heading-row h3 {
    margin: 0;
}

.vn-train-other-date-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.vn-train-other-date-form label {
    display: grid;
    gap: 3px;
    margin: 0;
    color: #4b5563;
    font-size: 13px;
}

.vn-train-other-date-form input[type="date"] {
    min-height: 36px;
    padding: 6px 8px;
}

.vn-train-other-date-form button {
    min-height: 36px;
    padding: 7px 12px;
    border: 0;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
}

.vn-train-timetable-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.vn-train-timetable-heading-row h3 {
    margin-top: 0;
}

.vn-train-time-search {
    max-width: 100%;
    margin: 20px 0;
}

.vn-train-time-search-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    background: #f8fbfd;
}

.vn-train-time-search-form h2 {
    margin: 0;
}

.vn-train-time-search-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.vn-train-time-search-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.vn-train-time-search-form select,
.vn-train-time-search-form input[type="date"] {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #fff;
}

.vn-train-time-search-submit {
    display: flex;
    align-items: end;
}

.vn-train-time-search-submit button,
.vn-train-booking-button,
.vn-train-time-result a[href*="/dat-ve-tau"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 0;
    border-radius: 6px;
    background: #0073aa;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.vn-train-time-result {
    margin-top: 24px;
}

.vn-train-time-actions {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .vn-train-time-search-row {
        grid-template-columns: 1fr;
    }

    .vn-train-timetable-heading-row {
        flex-direction: column;
    }
}

.vn-train-price-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.vn-train-price-table th,
.vn-train-price-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.vn-train-price-table th:first-child,
.vn-train-price-table td:first-child {
    text-align: left;
    font-weight: 600;
    width: 180px;
}

.vn-train-price-table th {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.vn-train-price-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #0073aa;
    color: #fff;
}

.vn-train-price-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f5f5f5;
}

.vn-train-price-table tbody tr:hover {
    background: #f9f9f9;
}

.vn-train-price-table td:not(:first-child) {
    color: #e63946;
    font-weight: 600;
}

.vn-train-price-matrix-wrapper {
    display: block;
    max-width: 100%;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.vn-train-price-matrix th,
.vn-train-price-matrix td {
    white-space: nowrap;
}

.vn-train-price-matrix {
    min-width: 720px;
}

.vn-train-table-swipe {
    display: none;
    margin: 8px 0;
    color: #5f6b76;
    font-size: 14px;
    font-style: italic;
}

.vn-train-table-swipe.is-visible {
    display: block;
}

@media (max-width: 700px) {
    .vn-train-price-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.vn-train-price-options {
    display: grid;
    gap: 4px;
}

.vn-train-price-tier-note,
.vn-train-time {
    display: block;
    margin-top: 3px;
    color: #5f6b76;
    font-size: 12px;
    font-weight: 500;
}

.vn-train-price-table th .vn-train-price-tier-note {
    color: #e9f6ff;
}

.vn-train-station-map {
    display: flex;
    justify-content: center;
    margin: 18px auto;
    max-width: 100%;
}

.vn-train-station-map iframe {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.vn-train-destination-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 18px 0 24px;
}

.vn-train-destination-figure {
    margin: 0;
    text-align: center;
}

.vn-train-destination-figure img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.vn-train-destination-figure figcaption {
    margin-top: 8px;
    color: #5f6b76;
    font-size: 13px;
}

.vn-train-stops {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vn-train-schedule,
.vn-train-table-wrap,
.vn-train-stops,
.vn-train-price-matrix-wrapper {
    scrollbar-width: auto;
    scrollbar-color: #0073aa #d9eaf1;
}

.vn-train-schedule::-webkit-scrollbar,
.vn-train-table-wrap::-webkit-scrollbar,
.vn-train-stops::-webkit-scrollbar,
.vn-train-price-matrix-wrapper::-webkit-scrollbar {
    height: 12px;
}

.vn-train-schedule::-webkit-scrollbar-track,
.vn-train-table-wrap::-webkit-scrollbar-track,
.vn-train-stops::-webkit-scrollbar-track,
.vn-train-price-matrix-wrapper::-webkit-scrollbar-track {
    background: #d9eaf1;
    border-radius: 8px;
}

.vn-train-schedule::-webkit-scrollbar-thumb,
.vn-train-table-wrap::-webkit-scrollbar-thumb,
.vn-train-stops::-webkit-scrollbar-thumb,
.vn-train-price-matrix-wrapper::-webkit-scrollbar-thumb {
    background: #0073aa;
    border: 2px solid #d9eaf1;
    border-radius: 8px;
}

.vn-train-schedule::-webkit-scrollbar-thumb:hover,
.vn-train-table-wrap::-webkit-scrollbar-thumb:hover,
.vn-train-stops::-webkit-scrollbar-thumb:hover,
.vn-train-price-matrix-wrapper::-webkit-scrollbar-thumb:hover {
    background: #005f87;
}

.vn-train-price-notes {
    margin: 12px 0 0;
    padding-left: 20px;
}

.vrb-tr-wrap.vrb-tr-type-horizontal {
    max-width: 1040px;
}

.vrb-tr-type-horizontal .vrb-tr-grid,
.vrb-tr-type-horizontal .vrb-tr-date-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.vrb-tr-type-horizontal .vrb-tr-date-row {
    align-items: end;
}

.vrb-tr-type-horizontal .vrb-tr-submit-col .vrb-tr-button {
    width: 100%;
}

@media (max-width: 767px) {
    .vrb-tr-type-horizontal .vrb-tr-grid,
    .vrb-tr-type-horizontal .vrb-tr-date-row {
        grid-template-columns: 1fr;
    }

    .vrb-tr-type-horizontal .vrb-col,
    .vrb-tr-type-horizontal .vrb-tr-submit-col,
    .vrb-tr-type-horizontal .vrb-tr-button {
        width: 100%;
    }

}

.inside-article,
.inside-article .entry-meta,
.inside-article .post-navigation,
.inside-article .cat-links {
    position: relative;
}

.inside-article .entry-meta,
.inside-article .post-navigation {
    z-index: 80;
    pointer-events: auto;
}

.inside-article .entry-meta a,
.inside-article .post-navigation a {
    position: relative;
    z-index: 90;
    pointer-events: auto;
}

.vn-train-schedule,
.vn-train-price,
.vrb-tr-wrap {
    position: relative;
    z-index: 1;
}

.entry-content table,
.vn-train-table,
.vn-train-price-table,
.vrb-tr-wrap table {
    border: 1px solid #d7e3ea;
    border-collapse: separate;
    border-radius: 12px;
    border-spacing: 0;
    box-shadow: none;
    overflow: hidden;
}

.entry-content table th,
.entry-content table td,
.vn-train-table th,
.vn-train-table td,
.vn-train-price-table th,
.vn-train-price-table td,
.vrb-tr-wrap table th,
.vrb-tr-wrap table td {
    border-bottom: 1px solid #d7e3ea;
    border-right: 1px solid #d7e3ea;
    line-height: 1.45;
}

.entry-content table tr:last-child td,
.entry-content table tr:last-child th,
.vn-train-table tr:last-child td,
.vn-train-table tr:last-child th,
.vn-train-price-table tr:last-child td,
.vn-train-price-table tr:last-child th,
.vrb-tr-wrap table tr:last-child td,
.vrb-tr-wrap table tr:last-child th {
    border-bottom: 0;
}

.entry-content table th:last-child,
.entry-content table td:last-child,
.vn-train-table th:last-child,
.vn-train-table td:last-child,
.vn-train-price-table th:last-child,
.vn-train-price-table td:last-child,
.vrb-tr-wrap table th:last-child,
.vrb-tr-wrap table td:last-child {
    border-right: 0;
}

.entry-content table thead th,
.entry-content table tbody th,
.vn-train-table th,
.vn-train-price-table th,
.vrb-tr-wrap table th {
    background: #eaf7f5;
    color: #173f46;
    font-weight: 800;
}

.entry-content table tbody tr:nth-child(even) td,
.vn-train-table tbody tr:nth-child(even) td,
.vn-train-price-table tbody tr:nth-child(even) td,
.vrb-tr-wrap table tbody tr:nth-child(even) td {
    background: #fbfdfe;
}

.button,
button,
input[type="button"],
input[type="submit"],
.wp-block-button__link,
.vn-train-booking-button,
.vn-train-time-result a[href*="/dat-ve-tau"],
.vn-train-other-date-form button,
.vn-train-time-search-submit button {
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.entry-content,
.inside-article,
.vn-train-schedule,
.vn-train-price,
.vn-train-time-search,
.vrb-tr-wrap {
    color: #1f3842;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.entry-content .vn-train-price-table thead th:first-child,
.entry-content .vn-train-price-table tbody th:first-child,
.vn-train-price-table thead th:first-child,
.vn-train-price-table tbody th:first-child {
    background: linear-gradient(180deg, #eaf7f5, #dff0ee);
    border-color: #c8dedc;
    color: #173f46;
    font-weight: 800;
}

.entry-content .vn-train-price-table tbody th:first-child span,
.entry-content .vn-train-price-table tbody th:first-child small,
.vn-train-price-table tbody th:first-child span,
.vn-train-price-table tbody th:first-child small {
    color: #173f46;
}

.vn-train-price-head + p,
.vn-train-price-heading-row + p,
.vn-train-timetable-heading-row + p {
    display: none;
}

.vn-train-price-head + p.is-visible,
.vn-train-price-heading-row + p.is-visible,
.vn-train-timetable-heading-row + p.is-visible {
    display: block;
}
