/* Asistente DeAutos: launcher, buy/sell popup, chat. Uses the site's tokens from styles.css. */
.asst-launcher{position:fixed; right:18px; bottom:18px; z-index:70; display:inline-flex; align-items:center; gap:8px; padding:11px 16px;
  border:0; border-radius:999px; background:var(--ar-blue-deep); color:#fff; font-weight:700; font-size:14px; cursor:pointer; box-shadow:0 8px 24px rgba(11,42,74,.25)}
.asst-launcher:hover{background:#143862}
.asst-launcher:focus-visible, .asst-panel :focus-visible{outline:3px solid var(--ar-yellow); outline-offset:2px}
body.has-compare .asst-launcher{bottom:88px}
html[dir="rtl"] .asst-launcher{right:auto; left:18px}

.asst-panel{position:fixed; right:18px; bottom:18px; z-index:80; width:min(410px, calc(100vw - 24px)); height:min(640px, calc(100vh - 36px));
  display:flex; flex-direction:column; background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:0 20px 60px rgba(11,42,74,.3); overflow:hidden}
.asst-panel[hidden]{display:none}
html[dir="rtl"] .asst-panel{right:auto; left:18px}
.asst-head{display:flex; align-items:center; gap:6px; padding:12px 12px 12px 16px; background:var(--ar-blue-deep); color:#fff}
.asst-title{flex:1; display:flex; flex-direction:column; line-height:1.2}
.asst-title span{font-size:12px; opacity:.8}
.asst-icon-btn{width:34px; height:34px; border:0; border-radius:10px; background:transparent; color:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer}
.asst-icon-btn:hover{background:rgba(255,255,255,.12)}
.asst-body{flex:1; overflow-y:auto; padding:14px; background:var(--bg); display:flex; flex-direction:column; gap:10px}

.asst-step{background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px; text-align:center}
.asst-step h2, .asst-form h2{margin:0 0 14px; font-size:19px; color:var(--ar-blue-deep)}
.asst-choices{display:flex; flex-direction:column; gap:10px}
.asst-fine, .asst-note{margin:12px 0 0; font-size:13px; color:var(--muted)}
.asst-note{margin:0 0 12px; text-align:left}

.asst-msg{max-width:88%; padding:10px 13px; border-radius:14px; font-size:14.5px; line-height:1.45; overflow-wrap:anywhere}
.asst-bot{align-self:flex-start; background:#fff; border:1px solid var(--line); border-bottom-left-radius:4px}
.asst-me{align-self:flex-end; background:var(--ar-blue-deep); color:#fff; border-bottom-right-radius:4px}
.asst-typing{display:inline-flex; align-items:center; gap:4px; color:var(--muted)}
.asst-typing span{width:6px; height:6px; border-radius:50%; background:var(--ar-blue); animation:asst-dot 1s infinite ease-in-out}
.asst-typing span:nth-child(2){animation-delay:.15s} .asst-typing span:nth-child(3){animation-delay:.3s}
.asst-typing em{font-style:normal; font-size:13px; margin-left:4px}
@keyframes asst-dot{0%,80%,100%{opacity:.3; transform:translateY(0)} 40%{opacity:1; transform:translateY(-3px)}}
@media (prefers-reduced-motion: reduce){ .asst-typing span{animation:none} }

.asst-cards{display:flex; flex-direction:column; gap:10px}
.asst-card{display:flex; gap:10px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:10px}
.asst-card img, .asst-card-noimg{width:104px; height:78px; flex:0 0 104px; object-fit:cover; border-radius:10px; background:var(--bg)}
.asst-card-noimg{display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--muted)}
.asst-card-body{display:flex; flex-direction:column; gap:2px; min-width:0; font-size:13px}
.asst-card-body strong{color:var(--ar-blue-deep); font-size:14px}
.asst-card-body small{color:var(--muted)}
.asst-card-body p{margin:4px 0 0; font-size:13px}
.asst-price{font-size:16px; color:var(--text)}
.asst-card-actions{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.asst-card-actions .btn-sm{padding:7px 10px; font-size:13px}

.asst-quick{display:flex; flex-wrap:wrap; gap:6px}
.asst-chip{border:1px solid var(--ar-blue); background:#fff; color:var(--ar-blue-deep); border-radius:999px; padding:7px 12px; font-size:13px; font-weight:600; cursor:pointer}
.asst-chip:hover{background:#E2ECF7}
.asst-confirm{background:#FFF7E6; border:1px solid #F8DDA4; border-radius:14px; padding:12px 14px; font-size:13.5px}
.asst-confirm ul{margin:6px 0 0; padding-left:18px}
.asst-switch{font-size:12.5px; color:var(--muted); text-align:center; margin-top:4px}
.asst-link{border:0; background:none; color:var(--ar-blue-2); font-weight:600; cursor:pointer; padding:2px; font-size:12.5px}

.asst-input{display:flex; gap:8px; padding:10px; border-top:1px solid var(--line); background:#fff}
.asst-input[hidden]{display:none}
.asst-input input{flex:1; min-width:0; border:1px solid var(--line); border-radius:12px; padding:11px 12px; font-size:15px}
.asst-send{width:44px; border:0; border-radius:12px; background:var(--ar-blue-deep); color:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer}

.asst-form{background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:10px; text-align:left}
.asst-form label{display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--muted); font-weight:600; min-width:0}
.asst-form input, .asst-form select{border:1px solid var(--line); border-radius:10px; padding:9px 10px; font-size:14px; color:var(--text); background:#fff; width:100%}
.asst-row{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.asst-check{flex-direction:row !important; align-items:flex-start; gap:8px !important; font-weight:500 !important}
.asst-check input{width:auto}
.asst-err{margin:0; color:#A0181D; font-size:13px}
.asst-more{margin-top:12px; text-align:left}
.asst-more summary{cursor:pointer; font-weight:700; color:var(--ar-blue-deep); padding:6px 0}
.asst-fallback .asst-form{margin-top:4px}

@media (max-width: 560px){
  .asst-panel{right:0; left:0; bottom:0; width:100vw; height:100dvh; max-height:100dvh; border-radius:0; border:0}
  .asst-launcher{right:12px; bottom:12px; padding:10px 14px}
  .asst-launcher span{display:none}
  body.asst-is-open{overflow:hidden}
  .asst-row{grid-template-columns:1fr}
}
.asst-icon-btn[hidden]{display:none}
/* The buy/sell and new/used steps are short: the panel fits them. */
.asst-panel.asst-compact{height:auto}
.asst-panel.asst-compact .asst-body{flex:0 0 auto}
@media (max-width: 560px){ .asst-panel.asst-compact{height:auto; top:auto; border-radius:18px 18px 0 0} }
.asst-panel[dir="rtl"] .asst-back svg, .asst-panel[dir="rtl"] .asst-send svg{transform:scaleX(-1)}

/* Phones: the window does not open by itself; a short tip appears by the launcher */
.asst-launcher.asst-nudge::after{content:attr(data-tip); position:absolute; bottom:calc(100% + 10px); right:0; white-space:nowrap; background:#fff; color:#0B2A4A; font-size:13.5px; font-weight:700; padding:8px 12px; border-radius:12px; box-shadow:0 8px 24px rgba(11,42,74,.22); animation:asstTip .3s ease}
html[dir="rtl"] .asst-launcher.asst-nudge::after{right:auto; left:0}
.asst-launcher.asst-nudge{animation:asstPulse 1.6s ease 3}
@keyframes asstTip{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none}}
@keyframes asstPulse{0%,100%{box-shadow:0 8px 24px rgba(11,42,74,.3)} 50%{box-shadow:0 0 0 8px rgba(252,191,73,.45)}}
@media (prefers-reduced-motion: reduce){.asst-launcher.asst-nudge, .asst-launcher.asst-nudge::after{animation:none}}
