/* i Map — «سفرِ گروهی»: فهرست و دعوت‌ها، ساختن و ویرایشِ سفر، ماشین‌ها و دعوتِ همسفر (grouphub.css) — پیشوندِ gh-
   کیتِ مشترک در group.css است؛ اینجا فقط چیزهای همین دو نما. حرکت فقط transform/opacity و فقط در جوابِ کاربر. */
#grp-modal .gh-hub [hidden],#grp-modal .gh-edit [hidden]{display:none!important}
.gh-grow{flex:1;min-width:0}
.gh-note{margin:6px 2px 0;font-size:13px;line-height:1.75;color:var(--g-sub)}
.gh-foot{margin-top:18px}
#grp-modal .gt-err .gt-btn{flex:none;min-height:44px}

/* ---- هاب ---- */
.gh-hub .gt-icon[aria-busy="true"]{pointer-events:none}
.gh-hub .gt-icon[aria-busy="true"] .msi{animation:ghSpin .9s linear infinite}
@keyframes ghSpin{to{transform:rotate(-360deg)}}
.gh-invite{display:flex;flex-direction:column;gap:12px;padding:14px;margin-bottom:10px;border:1px solid var(--g-line);
  border-radius:16px;background:var(--g-card)}
.gh-inv-head{display:flex;align-items:flex-start;gap:12px}
.gh-inv-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gh-inv-tx b{font-size:14.5px;font-weight:800;line-height:1.6;overflow-wrap:anywhere}
.gh-inv-tx .gt-meta{font-size:13px;line-height:1.6;color:var(--g-sub)}
.gh-inv-at{display:inline-flex;align-items:center;gap:4px;margin-top:2px;font-size:13px;font-weight:700;line-height:1.6;
  color:var(--primary-press,var(--primary))}
.gh-inv-at .msi{font-size:17px}
.gh-link{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;min-height:44px;padding:0 10px;border:0;
  border-radius:12px;background:transparent;color:var(--primary);font:inherit;font-weight:800;font-size:13.5px;cursor:pointer;
  transition:background .15s var(--ease)}
.gh-link:hover{background:var(--tint)}
.gh-link .msi{font-size:20px}
.gh-invite .gh-link{margin:-6px -10px -8px}
.gh-link.gh-more{display:flex;width:100%;justify-content:center;margin-top:4px}
.gh-trip .gt-faces{min-width:68px}
.gt-av.gh-plus{direction:ltr;background:var(--fill-2);color:var(--g-sub)}

/* ---- ویرایش: نام و مسیر ---- */
.gh-namerow{display:flex;gap:8px;align-items:stretch}
.gh-namerow .input{flex:1;min-width:0}
.gh-namerow .gt-btn{flex:none}
.gh-route{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--g-line);border-radius:16px;
  background:var(--g-card)}
.gh-route-ic{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:var(--tint);
  color:var(--primary)}
.gh-route-ic .msi{font-size:22px}
.gh-route-tx{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.5}
.gh-route-tx b{font-size:14.5px;font-weight:800;overflow-wrap:anywhere}
.gh-route-tx span{font-size:13px;color:var(--g-sub)}
.gh-route.gh-route-none{flex-direction:column;align-items:stretch;gap:10px;padding:16px 14px;text-align:center;border-style:dashed}
.gh-route-box > .gh-link{margin-top:4px}
.gh-hint{font-size:13px;line-height:1.7;color:var(--g-sub)}
.gh-alt{display:flex;flex-direction:column;gap:10px;margin-top:10px;padding:12px 14px;border-radius:16px;background:var(--g-warn-soft)}
.gh-alt .gh-hint{color:var(--g-ink)}
.gh-create-box{margin-top:20px}
#grp-modal .gt-btn.gh-wait{color:var(--g-sub);border-style:dashed}

/* ---- ردیف‌های ماشین و همسفر ---- */
.gt-row.gh-static{cursor:default}
.gt-row.gh-static:hover{background:transparent}
.gt-row.gh-static.gh-on,.gt-row.gh-static.gh-on:hover{background:var(--tint)}
.gh-cars .gt-end{gap:2px}
.gt-btn.gh-sure{min-height:44px;padding:0 12px;font-size:13.5px;animation:ghPop .18s var(--ease) both}
.gh-gone .gt-ttl{color:var(--g-sub);font-weight:700}
.gh-gone .gt-av{filter:grayscale(1);opacity:.7}
.gh-me{font-size:13px;font-weight:700;color:var(--g-sub)}
#grp-modal .gt-chip.gh-nodot::before{display:none}
.gh-carbox,.gh-pickbox{margin-top:6px}

/* ---- فرمِ ماشین و انتخابگرِ همسفر (قابِ خط‌دار) ---- */
.gh-carform,.gh-pick{display:flex;flex-direction:column;gap:12px;margin:0;padding:14px;border:1px solid var(--g-line);
  border-radius:16px;background:var(--g-card);animation:ghIn .2s var(--ease) both}
