/* PLACEHOLDER: site styles */

[hidden] {
  display: none;
}

body {
  line-height: 1.5;
  margin: 2rem auto;
  max-width: 720px;
  padding: 0 1rem;
}

button {
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}

button.primary {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

button.secondary {
  background: none;
  border: none;
  padding: 0.25rem 0;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  text-decoration: underline;
  color: inherit;
}

#email-capture-form label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

#email-capture-form input {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  font-size: 1rem;
  border: 1px solid;
  border-radius: 4px;
  box-sizing: border-box;
}

#email-capture-form button {
  margin-top: 1.25rem;
}

.form-error {
  margin-top: 1rem;
}

.message-history {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.75rem;
  min-height: 200px;
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.message {
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  margin: 0.5rem 0;
  max-width: 85%;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message-assistant {
  background: #f0f1f3;
  align-self: flex-start;
  margin-right: auto;
}

.message-user {
  background: #d6e8ff;
  align-self: flex-end;
  margin-left: auto;
  text-align: right;
}

.message-system {
  background: #fff4e5;
  font-style: italic;
  border: 1px dashed #d4a256;
}

.message-form textarea {
  display: block;
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}

.message-form button {
  margin-top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

#payload-display {
  background: #f6f6f6;
  border: 1px solid #ddd;
  padding: 0.75rem;
  border-radius: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

article.playbook {
  max-width: 720px;
  line-height: 1.6;
}

button.is-loading {
  cursor: progress;
  opacity: 0.75;
}

.spinner {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.5rem;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}
