/* CT Baolau Timetables — follows CT Modern Booking colors when that plugin is active. */
.ctbl, .ctbl-st, .ctbl-faq, .ctbl-related, .ctbl-intro {
	--ctbl-primary: var(--ctmb-primary, #1e2a78);
	--ctbl-accent: var(--ctmb-accent, #f59e0b);
	--ctbl-button: var(--ctmb-button, #16a34a);
	--ctbl-radius: var(--ctmb-radius, 14px);
	--ctbl-font: var(--ctmb-font, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif);
	font-family: var(--ctbl-font);
}
.ctbl-intro { font-size: 17px; line-height: 1.6; color: #374151; }
.ctbl { margin: 24px 0; border: 1px solid #e5e7eb; border-radius: var(--ctbl-radius); background: #fff; box-shadow: 0 10px 30px rgba(17, 24, 39, .07); overflow: hidden; }
.ctbl-head { padding: 18px 20px 6px; }
.ctbl .ctbl-title { margin: 0 0 10px; font: 800 22px/1.25 var(--ctbl-font); color: #111827; border: 0; padding: 0; }
.ctbl-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ctbl-facts li { margin: 0; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ctbl-primary) 7%, #fff); color: #374151; font-size: 14px; }
.ctbl-facts li::before { content: none; }
.ctbl-facts strong { color: var(--ctbl-primary); }
.ctbl-date { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px 16px; border-bottom: 1px solid #e5e7eb; margin: 0; }
.ctbl-date label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: #374151; margin: 0; }
.ctbl .ctbl-date-in { padding: 8px 12px; border: 1.5px solid #e5e7eb; border-radius: 10px; font: 15px var(--ctbl-font); background: #fff; width: auto; margin: 0; height: auto; }
a.ctbl-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 999px; background: var(--ctbl-button); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none !important; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); transition: filter .2s, transform .2s; }
a.ctbl-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ctbl-table { display: block; }
.ctbl-tr { display: grid; grid-template-columns: 74px 74px 92px minmax(140px, 1fr) minmax(250px, 1.35fr); gap: 10px; align-items: center; padding: 12px 20px; border-bottom: 1px solid #f3f4f6; font-size: 15px; color: #374151; }
.ctbl-tr:last-child { border-bottom: 0; }
.ctbl-tr:not(.ctbl-th):hover { background: color-mix(in srgb, var(--ctbl-primary) 4%, #fff); }
.ctbl-th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; background: #f9fafb; padding-top: 9px; padding-bottom: 9px; }
.ctbl-dep strong { font-size: 18px; color: #111827; }
.ctbl-m { display: none; }
.ctbl-arr sup { color: #dc2626; font-weight: 700; margin-left: 2px; }
.ctbl-op small, .ctbl-dur small { display: block; color: #9ca3af; font-size: 12.5px; }
.ctbl-op { color: #111827; }
.ctbl-opn { display: flex; align-items: center; gap: 8px; font-weight: 650; line-height: 1.3; }
.ctbl-opn + .ctbl-opn { margin-top: 4px; }
.ctbl-opn img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid #f3f4f6; flex: none; margin: 0; }
.ctbl-fares { display: flex; flex-direction: column; gap: 6px; }
.ctbl-fare { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.ctbl-fare + .ctbl-fare { padding-top: 6px; border-top: 1px dashed #e5e7eb; }
.ctbl-fname { font-size: 13.5px; color: #4b5563; line-height: 1.3; }
.ctbl-price { font-weight: 800; color: var(--ctbl-primary); font-size: 16px; white-space: nowrap; text-align: right; }
.ctbl-fare a.ctbl-btn { padding: 6px 15px; }
button.ctbl-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--ctbl-button); color: #fff; font: 700 14px var(--ctbl-font); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
button.ctbl-btn:disabled { opacity: .6; cursor: wait; }
.ctbl-none { margin: 0; padding: 16px 20px; color: #4b5563; }
.ctbl-none + .ctbl-none { padding-top: 0; }
.ctbl.is-loading .ctbl-body { opacity: .6; }
.ctbl-note { margin: 0; padding: 12px 20px; font-size: 13px; color: #6b7280; background: #f9fafb; border-top: 1px solid #e5e7eb; }
.ctbl-faq, .ctbl-related { margin: 28px 0; }
.ctbl-faq h2, .ctbl-related h2 { font: 750 21px/1.3 var(--ctbl-font); color: #111827; margin: 0 0 12px; }
.ctbl-faq details { border: 1px solid #e5e7eb; border-radius: 12px; margin: 0 0 8px; background: #fff; }
.ctbl-faq summary { cursor: pointer; padding: 13px 16px; font-weight: 650; color: #111827; list-style: none; }
.ctbl-faq summary::-webkit-details-marker { display: none; }
.ctbl-faq summary::after { content: "+"; float: right; color: var(--ctbl-primary); font-weight: 700; }
.ctbl-faq details[open] summary::after { content: "−"; }
.ctbl-faq details p { margin: 0; padding: 0 16px 14px; color: #4b5563; }
.ctbl-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ctbl-related li { margin: 0; }
.ctbl-related li::before { content: none; }
.ctbl-related a { display: inline-block; padding: 8px 14px; border: 1px solid #e5e7eb; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ctbl-primary); background: #fff; }
.ctbl-related a:hover { border-color: var(--ctbl-primary); }
@media (max-width: 720px) {
	.ctbl-th { display: none; }
	.ctbl-tr { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
	.ctbl-dep { display: flex; gap: 8px; align-items: baseline; }
	.ctbl-arr, .ctbl-dur { display: none; }
	.ctbl-op { font-size: 14px; }
	.ctbl-fares { background: #f9fafb; border-radius: 10px; padding: 8px 10px; }
	.ctbl-m { display: inline; color: #6b7280; font-size: 13.5px; }
}
.ctbl-empty-text { margin: 0; color: #4b5563; font-size: 15px; }
/* Company directory and company pages */
.ctbl-dir { margin: 20px 0; font-family: var(--ctmb-font, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif); --ctbl-primary: var(--ctmb-primary, #1e2a78); }
.ctbl-dir-bar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.ctbl-dir .ctbl-dir-q, .ctbl-night .ctbl-dir-q { width: 100%; max-width: 420px; padding: 11px 16px; border: 1.5px solid #e5e7eb; border-radius: 999px; font-size: 15px; background: #fff; margin: 0; box-sizing: border-box; }
.ctbl-dir-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.ctbl-chip { padding: 7px 14px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #374151; font: 600 14px/1.2 inherit; cursor: pointer; }
.ctbl-chip small { color: #9ca3af; font-weight: 500; margin-left: 2px; }
.ctbl-chip.is-on { background: var(--ctbl-primary); border-color: var(--ctbl-primary); color: #fff; }
.ctbl-chip.is-on small { color: rgba(255, 255, 255, .75); }
.ctbl-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
a.ctbl-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; color: #374151; text-decoration: none !important; box-shadow: 0 4px 14px rgba(17, 24, 39, .05); transition: border-color .2s, transform .2s, box-shadow .2s; }
a.ctbl-card:hover { border-color: var(--ctbl-primary); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17, 24, 39, .09); }
a.ctbl-card[hidden] { display: none; }
.ctbl-card-top { display: flex; gap: 12px; align-items: center; }
.ctbl-card-top img, .ctbl-card-ph { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; border: 1px solid #f3f4f6; background: #fff; flex: none; margin: 0; }
.ctbl-card-ph { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--ctbl-primary); background: color-mix(in srgb, var(--ctbl-primary) 8%, #fff); }
.ctbl-card-top strong { display: block; color: #111827; font-size: 16px; line-height: 1.3; }
.ctbl-card-top small { display: block; color: #6b7280; font-size: 13px; margin-top: 2px; }
.ctbl-card-stats { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ctbl-card-stats span { padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ctbl-primary) 7%, #fff); color: var(--ctbl-primary); font-weight: 650; }
.ctbl-card-routes { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: #4b5563; }
.ctbl-more { color: #9ca3af; }
.ctbl-co { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; margin: 0 0 22px; }
.ctbl-co-logo { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; border: 1px solid #f3f4f6; flex: none; margin: 0; }
.ctbl-co .ctbl-co-name { margin: 0 0 8px; font-size: 22px; font-weight: 800; color: #111827; line-height: 1.25; }
.ctbl-co .ctbl-facts { --ctbl-primary: var(--ctmb-primary, #1e2a78); }
.ctbl-co-routes { margin: 26px 0 8px; }
.ctbl-co-routes h2 { font-size: 21px; margin: 0 0 12px; color: #111827; }
.ctbl-co-routes ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ctbl-co-routes li { margin: 0; }
.ctbl-co-routes li::before { content: none; }
.ctbl-co-routes a { display: block; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; text-decoration: none !important; color: #374151; }
.ctbl-co-routes a:hover { border-color: var(--ctmb-primary, #1e2a78); }
.ctbl-co-routes strong { display: block; color: #111827; }
.ctbl-co-routes span { font-size: 13px; color: #6b7280; }
.ctbl-back { margin: 0 0 14px; font-size: 14px; }
.ctbl { scroll-margin-top: 90px; }

/* Companies at a station (CT Stations pages) */
.ctbl-st { margin: 28px 0; }
.ctbl-st-co { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; background: #fff; }
.ctbl-st-head { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.ctbl-st-head img, .ctbl-st-head .ctbl-card-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; border: 1px solid #f3f4f6; flex: none; margin: 0; }
.ctbl-st-head a { color: inherit; text-decoration: none; }
.ctbl-st-head a:hover strong { text-decoration: underline; }
.ctbl-st-routes { list-style: none; margin: 0; padding: 0; }
.ctbl-st-routes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #f3f4f6; margin: 0; }
.ctbl-st-routes li > span { display: flex; flex-direction: column; min-width: 0; }
.ctbl-st-routes small { color: #6b7280; }
.ctbl-st-routes .ctbl-btn { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .ctbl-st-routes li { flex-wrap: wrap; } .ctbl-st-routes .ctbl-btn { width: 100%; box-sizing: border-box; } }

/* Night & sleeper departures */
.ctbl-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font: 700 11px/1.5 inherit; font-style: normal; vertical-align: middle; white-space: nowrap; }
.ctbl-tag-sleeper { background: #ede9fe; color: #5b21b6; }
.ctbl-tag-overnight { background: #e0e7ff; color: #1e3a8a; }
.ctbl-night { margin: 20px 0; --ctbl-primary: var(--ctmb-primary, #1e2a78); }
.ctbl-night-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0 0 24px; }
.ctbl-night-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; color: #374151; text-decoration: none !important; }
.ctbl-night-list a:hover { border-color: var(--ctbl-primary); }
.ctbl-night-list a[hidden], .ctbl-night .ctbl[hidden], .ctbl-night .ctbl-tr[hidden] { display: none; }
.ctbl-night-list strong { color: #111827; }
.ctbl-night-list small { color: #6b7280; }
.ctbl-night .ctbl { scroll-margin-top: 90px; }

/* Lowest-price box (slides up after the timetable) */
.ctbl-deal { --ctbl-primary: var(--ctmb-primary, #1e2a78); --ctbl-button: var(--ctmb-button, #16a34a); position: fixed; right: 20px; bottom: 20px; z-index: 9990; width: 340px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 16px 18px; border-radius: 16px; background: #fff; color: #374151; box-shadow: 0 18px 50px rgba(17, 24, 39, .22); border: 1px solid #e5e7eb; font-family: var(--ctmb-font, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif); transform: translateY(130%); opacity: 0; pointer-events: none; transition: transform .35s ease, opacity .35s ease; }
.ctbl-deal.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.ctbl-deal p { margin: 0; }
.ctbl-deal-x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f3f4f6; color: #4b5563; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.ctbl-deal-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #b45309; }
.ctbl-deal-route { font-size: 17px; font-weight: 800; color: #111827; margin: 2px 34px 8px 0 !important; }
.ctbl-deal-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ctbl-deal-op .ctbl-opn { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ctbl-deal-op img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; margin: 0; }
.ctbl-deal-price { font-size: 26px; font-weight: 800; color: var(--ctbl-primary); white-space: nowrap; }
.ctbl-deal-meta { font-size: 13px; color: #6b7280; margin-top: 4px !important; }
.ctbl-deal-save { display: inline-block; margin-top: 8px !important; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12.5px; font-weight: 700; }
.ctbl-deal-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.ctbl-deal a.ctbl-deal-book { flex: 1; animation: ctbl-pulse 2.4s ease-in-out 1s 3; }
.ctbl-deal-dates { font-size: 13.5px; font-weight: 600; color: var(--ctbl-primary); white-space: nowrap; }
.ctbl-deal-recs { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f3f4f6; display: flex; flex-direction: column; gap: 6px; }
.ctbl-deal-recs p { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.ctbl-deal-recs a { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #111827; text-decoration: none; padding: 6px 10px; border-radius: 10px; background: #f9fafb; }
.ctbl-deal-recs a:hover { background: #f3f4f6; }
.ctbl-deal-recs b { color: var(--ctbl-primary); white-space: nowrap; }
.ctbl-deal-pill { position: fixed; right: 16px; bottom: 16px; z-index: 9990; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--ctmb-primary, #1e2a78); color: #fff; font: 700 14px/1.2 var(--ctmb-font, system-ui, sans-serif); box-shadow: 0 10px 26px rgba(17, 24, 39, .25); cursor: pointer; }
.ctbl-deal-pill[hidden], .ctbl-deal[hidden] { display: none; }
@keyframes ctbl-pulse { 0%, 100% { transform: none; } 50% { transform: scale(1.04); } }
@media (max-width: 600px) {
	.ctbl-deal { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; padding: 14px 14px 12px; }
	.ctbl-deal-route { font-size: 15px; }
	.ctbl-deal-price { font-size: 22px; }
	.ctbl-deal-recs { flex-direction: row; overflow-x: auto; gap: 8px; }
	.ctbl-deal-recs p { display: none; }
	.ctbl-deal-recs a { flex: none; flex-direction: column; gap: 0; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .ctbl-deal { transition: none; } .ctbl-deal a.ctbl-deal-book { animation: none; } }

/* Sales paused site-wide */
.ctbl-paused { margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; background: #fef3c7; color: #92400e; font-weight: 600; }
.ctbl-btn.ctbl-off { display: inline-flex; padding: 6px 15px; border-radius: 999px; background: #e5e7eb; color: #6b7280; font-size: 13px; font-weight: 700; white-space: nowrap; }
