/* Органайзер v10 · 05.11.2026 — по-ясна програма: табове с обобщение, един ред данни за деня, по-леки спирки, карта като изглед на телефон. Зарежда се след organizer.css. */

/* Заглавието получава фокус след генериране само за екранните четци (tabindex=-1, не е бутон) — без видима рамка */
.op-main [data-tp-heading]:focus,.op-main [data-tp-heading]:focus-visible{outline:none!important}

/* ---------- Табове на дните: всеки показва какво има в деня ---------- */
.op-main .tp-day-tabs{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px!important;margin:20px 0 16px!important;overflow:visible}
.op-main .tp-day-tabs>button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0!important;padding:12px 14px!important;text-align:left!important;white-space:normal!important;border-radius:12px!important;background:#f1f0ea!important;transition:background .15s}
.op-main .tp-day-tabs>button:hover{background:#e7e6dd!important}
.op-main .tp-day-tabs>button b{font-size:13px;font-weight:600;letter-spacing:.02em}
.op-main .tp-day-tabs>button span{font-size:11.5px;opacity:.75}
.op-main .tp-day-tabs>button em{font-style:normal;font-size:14.5px;font-weight:600;line-height:1.25;margin-top:6px;color:var(--op-ink)}
.op-main .tp-day-tabs>button small{font-size:12px;line-height:1.35;color:var(--op-mute);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.op-main .tp-day-tabs>button[aria-selected=true]{background:var(--op-green)!important}
.op-main .tp-day-tabs>button[aria-selected=true] *{color:#fff!important}
.op-main .tp-day-tabs>button[aria-selected=true] span,.op-main .tp-day-tabs>button[aria-selected=true] small{opacity:.85}

/* ---------- Заглавие на деня: един ред с данните ---------- */
.op-main .tp-day-heading{flex-direction:column!important;align-items:flex-start!important;gap:10px!important;margin-bottom:18px}
.op-main .tp-day-heading .tp-eyebrow{font-size:11px}
.op-main .tp-day-sum{display:flex;flex-wrap:wrap;align-items:center;gap:0 2px;margin:2px 0 0!important;font-size:13px!important;opacity:1!important;color:var(--op-mute)}
.op-main .tp-wx{display:inline-flex;align-items:center;gap:4px;color:var(--op-ink)}
.op-main .tp-wx .icon{width:15px;height:15px}
.op-main .tp-day-heading>div:first-child{flex:1 1 auto;min-width:0}
.op-main .tp-day-route-tools{display:flex!important;flex-direction:row!important;align-items:center;gap:14px;flex:0 0 auto;flex-wrap:nowrap}
.op-main .tp-day-route-tools .tp-btn{padding:9px 14px;font-size:13px}

/* ---------- Спирки: часът води, бутоните отстъпват ---------- */
.op-main .tp-time{font-size:21px!important;font-weight:700!important;letter-spacing:-.01em;line-height:1.1;color:var(--op-green-d)}
.op-main .tp-time small{font-size:11px!important;font-weight:600!important;letter-spacing:.06em;text-transform:uppercase}
.op-main .tp-stop-copy h4{font-size:19px;line-height:1.25}
.op-main .tp-stop-type{font-size:11.5px}
.op-main .tp-stop-meta{font-size:12.5px}

/* Подробности, Смени и Още на един тих ред */
.op-main .tp-stop-copy{display:flex;flex-direction:column}
.op-main .tp-stop-details,.op-main .tp-stop-actions{margin-top:10px!important}
.op-main .tp-stop-details+.tp-stop-actions{margin-top:-30px!important;align-self:flex-end}
.op-main .tp-stop-details[open]+.tp-stop-actions{margin-top:10px!important;align-self:flex-start}
.op-main .tp-stop-details>summary{display:inline-flex;align-items:center;min-height:30px;margin:0!important;font-size:13px;font-weight:600}
.op-main .tp-stop-actions{gap:6px!important}
.op-main .tp-stop-actions>button,.op-main .tp-stop-actions summary{border:0!important;background:transparent!important;padding:6px 10px!important;min-height:30px;border-radius:8px!important;font-size:13px!important;font-weight:600;color:var(--op-green-d)!important}
.op-main .tp-stop-actions>button:hover,.op-main .tp-stop-actions summary:hover{background:#eef2ea!important}

/* „Ако вали“ — на един ред, ако се събира */
.op-main .tp-rain-alt{display:block!important;font-size:13px;line-height:1.5;margin-top:6px}
.op-main .tp-rain-alt .icon{width:15px;height:15px;vertical-align:-3px;margin-right:4px}

/* Преходите между спирките — тиха линия, а не отделен ред с тежест */
.op-main .tp-transit{opacity:.85}

/* ---------- Телефон ---------- */
.op-map-fab,.op-map-close{display:none}
@media (max-width:760px){
 .op-layout>*,#tripPlanner,#tripPlanner>*{min-width:0;max-width:100%}
 .op-main .tp-result-meta{display:none}
 .op-main .tp-summary{flex-wrap:wrap}
 .op-main .tp-result-header h3{font-size:26px}
 .op-main .tp-result-header .tp-btn{padding:8px 12px;font-size:12.5px}
 .op-main .tp-tools{flex-wrap:nowrap!important;overflow-x:auto;gap:4px 16px!important;padding-top:10px!important;margin-top:12px!important;scrollbar-width:none}
 .op-main .tp-tools::-webkit-scrollbar{display:none}
 .op-main .tp-tools>button,.op-main .tp-tools>details{flex:0 0 auto;white-space:nowrap}
 .op-main .tp-day-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scroll-snap-type:x mandatory;margin:14px 0!important;padding:0 0 4px;scrollbar-width:none}
 .op-main .tp-day-tabs::-webkit-scrollbar{display:none}
 .op-main .tp-day-tabs>button{flex:0 0 72%;scroll-snap-align:start}
 .op-main .tp-day-heading{flex-direction:column;align-items:flex-start;gap:8px;margin-bottom:12px}
 .op-main .tp-day-heading h4{font-size:21px!important;margin:2px 0!important}
 .op-main .tp-day-route-tools{flex-wrap:wrap!important;gap:8px 14px}
 .op-main .tp-day-route-tools .tp-btn{padding:8px 12px;font-size:12.5px;white-space:nowrap}
 .op-main .tp-summary>span:first-child:before,.op-main .tp-summary>span:before{display:none}
 .op-main .tp-day-route-tools .tp-text{font-size:12.5px;white-space:nowrap}
 /* Свободни слотове (закуска, настаняване): по-кратки */
 .op-main .tp-free .tp-stop-copy h4{font-size:16px}
 .op-main .tp-free .tp-stop-copy>p{font-size:13px;margin:4px 0 8px!important}
 .op-main .tp-suggest{flex-wrap:wrap;gap:8px 10px!important;padding:10px!important}
 .op-main .tp-suggest>button{flex:0 0 auto!important;width:auto!important;margin-left:auto;padding:8px 14px!important;font-size:13px!important}

 /* Спирка: малка снимка вляво, текст вдясно — целият ден се вижда с превъртане на 1–2 екрана */
 .op-main .tp-stop:not(.tp-free){grid-template-columns:76px minmax(0,1fr)!important;column-gap:12px!important;row-gap:6px!important;align-items:start}
 .op-main .tp-stop:not(.tp-free) .tp-time{grid-column:1 / -1!important;flex-direction:row!important;align-items:baseline!important;gap:8px!important;font-size:19px!important}
 .op-main .tp-stop:not(.tp-free) .tp-stop-image{grid-column:1!important;width:76px!important;height:76px!important}
 .op-main .tp-stop:not(.tp-free) .tp-stop-image img{width:76px!important;height:76px!important;border-radius:10px}
 .op-main .tp-stop:not(.tp-free) .tp-stop-copy{grid-column:2!important}
 .op-main .tp-stop-copy h4{font-size:17px}
 .op-main .tp-stop-details+.tp-stop-actions{margin-top:0!important;align-self:flex-start!important;margin-left:-10px}

 /* Картата е отделен изглед: плаващ бутон я отваря на цял екран */
 /* Скрита извън екрана (а не display:none), за да може картата да подреди маршрута в истинския си размер */
 .op-layout{position:relative}
 body.has-op-plan .op-map:not(.is-open){position:absolute!important;left:-300vw;top:0;width:calc(100vw - 32px);visibility:hidden;pointer-events:none}
 .op-map-fab{display:inline-flex;position:fixed;right:16px;bottom:84px;z-index:60;align-items:center;gap:8px;padding:12px 16px;border:0;border-radius:999px;background:var(--op-green);color:#fff;font-weight:600;font-size:14px;box-shadow:0 8px 24px #1f262240}
 .op-map-fab[hidden]{display:none}
 .op-map-fab svg{width:18px;height:18px}
 .op-map.is-open{display:flex!important;flex-direction:column;position:fixed!important;inset:0;z-index:200;border-radius:0!important;border:0!important;order:0}
 .op-map.is-open #opMap{flex:1;height:auto!important;min-height:0}
 .op-map.is-open .op-map-close{display:inline-flex;position:absolute;top:14px;right:14px;z-index:500;align-items:center;gap:6px;padding:10px 14px;border:0;border-radius:999px;background:#fff;color:var(--op-ink);font-weight:600;box-shadow:0 4px 16px #1f262233}
 body.op-map-lock{overflow:hidden}
}
