/* haborym — Meadow guestbook theme
   Adapted from the supplied built-in theme, originally based on:
   https://eggramen.neocities.org/code/css_testpages
   Replace the guestbook's current custom CSS with this entire file. */

/* 1. Palette and reading defaults */
:root {
  color-scheme: dark;
  --background: #121212;
  --panel: #282828;
  --border: #404040;
  --paper: #EDEDE8;
  --text: #FBFBF6;
  --font: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
  background-image: radial-gradient(var(--border) 0.6px, transparent 0.6px);
  background-size: 6px 6px;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  scrollbar-color: var(--border) var(--background);
}

/* Every text element uses the same light color, including provider states. */
body,
body * {
  color: var(--text) !important;
  text-shadow: none !important;
}

::selection {
  background: var(--border);
  color: var(--text);
}

/* 2. Main window and title */
.container {
  position: relative;
  width: calc(100% - 32px);
  max-width: 900px;
  min-height: 0;
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  text-align: left;
  overflow-wrap: anywhere;
  box-shadow:
    inset 1px 1px var(--paper),
    inset -1px -1px var(--background),
    4px 4px 0 var(--background);
}

h1#title {
  margin: -20px -20px 24px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--background);
  font-family: var(--font);
  font-size: 26px;
  font-weight: normal;
  line-height: 1.35;
  text-align: left;
}

p {
  margin: 0 0 18px;
}

a,
a:visited {
  text-decoration: underline;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px dotted var(--text);
  outline-offset: 3px;
}

small {
  font-size: 15px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* 3. Form fields */
#guestbooks___guestbook-form-container {
  margin-bottom: 28px;
}

.guestbooks___input-container {
  margin-bottom: 18px;
}

.guestbooks___input-container label {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.guestbooks___input-container input:not([type="checkbox"]):not([type="radio"]),
.guestbooks___input-container textarea,
.guestbooks___input-container select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--background);
  font: 18px/1.6 var(--font);
  box-shadow: inset 1px 1px var(--background);
}

.guestbooks___input-container textarea {
  min-height: 170px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text) !important;
  opacity: 1;
}

.guestbooks___input-container input:focus,
.guestbooks___input-container textarea:focus,
.guestbooks___input-container select:focus {
  border-color: var(--paper);
  outline: 2px dotted var(--text);
  outline-offset: 3px;
}

/* 4. Submit button */
#guestbooks___guestbook-form input[type="submit"] {
  display: inline-block;
  width: auto;
  min-width: 140px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  font: bold 16px/1.4 var(--font);
  cursor: pointer;
  box-shadow:
    inset 1px 1px var(--paper),
    inset -1px -1px var(--background),
    inset 2px 2px var(--border);
}

#guestbooks___guestbook-form input[type="submit"]:hover:not(:disabled) {
  background: var(--border);
}

#guestbooks___guestbook-form input[type="submit"]:active:not(:disabled) {
  box-shadow:
    inset 1px 1px var(--background),
    inset -1px -1px var(--border);
}

#guestbooks___guestbook-form input[type="submit"]:disabled {
  border-style: dashed;
  background: var(--background);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

/* 5. Messages and replies */
#guestbooks___guestbook-messages-header {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font);
  font-size: 22px;
  line-height: 1.4;
}

#guestbooks___guestbook-messages-container {
  margin-top: 20px;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.75;
}

.guestbook-message-reply {
  margin: 18px 0 18px 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--paper);
  background: var(--background);
  opacity: 1;
}

.guestbook-message-reply blockquote {
  margin: 0;
  padding: 0;
  border: none;
}

/* 6. Errors and bot verification: keep text bright in every state */
#guestbooks___error-message {
  margin-top: 14px;
  font-weight: bold;
}

#guestbooks___error-message:not(:empty) {
  padding: 12px 14px;
  border: 2px dashed var(--paper);
  background: var(--background);
}

.guestbooks___pow-container {
  margin: 18px 0;
}

.guestbooks___pow-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

.guestbooks___pow-checkbox-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--border);
  cursor: pointer;
}

.guestbooks___pow-label-text--loading {
  opacity: 1;
  font-style: italic;
}

.guestbooks___pow-label-text--verified {
  opacity: 1;
  font-weight: bold;
}

.guestbooks___pow-label-text--error {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

/* 7. Keep the service attribution readable */
#guestbooks___guestbook-made-with {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  text-align: right;
}

#guestbooks___guestbook-made-with a {
  font-weight: normal;
  text-decoration: underline;
}

/* 8. Narrow screens and embedded windows */
@media (max-width: 600px) {
  .container {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 18px;
  }

  h1#title {
    margin: -14px -14px 20px;
    padding: 12px;
    font-size: 24px;
  }

  .guestbook-message-reply {
    margin-left: 12px;
    padding: 10px 12px;
  }

  #guestbooks___guestbook-made-with {
    text-align: left;
  }
}