/* Floating camp assistant — mobile-first (robotics / Austin SEO page only) */
.seo-camp-agent-fab {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.seo-camp-agent-fab__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff66cc 0%, #fb8800 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(251, 136, 0, 0.45);
}

.seo-camp-agent-panel {
  width: min(100vw - 24px, 400px);
  max-height: min(72vh, 560px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e8eaed;
}

.seo-camp-agent-panel[hidden] {
  display: none !important;
}

.seo-camp-agent-panel__head {
  padding: 12px 14px;
  background: linear-gradient(135deg, #ff66cc 0%, #fb8800 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.seo-camp-agent-panel__head button {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.seo-camp-agent-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fa;
  min-height: 200px;
}

.seo-camp-agent-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.seo-camp-agent-msg--user,
.seo-camp-agent-msg--err {
  white-space: pre-wrap;
}

.seo-camp-agent-msg--user {
  align-self: flex-end;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #111827;
}

.seo-camp-agent-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #fbcfe8;
  color: #1f2937;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md p {
  margin: 0 0 0.55em;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md p:last-child {
  margin-bottom: 0;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md ul,
.seo-camp-agent-msg--bot .seo-camp-agent-msg__md ol {
  margin: 0.35em 0 0.55em;
  padding-left: 1.25em;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md li {
  margin: 0.15em 0;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md a {
  color: #be185d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md strong {
  font-weight: 700;
  color: #111827;
}

.seo-camp-agent-msg--bot .seo-camp-agent-msg__md h1,
.seo-camp-agent-msg--bot .seo-camp-agent-msg__md h2,
.seo-camp-agent-msg--bot .seo-camp-agent-msg__md h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.4em 0 0.35em;
}

.seo-camp-agent-listen-wrap {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #fce7f3;
}

.seo-camp-agent-listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #fbcfe8;
  border-radius: 10px;
  background: #fdf2f8;
  color: #9d174d;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.seo-camp-agent-listen:active {
  background: #fce7f3;
}

.seo-camp-agent-msg--err {
  align-self: stretch;
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  font-size: 0.85rem;
}

.seo-camp-agent-compose {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e8eaed;
  background: #fff;
  align-items: flex-end;
}

.seo-camp-agent-compose textarea {
  flex: 1 1 100%;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  resize: vertical;
  font-family: inherit;
}

.seo-camp-agent-compose textarea:focus {
  outline: none;
  border-color: #fb8800;
}

.seo-camp-agent-compose__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
}

.seo-camp-agent-compose__actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748b;
  margin-right: auto;
}

.seo-camp-agent-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid #fbcfe8;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.seo-camp-agent-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seo-camp-agent-send {
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff66cc 0%, #fb8800 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}

.seo-camp-agent-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (min-width: 769px) {
  .seo-camp-agent-panel {
    max-height: 520px;
  }
}
