/* Assistente tratte — widget di ricerca rapida offerte/tratte (antasi.ch) */
.at-launcher{
  position:fixed; right:20px; bottom:20px; z-index:400;
  width:60px; height:60px; border-radius:50%;
  background:var(--accent); color:var(--navy-dark);
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 26px rgba(0,0,0,.28);
  transition:transform .2s ease, box-shadow .2s ease;
}
.at-launcher:hover{ transform:translateY(-4px) scale(1.05); box-shadow:0 16px 34px rgba(0,0,0,.34); }
.at-launcher svg{ width:26px; height:26px; }
.at-launcher .at-launcher-ring{
  position:absolute; inset:0; border-radius:50%; border:2px solid var(--accent);
  animation:atPing 1.8s ease-out 2; opacity:0;
}
@keyframes atPing{
  0%{ transform:scale(1); opacity:.55; }
  100%{ transform:scale(1.6); opacity:0; }
}
.at-launcher[hidden], .at-panel[hidden]{ display:none !important; }

.at-panel{
  position:fixed; right:20px; bottom:90px; z-index:401;
  width:380px; max-width:calc(100vw - 32px);
  max-height:min(600px, calc(100vh - 120px));
  background:var(--card); border-radius:20px;
  box-shadow:0 24px 60px rgba(0,0,0,.32);
  display:flex; flex-direction:column; overflow:hidden;
  font-family:inherit;
}
.at-panel-head{
  background:var(--navy-dark); color:var(--white);
  padding:18px 18px 16px; position:relative; flex-shrink:0;
}
.at-panel-title{ font-size:1.05rem; font-weight:700; margin:0 30px 4px 0; }
.at-panel-sub{ font-size:.84rem; color:var(--ice); margin:0; line-height:1.35; }
.at-panel-close{
  position:absolute; top:14px; right:14px; width:28px; height:28px; border-radius:50%;
  background:rgba(255,255,255,.14); border:none; color:var(--white); cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:16px; line-height:1;
  transition:background .18s ease;
}
.at-panel-close:hover{ background:rgba(255,255,255,.26); }

.at-panel-body{ padding:16px 18px 18px; overflow-y:auto; flex:1; }

.at-search-row{ display:flex; gap:8px; margin-bottom:12px; }
.at-search-input{
  flex:1; padding:11px 14px; border-radius:999px; border:1.5px solid var(--ice);
  font-size:.92rem; color:var(--text); outline:none; min-width:0;
  transition:border-color .18s ease;
}
.at-search-input:focus{ border-color:var(--accent); }
.at-search-btn{
  flex-shrink:0; width:42px; height:42px; border-radius:50%; border:none;
  background:var(--accent); color:var(--navy-dark); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .18s ease;
}
.at-search-btn:hover{ background:#d99327; }
.at-search-btn svg{ width:18px; height:18px; }

.at-chip-row{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.at-chip{
  border:1.5px solid var(--ice); background:var(--white); color:var(--navy-dark);
  border-radius:999px; padding:6px 12px; font-size:.78rem; font-weight:600;
  cursor:pointer; transition:background .15s ease, border-color .15s ease;
}
.at-chip:hover{ background:var(--bg); border-color:var(--accent); }

.at-results{ display:flex; flex-direction:column; gap:10px; }
.at-result-heading{
  font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700;
  color:var(--muted); margin:6px 0 2px;
}
.at-result-card{
  border:1.5px solid var(--ice); border-radius:14px; padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  text-decoration:none; color:inherit;
  transition:border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.at-result-card:hover{ border-color:var(--accent); transform:translateY(-2px); box-shadow:0 10px 22px rgba(0,0,0,.1); }
.at-result-info{ min-width:0; }
.at-result-route{ font-weight:700; color:var(--navy-dark); font-size:.94rem; }
.at-result-note{ font-size:.78rem; color:var(--muted); margin-top:2px; }
.at-result-price{ font-weight:700; color:var(--accent); font-size:.9rem; white-space:nowrap; flex-shrink:0; }
.at-result-badge{
  display:inline-block; font-size:.68rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; color:#31713d; background:#e4f2e6; border-radius:999px;
  padding:2px 8px; margin-left:8px; vertical-align:middle;
}

.at-fallback{ font-size:.88rem; color:var(--text); line-height:1.5; }
.at-fallback p{ margin:0 0 12px; }
.at-fallback-actions{ display:flex; flex-direction:column; gap:8px; }
.at-fallback-actions a{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:999px; font-weight:700; font-size:.88rem;
  text-decoration:none; border:1.5px solid var(--ice); color:var(--navy-dark);
  transition:border-color .18s ease, background .18s ease;
}
.at-fallback-actions a:hover{ border-color:var(--accent); background:var(--bg); }
.at-fallback-actions a.at-primary{ background:var(--accent); border-color:var(--accent); }
.at-fallback-actions a.at-primary:hover{ background:#d99327; }

.at-footnote{ font-size:.7rem; color:var(--muted); text-align:center; margin-top:14px; }

@media (max-width:480px){
  .at-panel{ right:16px; left:16px; width:auto; bottom:84px; }
  .at-launcher{ right:16px; bottom:16px; }
}
