/* Assistant and runtime UI styles for Harbor Hotel (Modulify theme & Slide-over Drawer) */

#agent-app {
  --ns-font: var(--font-app-sans, system-ui, sans-serif);
  --ns-bg: #ffffff;
  --ns-fg: #0d2721;
  --ns-primary: #18524c;
  --ns-accent: #c69449;
  --ns-border: rgba(13, 39, 33, 0.12);
  --ns-panelbg: #f9f3e6;
  --ns-msgbg: #ddf0ea;
  --ns-muted: rgba(13, 39, 33, 0.65);
  width: 100%;
  font-family: var(--ns-font);
}

/* Chat container inside drawer */
#agent-app.ns-composed-app [data-ns-slot="chat"] {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

#agent-app.ns-composed-app [data-ns-slot="chat"] > .ns-chat {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* Hide raw technical disclosure */
#agent-app .ns-chat > details {
  display: none !important;
}

/* Hide default first generic message since intro card is above */
#agent-app .ns-msgs > .ns-msg.bot:first-child {
  display: none !important;
}

/* Chat messages scroll area */
#agent-app .ns-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#agent-app .ns-msg {
  overflow-wrap: break-word;
  padding: 11px 15px;
  line-height: 1.5;
  font-size: 13.5px;
  max-width: 88%;
}

#agent-app .ns-msg.bot {
  background: #ddf0ea;
  color: #0d2721;
  border: 1px solid rgba(24, 82, 76, 0.15);
  align-self: flex-start;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 1px 3px rgba(13, 39, 33, 0.04);
}

#agent-app .ns-msg.user {
  background: var(--ns-primary);
  color: #f9f3e6;
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 6px rgba(24, 82, 76, 0.2);
}

/* Chat input bar matching user photo */
#agent-app .ns-inputbar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 0 !important;
  border-top: 1px solid var(--ns-border) !important;
  background: #ffffff !important;
}

#agent-app .ns-inputbar input {
  flex: 1 !important;
  height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid var(--ns-border) !important;
  border-radius: 9999px !important;
  background: #ffffff !important;
  color: var(--ns-fg) !important;
  font: 14px/1.5 var(--ns-font) !important;
  transition: border-color 150ms ease, box-shadow 150ms ease !important;
}

#agent-app .ns-inputbar input:focus {
  outline: none !important;
  border-color: var(--ns-primary) !important;
  box-shadow: 0 0 0 2px rgba(24, 82, 76, 0.2) !important;
}

/* Hide new chat button in dock */
#agent-app .ns-inputbar .ns-newchat {
  display: none !important;
}

/* Circular green submit button with arrow up */
#agent-app .ns-inputbar button:not(.ns-newchat) {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 9999px !important;
  background: var(--ns-primary) !important;
  color: transparent !important;
  border: 0 !important;
  cursor: pointer !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 150ms ease, transform 150ms ease !important;
}

#agent-app .ns-inputbar button:not(.ns-newchat)::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f9f3e6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='19' x2='12' y2='5'%3E%3C/line%3E%3Cpolyline points='5 12 12 5 19 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

#agent-app .ns-inputbar button:not(.ns-newchat):hover {
  background: #0f3531 !important;
  transform: scale(1.05) !important;
}

#agent-app .ns-inputbar button:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Consent card in chat */
#agent-app .ns-msg.ns-consent {
  background: #f9f3e6;
  border: 1.5px solid var(--ns-accent);
  border-radius: 1rem;
  padding: 14px 16px;
  max-width: 95%;
  box-shadow: 0 4px 14px rgba(198, 148, 73, 0.1);
}

#agent-app .ns-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#agent-app .ns-consent-actions button {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

#agent-app .ns-consent-actions button:first-child {
  background: var(--ns-primary);
  color: #f9f3e6;
  border: 1px solid var(--ns-primary);
}

#agent-app .ns-msgs:has(.ns-consent-actions) > .ns-turn-status {
  display: none;
}

/* Settings slot inside settings tab */
#agent-app.ns-composed-app [data-ns-slot="settings"] {
  border: 1px solid var(--ns-border);
  border-radius: 1rem;
  background: var(--ns-panelbg);
  padding: 16px;
  font-size: 0.875rem;
}
