/* ============================================================
   CHAT WIDGET  (assets/js/chat-widget.js injects the DOM; this
   file only styles it. Class prefix i360chat- avoids collisions
   with globals.css.)
   ============================================================ */
.i360chat-launcher{
  position:fixed; z-index:120; right:20px; bottom:20px;
  width:56px; height:56px; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(96deg,var(--amber),var(--magenta) 55%,var(--azure));
  box-shadow:0 10px 34px rgba(224,71,158,.34); border:0; cursor:pointer;
  transition:transform .3s var(--ease), box-shadow .3s var(--ease);
}
.i360chat-launcher:hover{ transform:translateY(-2px); box-shadow:0 14px 40px rgba(224,71,158,.44); }
.i360chat-launcher svg{ width:24px; height:24px; color:var(--void); }
.i360chat-dot{
  position:absolute; top:-1px; right:-1px; width:13px; height:13px; border-radius:50%;
  background:var(--ember); border:2px solid var(--void); animation:i360chat-pulse 1.8s ease-out infinite;
}
.i360chat-launcher.open .i360chat-dot{ display:none; }
@keyframes i360chat-pulse{ 0%{ box-shadow:0 0 0 0 rgba(242,100,60,.55);} 70%{ box-shadow:0 0 0 8px rgba(242,100,60,0);} 100%{ box-shadow:0 0 0 0 rgba(242,100,60,0);} }

.i360chat-panel{
  position:fixed; z-index:121; right:20px; bottom:88px;
  width:min(340px, calc(100vw - 2 * var(--gut))); max-height:min(70vh, 520px);
  background:rgba(8,12,22,.96); backdrop-filter:blur(16px) saturate(140%);
  border:1px solid var(--line-2); border-radius:16px;
  display:flex; flex-direction:column; overflow:hidden;
  opacity:0; transform:translateY(16px) scale(.98); pointer-events:none;
  transition:opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow:0 24px 60px rgba(0,0,0,.5);
}
.i360chat-panel.open{ opacity:1; transform:none; pointer-events:auto; }

.i360chat-head{
  display:flex; align-items:center; gap:10px; padding:14px 14px 14px 16px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(96deg, rgba(247,160,59,.14), rgba(224,71,158,.14) 55%, rgba(30,155,255,.14));
}
.i360chat-head svg{ width:30px; height:17px; flex:none; }
.i360chat-head-txt{ display:grid; gap:1px; }
.i360chat-head-txt b{ font-size:12.5px; letter-spacing:.03em; }
.i360chat-head-txt span{ font-family:var(--mono); font-size:8.5px; color:var(--slate); letter-spacing:.14em; text-transform:uppercase; }
.i360chat-close-x{
  margin-left:auto; width:26px; height:26px; border-radius:50%; display:grid; place-items:center;
  color:var(--slate); flex:none;
}
.i360chat-close-x:hover{ color:var(--ice); background:rgba(255,255,255,.06); }
.i360chat-close-x svg{ width:13px; height:13px; }

.i360chat-body{
  flex:1; overflow-y:auto; padding:16px; display:grid; gap:12px; align-content:start;
}
.i360chat-msg{ display:grid; gap:4px; max-width:90%; }
.i360chat-msg.bot{ justify-self:start; }
.i360chat-msg.user{ justify-self:end; }
.i360chat-msg .bubble{ padding:10px 13px; border-radius:13px; font-size:13.5px; line-height:1.5; }
.i360chat-msg.bot .bubble{ background:var(--void-2); border:1px solid var(--line); color:var(--ice); border-bottom-left-radius:3px; }
.i360chat-msg.user .bubble{
  background:linear-gradient(96deg,var(--amber),var(--magenta) 55%,var(--azure));
  color:var(--void); font-weight:600; border-bottom-right-radius:3px;
}
.i360chat-msg time{ font-family:var(--mono); font-size:8.5px; color:var(--slate); letter-spacing:.08em; padding:0 3px; }
.i360chat-msg.user time{ justify-self:end; }

.i360chat-opts{ display:grid; gap:8px; margin-top:2px; }
.i360chat-opt{
  text-align:left; padding:11px 14px; border:1px solid var(--line-2); border-radius:10px;
  font-size:13px; color:var(--ice); background:transparent; transition:border-color .25s, background .25s;
}
.i360chat-opt:hover{ border-color:var(--azure); background:var(--void-2); }

.i360chat-form{ display:grid; gap:10px; padding-top:2px; }
.i360chat-field{ display:grid; gap:5px; }
.i360chat-field label{ font-family:var(--mono); font-size:8.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--slate); }
.i360chat-field input{
  background:transparent; border:0; border-bottom:1px solid var(--line-2); border-radius:0;
  padding:8px 2px; color:var(--ice); font-family:var(--display); font-size:14px; width:100%;
}
.i360chat-field input:focus{ outline:none; border-bottom-color:var(--azure); }
.i360chat-field input::placeholder{ color:var(--slate-dk); }
.i360chat-phone-row{ display:flex; gap:8px; align-items:center; }
.i360chat-phone-row select{
  flex:none; width:118px; background:transparent; border:0; border-bottom:1px solid var(--line-2); border-radius:0;
  padding:8px 4px 8px 0; color:var(--ice); font-family:var(--display); font-size:13px; appearance:none; cursor:pointer;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.i360chat-phone-row select:focus{ outline:none; border-bottom-color:var(--azure); }
.i360chat-phone-row select option{ background:#070A12; color:var(--ice); }
.i360chat-phone-row input{ flex:1; min-width:0; }
.i360chat-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.i360chat-form button{ margin-top:4px; width:100%; justify-content:center; }
.i360chat-err{ font-family:var(--mono); font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--ember); margin:0; }

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

@media (prefers-reduced-motion:reduce){
  .i360chat-panel{ transition:opacity .15s linear; }
  .i360chat-dot{ animation:none; }
}
