/* Blend into mwalts.com: transparent, browser-default look, follows light/dark */
:root { color-scheme: light dark; }
html { font-size: 100%; }
body {
  background: transparent;
  color: CanvasText;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: normal;
}
.container { width: auto; max-width: none; margin: 0; padding: 0; }

/* The site's section heading already says "Guestbook" */
#title { display: none; }

/* Form: match the "Send Me a Note" form */
#guestbooks___guestbook-form br { display: none; }
.guestbooks___input-container { margin: 1em 0; }
#guestbooks___guestbook-form input,
#guestbooks___guestbook-form textarea {
  all: revert;
  font: inherit;
}
#guestbooks___guestbook-form input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"]),
#guestbooks___guestbook-form textarea {
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}
#guestbooks___guestbook-form textarea { height: calc(5lh + 6px); resize: vertical; }
#guestbooks___guestbook-form input[type="hidden"] { display: none; }

/* "I'm not a robot" row */
.guestbooks___pow-container { margin: 0 0 1em; }
.guestbooks___pow-checkbox-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.guestbooks___pow-label-text--error, #guestbooks___error-message { color: #d43939; }

/* Links: browser defaults like the rest of the site */
a { color: LinkText; text-decoration: underline; }
a:visited { color: VisitedText; }
a:hover:not(.button) { opacity: 1; }

/* Quieter credit line */
#guestbooks___guestbook-made-with { text-align: left !important; opacity: 0.6; }

/* Divider and headings */
hr { all: revert; }
h3 { font-size: 1.17em; font-weight: bold; margin: 1em 0 0.5em; }

/* Messages */
.guestbook-message { margin-bottom: 1.25em; }
.guestbook-message p { margin: 0; }
.guestbook-message small { opacity: 0.6; }
blockquote {
  background: none;
  border-left: 3px solid color-mix(in srgb, CanvasText 25%, transparent);
  margin: 0.25em 0 0;
  padding: 0 0 0 12px;
  white-space: pre-wrap;
}

/* Custom placeholder text */
#guestbooks___guestbook-form ::placeholder { color: transparent; }
.guestbooks___input-container { position: relative; }
.guestbooks___input-container:has(:placeholder-shown)::before {
  position: absolute;
  top: 3px;
  left: 4px;
  color: GrayText;
  pointer-events: none;
}
.guestbooks___input-container:has(#name:placeholder-shown)::before    { content: "Sign your name"; }
.guestbooks___input-container:has(#website:placeholder-shown)::before { content: "Your website (optional)"; }
.guestbooks___input-container:has(#text:placeholder-shown)::before    { content: "Write a message"; }

/* Message first, then name; no website field */
#guestbooks___guestbook-form {
  display: flex;
  flex-direction: column;
  margin-top: 1em;
}
#guestbooks___guestbook-form .guestbooks___input-container { margin: 0 0 1em; }
.guestbooks___input-container:has(#text)    { order: 1; }
.guestbooks___input-container:has(#name)    { order: 2; }
.guestbooks___input-container:has(#website) { display: none; }
#guestbooks___challenge-answer-container    { order: 3; }
.guestbooks___pow-container                 { order: 4; }
#guestbooks___guestbook-form input[type="submit"] { order: 5; align-self: flex-start; }
#guestbooks___error-message                 { order: 6; }



/* Move the credit line to the bottom */
main { display: flex; flex-direction: column; }
#guestbooks___guestbook-made-with { order: 1; margin-top: 1em; display: none;}

/* Fixes for the service's Oct 2026 markup change */
body { margin: 0; }
*, ::before, ::after { box-sizing: border-box; }

/* Hide the new visible labels but keep them for screen readers */
.guestbooks___input-container label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Fill the frame exactly: no outer scrollbar, only the message list scrolls */
html, body { height: 100%; overflow: hidden; }
.container, main { height: 100%; }
main > * { flex-shrink: 0; }
#guestbooks___guestbook-messages-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

/* "Load more messages" row under the list */
#guestbooks___message-loading { margin-top: 0.5em; }
#guestbooks___message-load-status { margin: 0; }
#guestbooks___message-load-status:empty { display: none; }
#guestbooks___load-more { font: inherit; }
#guestbooks___guestbook-messages-header { display: none; }

/* Room for the focus outline at the frame's left and right edges */
body { padding: 0 4px; }