/* The message board at the foot of the page.
   Colours come from the mint-green palette in styles.css — nothing new is
   introduced here, so a theme change still only touches :root. */

.guestbook-section {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ *
 * Composer
 * ------------------------------------------------------------------ */

.guestbook-form {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.guestbook-composer {
  display: block;
  width: 100%;
  min-height: 84px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.guestbook-composer:focus {
  outline: none;
  background: #f7fdfa;
}

.guestbook-composer::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.guestbook-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--lake-soft);
}

.guestbook-hint {
  color: var(--lake-deep);
  font-size: 11px;
  line-height: 1.5;
}

.guestbook-hint.is-error {
  color: var(--warning);
  font-weight: 700;
}

/* Where the messages actually go. Deliberately quiet — it is a statement of fact,
   not a warning — but it must be readable before the visitor starts typing. */
.guestbook-scope {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.guestbook-scope.is-shared {
  color: var(--lake-deep);
  font-weight: 650;
}

.guestbook-submit {
  min-height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--lake);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.guestbook-submit:hover:not(:disabled) {
  background: var(--lake-deep);
}

.guestbook-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ------------------------------------------------------------------ *
 * List
 * ------------------------------------------------------------------ */

.guestbook-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.guestbook-item {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mint);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.guestbook-item-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.guestbook-author {
  color: var(--lake-deep);
  font-size: 12px;
  font-weight: 750;
}

.guestbook-time {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.guestbook-remove {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.guestbook-remove:hover {
  color: var(--warning);
}

/* pre-wrap keeps the author's own line breaks, and `overflow-wrap` stops a long
   unbroken string (a pasted URL, a run of emoji) from widening the card. */
.guestbook-body {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guestbook-empty {
  margin: 0;
  padding: 16px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 560px) {
  .guestbook-form-foot {
    justify-content: stretch;
  }

  .guestbook-hint {
    flex: 1 1 100%;
  }

  .guestbook-submit {
    flex: 1 1 100%;
  }
}
