/* Only our own page (the demo and local development): the site that embeds
   the tool has its own page styles. */
body {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  color: #2b2b2b;
}

/* Our own page's contact form (the site that embeds the tool has its
   own): a label, the message box, the send button, green as the main
   action. */
#ContactForm {
  display: grid;
  gap: .75rem;
}

/* Like the tool's field labels, close to the box it names. */
#ContactForm label {
  margin-bottom: -.5rem;
  font-size: .875em;
  font-weight: 600;
}

#ContactMessage {
  box-sizing: border-box;
  width: 100%;
  min-height: 8rem;
  padding: .5rem .625rem;
  font: inherit;
  color: inherit;
  border: 1px solid #bdbdbd;
  border-radius: .375rem;
  resize: vertical;
}

#ContactFormSubmit {
  justify-self: end;
  height: 2.375rem;
  padding: 0 1.5rem;
  font: inherit;
  font-weight: 600;
  color: white;
  border: none;
  border-radius: .375rem;
  background-color: #2f7d4f;
  cursor: pointer;
}

#ContactFormSubmit:hover {
  background-color: #256440;
}

#ContactFormSubmit:disabled {
  background-color: #b5b5b5;
  cursor: not-allowed;
}

#ContactMessage:focus-visible,
#ContactFormSubmit:focus-visible {
  outline: 2px solid #2f7d4f;
  outline-offset: 1px;
}

/* A public demo (<html data-demo>): a banner on top of the page, a ribbon in
   the corner that stays in view while scrolling, and a note after sending. */
/* A demo sends nothing, so it has no message to write: only the send
   button, to try that every picture is ready. */
[data-demo] #ContactMessage,
[data-demo] #ContactForm label {
  display: none;
}

.demo-banner, .demo-ribbon, .demo-notice {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.demo-banner {
  margin: 0 0 1rem;
  padding: .5rem 2.5rem; /* clear of the ribbon in the corner */
  border-radius: .375rem;
  background: #fcd34d;
  color: #451a03;
  font-weight: 600;
  text-align: center;
}

.demo-ribbon {
  position: fixed;
  top: 1.5rem;
  right: -2.5rem;
  z-index: 50;
  width: 10rem;
  transform: rotate(45deg);
  padding: .25rem 0;
  background: #b91c1c;
  color: white;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: center;
  box-shadow: 0 2px 4px rgb(0 0 0 / .2);
  pointer-events: none;
  user-select: none;
}

.demo-notice {
  margin: 0;
  border-radius: .375rem;
  padding: .5rem .75rem;
  border-left: .25rem solid #f59e0b;
  background: #fef3c7;
  color: #451a03;
}