@keyframes ghIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes ghPop{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}
.gh-form-ttl{display:flex;align-items:center;gap:8px;min-height:32px;font-size:14.5px;font-weight:800}
.gh-pick .gh-form-ttl{margin:-6px 0 -4px -6px}
.gh-fld{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
.gh-lbl{font-size:13px;font-weight:800;color:var(--g-ink)}
.gh-lbl small{font-size:13px;font-weight:600;color:var(--g-sub)}
.gh-2col{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:10px}
.gh-carform select.input{cursor:pointer}

/* رنگ‌ها: هدفِ ۴۴px، دایرهٔ رنگی داخلش؛ انتخاب‌شده حلقه و تیک می‌گیرد */
.gh-sws{display:flex;flex-wrap:wrap;gap:2px;margin:0 -4px}
.gh-sw{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;
  background:transparent;cursor:pointer}
.gh-sw::before{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--car);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.14);transition:transform .15s var(--ease)}
.gh-sw .msi{position:relative;font-size:18px;color:#fff;opacity:0;transform:scale(.5);
  transition:opacity .15s var(--ease),transform .2s var(--ease-spring)}
.gh-sw:hover::before{transform:scale(1.06)}
.gh-sw[aria-checked="true"]::before{transform:scale(1.08);box-shadow:0 0 0 2px var(--g-card),0 0 0 4px var(--car)}
.gh-sw[aria-checked="true"] .msi{opacity:1;transform:none}
.gh-sw:active::before{transform:scale(.92)}

/* انتخابگر: چیپِ انتخاب‌شده‌ها، جست‌وجو، نتیجه‌ها */
.gh-chips{display:flex;flex-wrap:wrap;gap:6px}
.gh-chips:empty{display:none}
.gh-pchip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:44px;padding-block:4px;padding-inline:4px 10px;
  border:1px solid var(--g-line);border-radius:999px;background:var(--tint);color:var(--g-ink);font:inherit;font-size:13.5px;
  font-weight:700;cursor:pointer;animation:ghPop .18s var(--ease) both}
.gh-pchip:hover{border-color:var(--outline-strong)}
.gh-pname{min-width:0;line-height:1.5;overflow-wrap:anywhere}
.gh-pchip > .msi{font-size:18px;color:var(--g-sub)}
.gh-qbox{position:relative}
.gh-qbox > .msi{position:absolute;top:50%;inset-inline-start:12px;transform:translateY(-50%);font-size:20px;color:var(--g-sub);
  pointer-events:none}
.gh-qbox .input{padding-inline-start:42px}
.gh-cands{max-height:320px;overflow-y:auto;overscroll-behavior:contain;margin:0 -6px;padding:0 6px}
.gh-cands .gt-err{margin:4px 0}
.gt-row.gh-cand{min-height:52px}
.gh-check{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:50%;border:2px solid var(--outline-strong);
  color:var(--on-primary);transition:background .15s var(--ease),border-color .15s var(--ease),transform .15s var(--ease)}
.gh-check .msi{font-size:18px;opacity:0;transform:scale(.5);transition:opacity .15s var(--ease),transform .2s var(--ease-spring)}
.gt-row.gh-cand[aria-pressed="true"]{background:var(--tint)}
.gt-row.gh-cand[aria-pressed="true"] .gh-check{background:var(--primary);border-color:var(--primary)}
.gt-row.gh-cand[aria-pressed="true"] .gh-check .msi{opacity:1;transform:none}
.gt-row.gh-cand:active .gh-check{transform:scale(.9)}

@media (prefers-reduced-motion:reduce){
  .gh-carform,.gh-pick,.gh-pchip,.gt-btn.gh-sure,.gh-hub .gt-icon[aria-busy="true"] .msi{animation:none}
  .gh-sw::before,.gh-sw .msi,.gh-check,.gh-check .msi,.gh-link{transition:none}
}

