/* THE 1 ENERGY - Solar Smart Assistant V28
   Free rule-based assistant: no AI API / no per-message cost. */
:root{
  --the1-ai-cyan:#35e7ff;
  --the1-ai-green:#52f2b2;
  --the1-ai-navy:#071423;
  --the1-ai-panel:#081827;
  --the1-ai-text:#f8fbff;
  --the1-ai-muted:#b8c8d8;
}
.the1-smart-ai{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:10020;
  font-family:"Noto Sans Thai",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--the1-ai-text);
  line-height:1.45;
}
.the1-smart-ai *{box-sizing:border-box}
.the1-smart-ai-launcher{
  position:relative;
  min-width:154px;
  height:58px;
  padding:0 18px 0 13px;
  border:1px solid rgba(125,235,255,.42);
  border-radius:21px;
  background:
    linear-gradient(135deg,rgba(10,35,57,.94),rgba(6,21,37,.92)),
    radial-gradient(circle at 15% 20%,rgba(53,231,255,.32),transparent 42%);
  color:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  box-shadow:0 18px 48px rgba(0,0,0,.40),0 0 28px rgba(53,231,255,.16),inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease;
  overflow:hidden;
}
.the1-smart-ai-launcher::before{
  content:"";
  position:absolute;
  left:12%;right:12%;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.9),transparent);
}
.the1-smart-ai-launcher:hover{
  transform:translateY(-3px) scale(1.025);
  border-color:rgba(82,242,178,.7);
  box-shadow:0 23px 58px rgba(0,0,0,.44),0 0 36px rgba(53,231,255,.24),0 0 20px rgba(82,242,178,.12),inset 0 1px 0 rgba(255,255,255,.16);
}
.the1-smart-ai-orb{
  width:38px;height:38px;flex:0 0 38px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(53,231,255,.22),rgba(82,242,178,.16));
  border:1px solid rgba(166,246,255,.34);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 18px rgba(53,231,255,.24);
  font-size:21px;
}
.the1-smart-ai-launcher-text{display:flex;flex-direction:column;text-align:left;line-height:1.08}
.the1-smart-ai-launcher-text strong{font-size:15px;font-weight:950;letter-spacing:.01em}
.the1-smart-ai-launcher-text small{font-size:10.5px;color:#aeeeff;font-weight:800;margin-top:4px}
.the1-smart-ai-status-dot{
  width:8px;height:8px;border-radius:50%;background:#58f2ae;
  box-shadow:0 0 10px rgba(88,242,174,.85);
  margin-left:auto;
}
.the1-smart-ai-panel{
  position:absolute;
  right:0;
  bottom:70px;
  width:min(410px,calc(100vw - 24px));
  height:min(650px,calc(100vh - 110px));
  min-height:500px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(119,220,255,.25);
  border-radius:28px;
  background:
    radial-gradient(circle at 92% 4%,rgba(53,231,255,.13),transparent 31%),
    radial-gradient(circle at 4% 98%,rgba(82,242,178,.10),transparent 38%),
    linear-gradient(155deg,rgba(7,21,36,.975),rgba(4,14,26,.965));
  box-shadow:0 30px 90px rgba(0,0,0,.58),0 0 46px rgba(53,231,255,.10),inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(26px) saturate(135%);
  -webkit-backdrop-filter:blur(26px) saturate(135%);
  opacity:0;
  transform:translateY(16px) scale(.96);
  transform-origin:bottom right;
  pointer-events:none;
  transition:opacity .2s ease,transform .22s cubic-bezier(.2,.9,.25,1.1);
}
.the1-smart-ai.open .the1-smart-ai-panel{opacity:1;transform:none;pointer-events:auto}
.the1-smart-ai-head{
  display:flex;align-items:center;gap:11px;padding:15px 15px 13px;
  border-bottom:1px solid rgba(124,218,255,.13);
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,0));
}
.the1-smart-ai-avatar{
  width:42px;height:42px;border-radius:15px;display:grid;place-items:center;
  background:linear-gradient(145deg,rgba(53,231,255,.22),rgba(82,242,178,.14));
  border:1px solid rgba(147,237,255,.31);
  box-shadow:0 0 22px rgba(53,231,255,.15),inset 0 1px 0 rgba(255,255,255,.16);
  font-size:22px;
}
.the1-smart-ai-title{min-width:0;flex:1}
.the1-smart-ai-title strong{display:block;font-size:16px;font-weight:950;color:#fff}
.the1-smart-ai-title span{display:flex;align-items:center;gap:6px;font-size:11px;color:#9ed9e7;font-weight:750;margin-top:2px}
.the1-smart-ai-title span::before{content:"";width:7px;height:7px;border-radius:50%;background:#5bf1ad;box-shadow:0 0 8px rgba(91,241,173,.7)}
.the1-smart-ai-close{
  width:36px;height:36px;border:1px solid rgba(144,226,255,.15);border-radius:13px;
  background:rgba(255,255,255,.045);color:#eaf8ff;cursor:pointer;font-size:22px;line-height:1;
  transition:.18s ease;
}
.the1-smart-ai-close:hover{background:rgba(255,255,255,.10);transform:rotate(4deg)}
.the1-smart-ai-messages{
  flex:1;overflow:auto;padding:14px 14px 8px;scroll-behavior:smooth;
  scrollbar-width:thin;scrollbar-color:rgba(80,211,238,.3) transparent;
}
.the1-smart-ai-message{display:flex;margin:0 0 11px;animation:the1AiPop .22s ease both}
@keyframes the1AiPop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.the1-smart-ai-message.user{justify-content:flex-end}
.the1-smart-ai-bubble{
  max-width:88%;padding:11px 13px;border-radius:17px;font-size:13.5px;line-height:1.62;
  white-space:pre-line;word-break:break-word;
}
.the1-smart-ai-message.bot .the1-smart-ai-bubble{
  background:linear-gradient(145deg,rgba(24,48,68,.82),rgba(14,34,52,.80));
  border:1px solid rgba(132,221,255,.16);
  color:#f7fbff;
  border-top-left-radius:6px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.the1-smart-ai-message.user .the1-smart-ai-bubble{
  background:linear-gradient(135deg,rgba(13,108,143,.85),rgba(17,130,99,.76));
  border:1px solid rgba(113,242,218,.23);
  color:#fff;
  border-top-right-radius:6px;
}
.the1-smart-ai-bubble b,.the1-smart-ai-bubble strong{font-weight:950;color:#fff}
.the1-smart-ai-actions{display:flex;flex-wrap:wrap;gap:7px;margin:3px 0 12px 0}
.the1-smart-ai-action{
  min-height:34px;padding:6px 10px;border-radius:12px;
  border:1px solid rgba(100,221,246,.23);
  background:linear-gradient(145deg,rgba(17,52,75,.78),rgba(10,36,55,.78));
  color:#dff9ff;font:inherit;font-size:11.8px;font-weight:850;cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.the1-smart-ai-action:hover{
  transform:translateY(-2px) scale(1.015);
  border-color:rgba(82,242,178,.56);
  background:linear-gradient(145deg,rgba(20,75,93,.86),rgba(12,62,66,.82));
  box-shadow:0 8px 22px rgba(0,0,0,.24),0 0 16px rgba(53,231,255,.10);
}
.the1-smart-ai-action.primary{
  color:#031a20;background:linear-gradient(135deg,#6eeaff,#5af0b0);border-color:rgba(255,255,255,.35);
}
.the1-smart-ai-action.danger{color:#ffe5e5;border-color:rgba(255,106,106,.28);background:rgba(95,27,40,.45)}
.the1-smart-ai-quick{
  padding:0 12px 10px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  overflow:visible;
}
.the1-smart-ai-quick::-webkit-scrollbar{display:none}
.the1-smart-ai-quick button{
  white-space:nowrap;
  flex:0 1 auto;
  max-width:100%;
}
.the1-smart-ai-compose{
  padding:10px 11px 11px;border-top:1px solid rgba(117,218,255,.12);
  background:linear-gradient(180deg,rgba(5,18,31,.55),rgba(5,16,28,.92));
}
.the1-smart-ai-inputrow{
  display:flex;align-items:flex-end;gap:7px;padding:5px;
  border:1px solid rgba(119,220,255,.22);border-radius:17px;
  background:rgba(255,255,255,.045);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.the1-smart-ai-input{
  min-width:0;flex:1;max-height:88px;min-height:38px;resize:none;
  border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;
  color:#fff!important;padding:9px 8px!important;font:inherit!important;font-size:13px!important;line-height:1.45!important;
}
.the1-smart-ai-input::placeholder{color:#7e9aae!important;opacity:1}
.the1-smart-ai-send{
  width:39px;height:39px;flex:0 0 39px;border:0;border-radius:13px;cursor:pointer;
  display:grid;place-items:center;color:#042027;font-size:17px;font-weight:950;
  background:linear-gradient(135deg,#63e9ff,#56efad);
  box-shadow:0 8px 20px rgba(53,231,255,.16);
  transition:.18s ease;
}
.the1-smart-ai-send:hover{transform:translateY(-1px) scale(1.04);box-shadow:0 10px 26px rgba(53,231,255,.23)}
.the1-smart-ai-note{text-align:center;color:#6f8ca0;font-size:9.8px;margin-top:6px}
.the1-smart-ai-typing{display:inline-flex;align-items:center;gap:4px;min-width:48px}
.the1-smart-ai-typing i{width:6px;height:6px;border-radius:50%;background:#8beafa;animation:the1AiTyping 1s infinite ease-in-out}
.the1-smart-ai-typing i:nth-child(2){animation-delay:.12s}.the1-smart-ai-typing i:nth-child(3){animation-delay:.24s}
@keyframes the1AiTyping{0%,70%,100%{transform:translateY(0);opacity:.45}35%{transform:translateY(-4px);opacity:1}}
.the1-smart-ai-lead{
  margin-top:8px;padding:10px;border-radius:15px;border:1px solid rgba(111,231,207,.18);
  background:rgba(8,45,48,.35);
}
.the1-smart-ai-lead input,.the1-smart-ai-lead select{
  width:100%;height:39px;margin:0 0 7px;padding:0 10px;border-radius:11px!important;
  border:1px solid rgba(123,220,241,.18)!important;background:rgba(255,255,255,.055)!important;
  color:#fff!important;font:inherit!important;font-size:12px!important;outline:0!important;
}
.the1-smart-ai-lead select option{color:#111;background:#fff}
.the1-smart-ai-lead-status{font-size:11px;color:#9fdacb;margin-top:7px;min-height:16px}
.the1-smart-ai-linkcard{
  margin-top:8px;padding:10px 11px;border-radius:13px;background:rgba(255,255,255,.035);
  border-left:3px solid var(--the1-ai-cyan);color:#d8eaf2;font-size:11.5px;
}
@media(max-width:680px){
  .the1-smart-ai{right:12px;bottom:12px}
  .the1-smart-ai-launcher{min-width:58px;width:58px;height:58px;padding:0;border-radius:19px;justify-content:center}
  .the1-smart-ai-launcher-text,.the1-smart-ai-status-dot{display:none}
  .the1-smart-ai-orb{width:42px;height:42px;flex-basis:42px}
  .the1-smart-ai-panel{right:0;bottom:68px;width:calc(100vw - 24px);height:min(650px,calc(100dvh - 96px));min-height:0;border-radius:24px}
  .the1-smart-ai-head{padding:13px}
  .the1-smart-ai-quick{gap:7px;padding:0 10px 10px}
  .the1-smart-ai-quick button{white-space:normal;text-align:center;line-height:1.25;min-height:38px}
}
@media print{.the1-smart-ai{display:none!important}}
