/* ValmontAI — Widget for Valmont Web homepage */
#valmontai-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#valmontai-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #0e1d3d, #1a3160);
  color: #fff;
  border: 1.5px solid rgba(245,140,20,.45);
  border-radius: 100px;
  padding: 13px 20px 13px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14,29,61,.28), 0 0 0 4px rgba(245,140,20,.08);
  transition: transform .2s, box-shadow .2s;
}
#valmontai-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14,29,61,.35), 0 0 0 6px rgba(245,140,20,.12); }
#valmontai-toggle svg { width: 20px; height: 20px; color: #ffa53e; }

#valmontai-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 360px;
  max-width: calc(100vw - 28px);
  height: 480px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(14,29,61,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#valmontai-panel[hidden] { display: none !important; }

#valmontai-header {
  background: linear-gradient(140deg, #0e1d3d, #1a3160);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#valmontai-header strong { display: block; font-size: 14.5px; letter-spacing: -.01em; }
#valmontai-header span { display: block; font-size: 11.5px; color: #9db0d6; margin-top: 1px; font-weight: 600; }
#valmontai-close {
  background: rgba(255,255,255,.12);
  border: 0;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

#valmontai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f6f8fc;
}
.valmontai-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.valmontai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e6eaf2; color: #16203a; border-bottom-left-radius: 4px; }
.valmontai-msg.user { align-self: flex-end; background: linear-gradient(90deg, #f58c14, #ffa53e); color: #fff; border-bottom-right-radius: 4px; font-weight: 600; }
.valmontai-msg.bot small { display: block; margin-top: 6px; font-size: 11px; color: #5c6780; }

#valmontai-quick {
  padding: 10px 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid #eef2fa;
  background: #fff;
}
#valmontai-quick button {
  background: #eef2fa;
  border: 1px solid #e6eaf2;
  color: #0e1d3d;
  border-radius: 100px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
#valmontai-quick button:hover { background: #0e1d3d; color: #fff; border-color: #0e1d3d; }

#valmontai-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e6eaf2;
  background: #fff;
}
#valmontai-input {
  flex: 1;
  border: 1px solid #e6eaf2;
  border-radius: 100px;
  padding: 11px 14px;
  font-size: 13.5px;
  outline: none;
}
#valmontai-input:focus { border-color: #f58c14; box-shadow: 0 0 0 3px rgba(245,140,20,.15); }
#valmontai-form button {
  background: linear-gradient(90deg, #f58c14, #ffa53e);
  color: #fff;
  border: 0;
  border-radius: 100px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

#valmontai-footer {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b98b8;
  padding: 8px 0 10px;
  background: #fff;
  border-top: 1px solid #f0f3f8;
}

@media (max-width: 480px) {
  #valmontai-widget { right: 12px; bottom: 12px; }
  #valmontai-panel { width: calc(100vw - 24px); right: -2px; bottom: 62px; height: 72vh; }
  #valmontai-toggle span { display: none; }
  #valmontai-toggle { padding: 14px; border-radius: 50%; width: 52px; height: 52px; justify-content: center; }
}