/* ---- ویرایش/حذفِ همسفر (سرگروه): دکمهٔ مدادی ته ردیف، پنلِ زیرِ ردیف با ماشین‌ها و برداشتن ---- */
.gh-mrow{border-radius:14px;transition:background .15s var(--ease)}
.gh-mrow.open{background:var(--fill-1)}
.gh-mrow .gt-row.gh-static .gt-end{gap:4px}
.gt-icon.gh-medit{width:44px;height:44px;color:var(--g-sub)}
.gt-icon.gh-medit:hover,.gt-icon.gh-medit[aria-expanded="true"]{color:var(--primary);background:var(--tint)}
.gh-mpanel{padding:2px 12px 12px;animation:ghPop .18s var(--ease) both}
.gh-mlbl{margin:4px 2px 8px;font-size:13px;color:var(--g-sub)}
.gh-mcars{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.gh-mcar{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px 0 14px;border-radius:14px;border:1px solid var(--g-line);
  background:var(--g-card);color:var(--g-ink);font:inherit;font-weight:700;font-size:13.5px;cursor:pointer;transition:transform .12s var(--ease)}
.gh-mcar .gt-car-dot{width:26px;height:26px;border-radius:8px;font-size:13px}
.gh-mcar[aria-pressed="true"]{border-color:var(--car,var(--primary));box-shadow:inset 0 0 0 1.5px var(--car,var(--primary));
  background:color-mix(in srgb,var(--car,var(--primary)) 10%,var(--g-card))}
.gh-mcar:active{transform:scale(.97)}
.gh-mpanel .gt-btns .gt-btn{flex:0 1 auto}
@media (prefers-reduced-motion:reduce){.gh-mpanel{animation:none}.gh-mcar{transition:none}}

/* ---- رأی‌گیریِ مسیر در ساختن/ویرایش: گزینه‌ها با رنگِ منبعشان (tm-ours/google/balad از tripmode.css)، مهلت، توضیح ---- */
.gh-poll{display:flex;flex-direction:column;gap:12px;margin-top:10px;padding:14px;border:1.5px solid var(--primary);border-radius:18px;background:var(--tint)}
.gh-poll-h{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:900}
.gh-poll-h .msi{font-size:22px;color:var(--primary-press)}
.gh-popts{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.gh-popts.gh-one{margin-top:8px}
.gh-popt{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 12px;border-radius:14px;background:var(--g-card);
  box-shadow:inset -3px 0 0 var(--sc)}
.gh-popt-n{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--sc);color:#fff;font-size:14px;font-weight:900}
html.dark .gh-popt-n{color:#0b1416}
.gh-popt>span{flex:1;min-width:0;display:flex;flex-direction:column}
.gh-popt>span>b{display:flex;flex-wrap:wrap;align-items:center;font-size:14.5px;font-weight:800;font-variant-numeric:tabular-nums}
.gh-popt small{display:flex;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--g-sub);font-variant-numeric:tabular-nums}
.gh-dl{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.gh-dl>span{font-size:13.5px;font-weight:800}
.gh-dl-c{display:flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:16px;background:var(--g-card)}
.gh-dl-c button{min-height:44px;padding:0 14px;border:0;border-radius:12px;background:transparent;color:var(--g-sub);
  font:700 13.5px/1 Vazirmatn,Tahoma,sans-serif;cursor:pointer;transition:background-color .15s ease,color .15s ease}
.gh-dl-c button[aria-checked="true"]{background:var(--primary);color:var(--on-primary,#fff)}
.gh-dl-c button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.gh-poll .gh-hint{margin:0}
.gh-poll .gh-link{margin:-4px -10px -6px}
@media (prefers-reduced-motion:reduce){.gh-dl-c button{transition:none}}

/* ---- زمانِ حرکت و مقصدها (ویرایشِ سفر) ---- */
.gh-dep{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--g-line);border-radius:16px;background:var(--g-card)}
.gh-dep>.msi{flex:none;font-size:24px;color:var(--primary-press)}
.gh-dep-t{flex:1;min-width:0;display:flex;flex-direction:column}
.gh-dep-t b{font-size:14.5px;font-weight:800}
.gh-dep-t small{font-size:13px;line-height:1.65;color:var(--g-sub)}
.gh-dep-box>.gh-link{margin-top:4px}
.gh-legs-later{margin:6px 0 0}
.gh-legs{position:relative;display:grid;gap:8px;margin:0;padding:0;list-style:none}
.gh-legs::before{content:"";position:absolute;inset-inline-start:21px;top:20px;bottom:20px;width:2px;background:var(--g-line)}
.gh-leg{position:relative;display:flex;align-items:flex-start;gap:12px;padding:10px 12px;border-radius:16px;background:var(--g-card);border:1px solid var(--g-line)}
.gh-leg.now{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.gh-leg.gone{opacity:.62}
.gh-leg-n{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--primary);
  color:var(--on-primary,#fff);font-size:14px;font-weight:900}
.gh-leg.gone .gh-leg-n{background:var(--g-sub)}
.gh-leg-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.gh-leg-t>b{font-size:15px;font-weight:900;line-height:1.5}
.gh-leg-t>small{display:flex;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--g-sub);font-variant-numeric:tabular-nums}
.gh-stay{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.gh-stay>span{font-size:13px;font-weight:800}
.gh-stay .gh-dl-c{background:var(--fill-1)}
.gh-stay .gh-dl-c button{min-height:44px;padding:0 12px;font-size:13px}
.gh-stay .gh-dl-c button[disabled]{opacity:.5;cursor:default}
.gh-leg-rm{flex:none;width:44px;height:44px;color:var(--g-sub)}
.gh-leg-rm.gtv-armed{color:var(--danger,#c62828)}
.gh-legs-box>.gt-btn{margin-top:10px}
.gh-legnew{margin-top:10px}
.gh-legnew .gt-btns{margin-top:2px}
