/* =========================================================
   ELLIE'S UNSETTLED MIND
   GUESTBOOK — MATCHING MAIN BLOG THEME
   Cream version for iframe embedding
   ========================================================= */

/* 1. THEME VARIABLES */
:root {
  color-scheme: light;
  --width: 36rem;
  --tooth: 8px;
  --font-main: ui-monospace, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  --font-secondary: var(--font-main);
  --font-scale: 0.95em;
  --background-color: #fef6ec;
  --counter-color: #fef6ec;
  --heading-color: #16151a;
  --text-color: #2f2d36;
  --link-color: #b2352c;
  --visited-color: #7d4a5c;
  --code-background-color: #efede4;
  --code-color: #2f2d36;
  --blockquote-color: #55525e;
  --muted-color: #75727d;
  --rule-color: #aeabb4;
}

* {
  box-sizing: border-box;
}

/* 2. OUTER BACKGROUND */
html {
  padding: 0;
  background: var(--background-color);
}

/* 3. MAIN PAPER */
body {
  position: relative;
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 44px) clamp(18px, 6vw, 44px) 28px;
  background: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: var(--font-scale);
  line-height: 1.7;
  overflow-wrap: break-word;
  box-shadow: none;
}

/* 4. PAPER EDGES */
body::before,
body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--tooth);
}

body::before {
  bottom: 100%;
  background: conic-gradient(
    from 135deg at top,
    var(--background-color) 90deg,
    #0000 0
  ) 50% / calc(var(--tooth) * 2) 100%;
}

body::after {
  top: 100%;
  background: conic-gradient(
    from -45deg at bottom,
    var(--background-color) 90deg,
    #0000 0
  ) 50% / calc(var(--tooth) * 2) 100%;
}

/* 5. LINKS */
a {
  color: var(--link-color);
  text-decoration-style: dashed;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

a:hover {
  color: var(--heading-color);
  text-decoration-style: solid;
}

/* 6. HEADINGS */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  line-height: 1.35;
  text-wrap: balance;
}

h1 {
  margin: 0 0 20px;
  font-size: 1.5em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}

h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 14px;
  font-size: 1em;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
}

h2::before,
h2::after {
  content: "";
  flex: 1 1 1.5em;
  border-top: 2px dashed var(--rule-color);
}

h3 {
  margin: 28px 0 10px;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* 7. PARAGRAPHS */
p {
  margin: 0 0 16px;
}

strong, b {
  color: var(--heading-color);
}

small {
  color: var(--muted-color);
  font-size: .85em;
}

/* 8. MAIN CONTENT */
main {
  width: 100%;
  padding: 28px 0 8px;
  margin: auto;
}

/* 9. GUESTBOOK CONTAINER */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  color: var(--text-color);
  border-radius: 0;
  overflow-wrap: anywhere;
}

/* 10. FORM FIELDS */
input,
textarea,
select,
button {
  max-width: 100%;
  padding: 6px 10px;
  border: 2px dashed var(--rule-color);
  border-radius: 0;
  background: var(--background-color);
  color: var(--text-color);
  font: inherit;
}

input[type="text"],
input[type="url"],
input[type="email"],
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-bottom: 1em;
}

/* COMMENT BOX */
textarea {
  min-height: 160px;
  height: 160px;
  resize: vertical;
  overflow-y: auto;
}

/* 11. GREEN FOCUS HIGHLIGHT */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px dashed #355b45;
  outline-offset: 3px;
}

/* 12. SUBMIT BUTTON */
input[type="submit"] {
  padding: 8px 16px;
  color: var(--link-color);
  font-weight: bold;
  cursor: pointer;
}

input[type="submit"]:hover {
  border-style: solid;
  border-color: var(--heading-color);
  color: var(--heading-color);
}

input[type="submit"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 13. GUESTBOOK MESSAGES */
#guestbooks___guestbook-made-with {
  text-align: right;
  color: var(--muted-color);
  font-size: .75em;
}

#guestbooks___guestbook-messages-header {
  margin-top: 36px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--rule-color);
}

#guestbooks___guestbook-messages-container {
  margin-top: 1em;
  font-size: .85em;
  line-height: 1.6;
}

/* 14. DIVIDERS */
hr {
  height: 8px;
  margin: 28px 0;
  border: 0;
  background: radial-gradient(
    circle,
    var(--rule-color) 1.5px,
    #0000 2px
  ) 0 50% / 10px 8px repeat-x;
}

/* 15. REPLIES */
.guestbook-message-reply {
  margin-left: 2.5rem;
  padding-left: 1rem;
  border-left: 2px dashed var(--rule-color);
  color: var(--muted-color);
}

.guestbook-message-reply blockquote {
  margin: 0;
  padding: 0;
  border: none;
}

/* 16. PROOF OF WORK */
.guestbooks___pow-container {
  margin: .75em 0;
}

.guestbooks___pow-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  cursor: pointer;
  user-select: none;
  font-size: .85em;
  color: var(--muted-color);
}

.guestbooks___pow-checkbox-label input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  cursor: pointer;
}

.guestbooks___pow-label-text--loading {
  opacity: .7;
}

.guestbooks___pow-label-text--verified {
  color: #55765b;
}

.guestbooks___pow-label-text--error {
  color: var(--link-color);
}

/* 17. RESPONSIVE WIDTH */
@media (min-width: 768px) {
  :root {
    --width: 48rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --width: 56rem;
  }
}

/* 18. MOBILE */
@media (max-width: 600px) {
  body {
    width: auto;
    margin: 0;
    padding: 24px 18px;
  }

  main {
    width: 100%;
    padding: 0;
  }

  /* Align visitor messages to the left */
  #guestbooks___guestbook-messages-container blockquote {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  #guestbooks___guestbook-messages-container blockquote p {
    text-align: left;
  }

  /* Keep replies indented with their dashed line */
  .guestbook-message-reply {
    margin-left: 1rem;
    padding-left: .75rem;
  }

  /* Extra writing space on mobile */
  textarea {
    min-height: 180px;
    height: 180px;
    resize: vertical;
  }
}