/* Scope the new layout to route editing; retain the CMS navigation contracts. */
.route-editor-premium { --route-line:#e1e8f1; --route-muted:#6c7a90; display:block; padding:0 !important; background:transparent !important; }
.route-editor-heading { align-items:center; margin:0 0 18px; padding:0 !important; border:0 !important; }
.route-editor-heading h2 { font-size:28px !important; letter-spacing:-.7px; margin:4px 0 !important; }
.route-editor-heading p { max-width:62ch; font-size:12px; color:var(--route-muted); }
.route-workspace { display:grid; grid-template-columns:minmax(285px,360px) minmax(0,1fr); gap:14px; align-items:start; }
.route-workspace-controls { display:grid; gap:12px; min-width:0; }
.route-setup-card,.route-workspace-stops,.route-editor-disclosure,.route-workspace-controls>details { background:#fff; border:1px solid var(--route-line); border-radius:12px; }
.route-setup-card { display:grid; gap:16px; padding:18px; }
.route-setup-card label { display:grid; gap:8px; font-size:12px; text-transform:none; letter-spacing:0; color:#26354d; }
.route-editor-premium :is(input,select,textarea) { min-width:0; width:100%; background:#fff; color:#19243a; border:1px solid #d8e1ee; border-radius:8px; font:inherit; padding:10px 12px; box-shadow:none; }
.route-editor-premium input { height:40px; min-height:40px; }
.route-editor-premium textarea { min-height:100px; }
.route-editor-premium [hidden] { display:none !important; }
.route-type-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
.route-type-choices button { display:grid; justify-items:center; gap:7px; min-height:68px !important; padding:9px 3px !important; border:1px solid #e2e8f1; border-radius:8px; background:#fff; color:#425069; font-size:11px; font-weight:600; }
.route-type-choices button[aria-pressed=true] { background:#eef5ff; border-color:#1966ec; color:#0759d5; }
.route-ui-icon { width:18px !important; height:18px !important; min-width:18px; object-fit:contain; }
.route-workspace-stops { padding:16px; display:grid; gap:10px; }
.route-workspace-stops h3 { font-size:15px; margin:0 0 4px; }
.route-workspace-stops>p { font-size:11px; line-height:1.6; margin:0; color:var(--route-muted); }
.route-search-row { display:flex; align-items:center; border:1px solid #d8e1ee; border-radius:8px; padding:0 9px; gap:5px; }
.route-search-row input { border:0 !important; padding:9px 3px !important; font-size:12px; }
.route-search-row button { min-height:32px !important; padding:4px 7px !important; font-size:10px; white-space:nowrap; border:0 !important; color:#0759d5; background:#eef5ff; }
.route-workspace-results { max-height:220px; overflow:auto; }
.route-workspace-results:empty { display:none; }
.route-workspace-results article { padding:10px; margin-bottom:6px; border:1px solid #e1e8f1; border-radius:8px; display:flex; flex-wrap:wrap; gap:6px; }
.route-workspace-results strong { flex:1 0 100%; font-size:12px; }
.route-workspace-results button { min-height:30px !important; font-size:11px; padding:5px 8px !important; }
.route-workspace-itinerary { display:grid; gap:8px; }
.route-stop-card { display:grid; grid-template-columns:12px 38px 26px minmax(0,1fr) auto; align-items:center; gap:6px; padding:12px 8px; border:1px solid #e1e8f1; border-radius:9px; background:#fff; transition:border-color .15s,background .15s; }
.route-stop-grip{display:grid;place-items:center;opacity:.4;cursor:grab}.route-stop-grip img{width:14px!important;min-width:14px}.route-stop-card[data-stop-type=origin] .route-stop-grip,.route-stop-card[data-stop-type=destination] .route-stop-grip{visibility:hidden}
.route-stop-thumb{display:grid;place-items:center;width:38px;height:42px;border-radius:6px;overflow:hidden;background:#edf3f8}.route-stop-thumb>img:not(.route-ui-icon){width:100%;height:100%;object-fit:cover}
.route-stop-card.selected { background:#f0f6ff; border-color:#87b6ff; }
.route-stop-number,.route-map-legend b { display:grid; place-items:center; color:#fff; background:#1769e0; width:28px; height:28px; border-radius:50%; font-size:12px; font-weight:700; }
.route-stop-number.origin,.route-map-legend .origin { background:#148461; }
.route-stop-number.destination,.route-map-legend .destination { background:#c3413b; }
.route-stop-info { display:grid; min-width:0; gap:4px; }
.route-stop-info strong { font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.route-stop-info small { color:var(--route-muted); font-size:10px; }
.route-stop-info small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.route-stop-actions { display:grid; grid-template-columns:repeat(2,32px); gap:4px; justify-self:end; }
.route-editor-premium .route-icon-button { width:32px; min-width:32px; max-width:32px; height:32px; min-height:32px !important; padding:4px !important; border:1px solid #e2e8f1; border-radius:6px; display:grid; place-items:center; background:#fff; }
.route-icon-button:disabled { opacity:.25; }.route-icon-button:hover:not(:disabled) { background:#edf5ff; }
.route-stop-duration-field { grid-column:4 / -1; display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; margin:4px 0 0; color:var(--route-muted); font-size:11px; letter-spacing:0; text-transform:none; }
.route-stop-duration { max-width:90px; font-size:12px !important; }
.route-add-stop { width:100%; display:flex; align-items:center; justify-content:center; gap:7px; min-height:40px !important; border:1px solid #1769e0 !important; color:#0759d5 !important; background:#fff; font-size:12px; }
.route-editor-disclosure,.route-workspace-controls>details { padding:14px 16px; }
.route-workspace-controls summary { font-size:12px; font-weight:650; color:#25354e; cursor:pointer; }
.route-workspace-controls details>label { display:grid; margin-top:14px; gap:7px; font-size:12px; text-transform:none; letter-spacing:0; }
.route-workspace-map { position:sticky; top:16px; border:1px solid #dce4ed; border-radius:12px; background:#fff; min-width:0; overflow:hidden; }
.route-workspace-map>h3 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.route-workspace-map-canvas { height:clamp(430px,64vh,700px); z-index:0; background:#edf2f1; }
.route-map-toolbar { position:absolute; inset:14px 50px auto 14px; z-index:400; display:flex; align-items:center; gap:8px; flex-wrap:wrap; pointer-events:none; }
.route-map-toolbar>* { pointer-events:auto; }
.route-map-badge { display:flex; align-items:center; gap:6px; padding:9px 12px; border-radius:7px; background:#fff; color:#0759d5; font-size:11px; box-shadow:0 2px 10px #25354e12; }
.route-map-toolbar button { margin-left:auto; display:flex; align-items:center; gap:6px; min-height:34px !important; font-size:11px; padding:7px 9px !important; border:0 !important; background:#fff; }
.route-editor-premium .route-map-mode { width:auto; max-width:230px; font-size:11px; padding:7px; min-height:34px; }
.route-map-legend { position:absolute; left:14px; top:calc(clamp(430px,64vh,700px) - 46px); z-index:400; display:flex; gap:12px; background:#fff; padding:8px 10px; border-radius:7px; }
.route-map-legend span { display:flex; align-items:center; gap:5px; font-size:10px; color:#46536a; }
.route-map-legend b { width:20px; height:20px; font-size:9px; }
.route-map-footer { padding:18px; border-top:1px solid #e1e8f1; }
.route-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)) 145px; gap:12px; align-items:center; }
.route-summary>div { display:grid; gap:6px; border-right:1px solid #e2e8f1; padding-right:8px; }
.route-summary span { font-size:11px; color:var(--route-muted); }.route-summary strong { font-size:14px; color:#19243a; }
.route-editor-premium .route-build-action { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:12px !important; min-height:44px !important; border:1px solid #0759d5 !important; border-radius:8px; background:#0759d5 !important; color:#fff !important; font-size:13px; }
.route-build-action .route-ui-icon { filter:brightness(0) invert(1); }
.route-map-footer [role=status] { font-size:11px; line-height:1.5; color:var(--route-muted); margin:12px 0 0; }
.route-workspace-pin span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#1769e0; border:3px solid white; color:#fff; font-weight:700; box-shadow:0 2px 6px #3348; }
.route-workspace-pin.origin span { background:#148461; }.route-workspace-pin.destination span { background:#c3413b; }
.route-editor-active .cms-section-layout { grid-template-columns:160px minmax(0,1fr); gap:18px; }
.route-editor-active .cms-section-nav { padding:12px 8px; border:1px solid #e1e8f1; border-radius:12px; background:#fff; }
.route-editor-active .cms-section-nav button { display:flex;align-items:center;gap:8px;font-size:12px; padding:12px 10px; }
.route-editor-active #routeDetails { border:0; padding:0; background:transparent; }
@media(min-width:1500px){.route-summary{grid-template-columns:repeat(3,minmax(0,1fr)) 180px}.route-editor-premium .route-build-action{grid-column:auto}}
@media(max-width:1150px) and (min-width:761px){.route-workspace{grid-template-columns:minmax(245px,300px) minmax(0,1fr)}.route-editor-active .cms-section-layout{grid-template-columns:125px minmax(0,1fr);gap:12px}.route-map-toolbar button{font-size:0}.route-map-toolbar button img{display:block}}
@media(max-width:900px){.route-workspace{grid-template-columns:minmax(0,1fr)}.route-workspace-map{position:relative;top:auto}.route-workspace-map-canvas{height:380px}.route-map-legend{top:334px}.route-workspace-controls{grid-template-columns:1fr 1fr}.route-workspace-stops{grid-column:2;grid-row:1 / span 3}}
@media(max-width:600px){.route-workspace-controls{grid-template-columns:1fr}.route-workspace-stops{grid-column:auto;grid-row:auto}.route-workspace-map-canvas{height:330px}.route-map-legend{top:284px}.route-editor-heading{flex-wrap:wrap}.route-map-badge{font-size:10px}.route-map-toolbar{right:45px}.route-map-mode{max-width:185px!important}.route-summary strong{font-size:12px}.route-editor-active .cms-section-layout{grid-template-columns:1fr}}
@media(max-width:600px){.route-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.route-editor-premium .route-build-action{grid-column:1 / -1}}
