/* NOMAS AI Assistant — floating button + side drawer */
#nomas-ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 10010;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: none; border-radius: 999px;
  background: linear-gradient(135deg, #0066cc, #003366);
  color: #fff; font: 600 14px/1 'Roboto', sans-serif;
  cursor: pointer; box-shadow: 0 6px 20px rgba(0, 51, 102, 0.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
#nomas-ai-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 51, 102, 0.45); }
#nomas-ai-fab span[aria-hidden="true"] { font-size: 18px; line-height: 1; }
.nomas-ai-fab-label { font-size: 13px; letter-spacing: .2px; }

#nomas-ai-drawer {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: min(440px, 100vw);
  background: #fff; color: #1a2332;
  z-index: 9999; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.18);
  transform: translateX(100%); transition: transform .25s ease;
  font: 14px/1.45 'Roboto', system-ui, sans-serif;
}
#nomas-ai-drawer.open { transform: translateX(0); }

.nomas-ai-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #e6ebf2;
  background: linear-gradient(135deg, #003366, #0066cc); color: #fff;
}
.nomas-ai-title { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.nomas-ai-pill {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  background: rgba(255,255,255,0.22); border-radius: 999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.nomas-ai-actions { display: flex; align-items: center; gap: 6px; }
.nomas-ai-quota { font-size: 11px; opacity: .9; margin-right: 4px; }
.nomas-ai-ico {
  width: 28px; height: 28px; border: none; border-radius: 6px;
  background: rgba(255,255,255,0.15); color: #fff; cursor: pointer;
  font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.nomas-ai-ico:hover { background: rgba(255,255,255,0.3); }

.nomas-ai-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; background: #f7f9fc; }
.nomas-ai-msg { display: flex; margin-bottom: 10px; }
.nomas-ai-user { justify-content: flex-end; }
.nomas-ai-bubble {
  max-width: 88%; padding: 9px 13px; border-radius: 14px;
  white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.nomas-ai-user .nomas-ai-bubble { background: #003366; color: #fff; border-bottom-right-radius: 4px; }
.nomas-ai-assistant .nomas-ai-bubble { background: #fff; color: #1a2332; border: 1px solid #e6ebf2; border-bottom-left-radius: 4px; }
.nomas-ai-bubble p { margin: 0 0 6px; }
.nomas-ai-bubble p:last-child { margin-bottom: 0; }
.nomas-ai-bubble ul { margin: 4px 0 6px 18px; padding: 0; }
.nomas-ai-bubble code { background: #f1f4f9; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }
.nomas-ai-bubble pre { background: #1a2332; color: #e6ebf2; padding: 8px; border-radius: 6px; overflow-x: auto; font-size: 12px; }

.nomas-ai-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; background: #f7f9fc; border-top: 1px solid #e6ebf2; }
.nomas-ai-chip {
  background: #fff; border: 1px solid #d0d9e6; color: #003366;
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.nomas-ai-chip:hover { background: #003366; color: #fff; border-color: #003366; }

.nomas-ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e6ebf2; background: #fff; }
.nomas-ai-form textarea {
  flex: 1; resize: none; border: 1px solid #d0d9e6; border-radius: 8px;
  padding: 8px 10px; font: 13.5px/1.4 'Roboto', sans-serif; outline: none;
}
.nomas-ai-form textarea:focus { border-color: #0066cc; box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }
.nomas-ai-send {
  border: none; background: #0066cc; color: #fff; padding: 0 16px;
  border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13.5px;
}
.nomas-ai-send:disabled { background: #b3c4d6; cursor: not-allowed; }
.nomas-ai-foot { padding: 6px 12px; text-align: center; font-size: 10.5px; color: #6b7a8f; background: #fff; border-top: 1px solid #f0f3f8; }

.nomas-ai-dot {
  display: inline-block; width: 6px; height: 6px; margin: 0 2px;
  background: #6b7a8f; border-radius: 50%; animation: nomas-ai-blink 1.2s infinite;
}
.nomas-ai-dot:nth-child(2) { animation-delay: .2s; }
.nomas-ai-dot:nth-child(3) { animation-delay: .4s; }
@keyframes nomas-ai-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

@media (max-width: 600px) {
  #nomas-ai-fab .nomas-ai-fab-label { display: none; }
  #nomas-ai-drawer { width: 100vw; }
}
