/* CT Stations & Operators Map — uses the CT Modern Booking colors when that plugin is active. */
.cts-map, .cts-station, .cts-cards-wrap, .cts-ops-wrap, .cts-op-head {
	--cts-primary: var(--ctmb-primary, #1e2a78);
	--cts-button: var(--ctmb-button, #16a34a);
	--cts-radius: var(--ctmb-radius, 14px);
	--cts-font: var(--ctmb-font, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif);
	font-family: var(--cts-font);
}
.cts-map { margin: 28px 0; }
.cts-map-title, .cts-h { font: 800 24px/1.25 var(--cts-font); margin: 0 0 12px; color: #111827; }
.cts-h { font-size: 20px; margin-top: 28px; }
.cts-map-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cts-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cts-map .cts-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; margin: 0; border: 1.5px solid #e5e7eb; border-radius: 999px; background: #fff; color: #6b7280; font: 600 14px/1 var(--cts-font); cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0; filter: grayscale(1); opacity: .75; }
.cts-chip i { font-style: normal; }
.cts-chip span { color: #9ca3af; font-weight: 500; }
.cts-map .cts-chip.is-on { border-color: var(--c); color: #111827; background: color-mix(in srgb, var(--c) 9%, #fff); filter: none; opacity: 1; }
.cts-map-tools { display: flex; gap: 8px; flex: 1 1 300px; justify-content: flex-end; flex-wrap: wrap; }
.cts-map .cts-q, .cts-map .cts-op { width: auto; flex: 1 1 160px; max-width: 260px; margin: 0; padding: 9px 14px; border: 1.5px solid #e5e7eb; border-radius: 999px; font: 15px var(--cts-font); background-color: #fff; color: #111827; height: auto; }
.cts-map .cts-q:focus, .cts-map .cts-op:focus { outline: none; border-color: var(--cts-primary); }
.cts-map-body { display: grid; grid-template-columns: 1fr 300px; height: var(--cts-h, 560px); border-radius: var(--cts-radius); overflow: hidden; border: 1px solid #e5e7eb; box-shadow: 0 10px 30px rgba(17, 24, 39, .08); background: #fff; }
.cts-map-nolist .cts-map-body { grid-template-columns: 1fr; }
.cts-map-nolist .cts-list { display: none; }
.cts-canvas { height: 100%; min-height: 200px; z-index: 0; }
.cts-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-left: 1px solid #e5e7eb; }
.cts-list li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; line-height: 1.35; }
.cts-list li::before { content: none; }
.cts-list li:hover, .cts-list li:focus { background: color-mix(in srgb, var(--cts-primary) 6%, #fff); outline: none; }
.cts-list li[hidden] { display: none; }
.cts-list strong { display: block; font-size: 14px; color: #111827; }
.cts-list small { color: #6b7280; font-size: 13px; }
.cts-dot { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
.cts-pin { background: none; border: 0; }
.cts-pin span { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); font-size: 14px; line-height: 1; box-sizing: border-box; }
.cts-pop { font-family: var(--cts-font, system-ui); font-size: 13.5px; line-height: 1.5; color: #374151; min-width: 200px; }
.cts-pop-name { display: block; font-size: 15px; color: #111827; margin: 5px 0 1px; }
.cts-pop-town { color: #6b7280; margin-bottom: 4px; }
.cts-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); font-size: 12px; font-weight: 700; }
.cts-pop-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cts-pop-ops a { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 12px; font-weight: 600; text-decoration: none; color: #374151; }
.cts-pop-ops img { max-height: 22px; max-width: 70px; }
.cts-pop-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.cts-pop-actions a:not(.cts-btn) { font-weight: 600; }
a.cts-btn, .leaflet-container a.cts-btn { display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 999px; background: var(--cts-button, #16a34a); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none !important; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); transition: filter .2s, transform .2s; }
.leaflet-container a.cts-btn { padding: 7px 14px; font-size: 13px; }
a.cts-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
a.cts-btn.cts-btn-ghost { background: #fff; color: var(--cts-primary) !important; border: 1.5px solid currentColor; box-shadow: none; }
.cts-map .leaflet-container img, .cts-map .leaflet-container .leaflet-tile { max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.cts-empty { padding: 12px; border: 1px dashed #d1d5db; border-radius: 8px; color: #6b7280; }

/* Station page */
.cts-station { margin: 0 0 24px; }
.cts-station-top { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start; padding: 18px 20px; border: 1px solid #e5e7eb; border-radius: var(--cts-radius); background: #fff; box-shadow: 0 6px 20px rgba(17, 24, 39, .05); }
.cts-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; margin: 0; flex: 1 1 420px; }
.cts-info div { margin: 0; }
.cts-info dt { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.cts-info dd { margin: 2px 0 0; color: #111827; font-size: 15px; }
.cts-station-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cts-station .cts-map { margin-top: 18px; }

/* Cards and operators */
.cts-cards, .cts-ops { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cts-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cts-ops { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cts-cards li, .cts-ops li { margin: 0; }
.cts-cards li::before, .cts-ops li::before { content: none; }
.cts-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #e5e7eb; border-left: 4px solid var(--c); border-radius: 12px; background: #fff; text-decoration: none !important; color: #111827; transition: box-shadow .2s, transform .2s; }
.cts-card:hover { box-shadow: 0 8px 20px rgba(17, 24, 39, .08); transform: translateY(-1px); }
.cts-card-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 12%, #fff); font-size: 17px; }
.cts-card strong, .cts-op-card strong { display: block; font-size: 15px; line-height: 1.3; }
.cts-card small, .cts-op-card small { color: #6b7280; font-size: 13px; }
.cts-op-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; text-align: center; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; text-decoration: none !important; color: #111827; height: 100%; box-sizing: border-box; transition: box-shadow .2s, transform .2s; }
.cts-op-card:hover { box-shadow: 0 8px 20px rgba(17, 24, 39, .08); transform: translateY(-1px); }
.cts-op-card img { max-height: 48px; max-width: 120px; object-fit: contain; margin: 0; box-shadow: none; border-radius: 0; }
.cts-op-initial { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cts-primary) 10%, #fff); color: var(--cts-primary); font: 800 20px var(--cts-font); }
.cts-op-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.cts-op-head img { max-height: 72px; max-width: 180px; }
.cts-op-head > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

@media (max-width: 781px) {
	.cts-map-body { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; }
	.cts-canvas { height: min(var(--cts-h, 560px), 65vh); }
	.cts-list { max-height: 280px; border-left: 0; border-top: 1px solid #e5e7eb; }
	.cts-map-tools { justify-content: stretch; }
	.cts-map .cts-q, .cts-map .cts-op { max-width: none; }
}
