/* wesbecher.llc · Ask Andrew's GTM agent
 * Mercury: paper panel, ink type, blue accent, pill controls, no shadow.
 * Unique classes so base.css can load last without a fight.
 */

.gtm-agent-hero { margin-top: 20px; }

.gtm-agent-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  font-family: var(--wl-font, 'Manrope', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
}
/* Outlined control on toolkit heroes; home primary uses .btn-primary */
.gtm-agent-open:not(.btn-primary) {
  color: inherit;
  background: transparent;
  border: 1.5px solid var(--wl-blue-light, #8FA3FF);
}
.gtm-agent-open:not(.btn-primary):hover { border-color: var(--wl-blue, #4361EE); }
.gtm-agent-open:focus-visible {
  outline: 2px solid var(--wl-blue-light, #8FA3FF);
  outline-offset: 3px;
}
.gtm-agent-open.btn-primary {
  border: 0;
}

dialog.gtm-agent-dialog,
dialog.gtm-agent-dialog[open] {
  position: fixed !important;
  inset: 0 0 0 auto !important;
  width: min(480px, 100vw) !important;
  height: 100vh !important;
  max-height: none !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--wl-line, #E3E6EC) !important;
  border-radius: 0 !important;
  background: var(--wl-paper, #FFFFFF) !important;
  color: var(--wl-ink, #0A0A0A);
  box-shadow: none !important;
  font-family: var(--wl-font, 'Manrope', system-ui, sans-serif);
}
.gtm-agent-dialog::backdrop {
  background: rgba(10, 10, 10, 0.28);
}

.gtm-agent-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--wl-paper, #FFFFFF);
}

.gtm-agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--wl-line, #E3E6EC);
}
.gtm-agent-head h2 {
  margin: 0;
  font-family: var(--wl-font, 'Manrope', system-ui, sans-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.16;
  color: var(--wl-ink, #0A0A0A);
}
.gtm-agent-note {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--wl-muted, #5B6472);
}
.gtm-agent-close {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--wl-line, #E3E6EC);
  border-radius: 999px;
  background: transparent;
  color: var(--wl-ink, #0A0A0A);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}
.gtm-agent-close:hover { border-color: var(--wl-blue, #4361EE); }
.gtm-agent-close:focus-visible {
  outline: 2px solid var(--wl-blue, #4361EE);
  outline-offset: 2px;
}

.gtm-agent-log {
  flex: 1 1 auto;
  min-height: 220px;
  overflow: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gtm-agent-msg {
  max-width: 42ch;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-wrap;
}
.gtm-agent-msg[data-role="user"] {
  align-self: flex-end;
  background: var(--wl-tint-2, #F6F7FA);
  color: var(--wl-ink, #0A0A0A);
}
.gtm-agent-msg[data-role="user"] {
  max-width: 36ch;
}
.gtm-agent-msg[data-role="agent"] {
  align-self: flex-start;
  max-width: 52ch;
  background: transparent;
  border-left: 3px solid var(--wl-blue, #4361EE);
  border-radius: 0 12px 12px 0;
  white-space: normal;
}
.gtm-agent-msg[data-role="agent"] p {
  margin: 0 0 0.85em;
}
.gtm-agent-msg[data-role="agent"] p:last-child {
  margin-bottom: 0;
}
.gtm-agent-msg[data-role="agent"] a {
  color: var(--wl-blue, #4361EE);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gtm-agent-msg[data-role="agent"] a:hover {
  color: var(--wl-blue-dark, #2E43B8);
}
.gtm-agent-msg[data-role="system"] {
  align-self: stretch;
  max-width: none;
  background: var(--wl-tint-2, #F6F7FA);
  color: var(--wl-muted, #5B6472);
  font-size: 0.875rem;
}

.gtm-agent-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 12px;
}
.gtm-agent-prompt {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--wl-line, #E3E6EC);
  border-radius: 999px;
  background: transparent;
  color: var(--wl-ink, #0A0A0A);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  box-shadow: none;
}
.gtm-agent-prompt:hover { border-color: var(--wl-blue, #4361EE); }
.gtm-agent-prompt:focus-visible {
  outline: 2px solid var(--wl-blue, #4361EE);
  outline-offset: 2px;
}

.gtm-agent-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px;
  border-top: 1px solid var(--wl-line, #E3E6EC);
}
.gtm-agent-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--wl-muted, #5B6472);
  border-radius: 32px;
  background: var(--wl-paper, #FFFFFF);
  color: var(--wl-ink, #0A0A0A);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  box-shadow: none;
}
.gtm-agent-input::placeholder {
  color: var(--wl-muted, #5B6472);
  opacity: 1;
  white-space: nowrap;
  overflow: visible;
}
.gtm-agent-input:focus-visible {
  outline: 2px solid var(--wl-blue, #4361EE);
  outline-offset: 2px;
}
.gtm-agent-send {
  flex: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--wl-blue, #4361EE);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  box-shadow: none;
}
.gtm-agent-send:hover { background: var(--wl-blue-dark, #2E43B8); }
.gtm-agent-send:disabled { opacity: 0.5; cursor: not-allowed; }
.gtm-agent-send:focus-visible {
  outline: 2px solid var(--wl-blue, #4361EE);
  outline-offset: 2px;
}

.gtm-agent-foot {
  padding: 0 24px 20px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--wl-muted, #5B6472);
}
.gtm-agent-foot a {
  color: var(--wl-blue, #4361EE);
  text-decoration: none;
}
.gtm-agent-foot a:hover { color: var(--wl-blue-dark, #2E43B8); }
.gtm-agent-foot a:focus-visible {
  outline: 2px solid var(--wl-blue, #4361EE);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .gtm-agent-dialog {
    width: 100vw;
    border-left: 0;
  }
}
