/*
 * ShopLeaf guestbook (/guestbook). Fonts and text colour come from the site; surfaces are tints
 * of the text colour so light and dark templates both work. --sgb-accent sets the button colour.
 */
.sgb {
    --sgb-accent: var(--primary, #1b810d);
    --sgb-muted: #6b6f76;
    --sgb-line: rgba(128, 128, 128, 0.28);
    --sgb-card: rgba(128, 128, 128, 0.06);
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--sl-header-offset, 0px) + 40px) 20px 80px;
    box-sizing: border-box;
    color: inherit;
    text-align: left;
    font-size: 15px;
    line-height: 1.55;
}
@supports (color: color-mix(in srgb, red 50%, transparent)) {
    .sgb {
        --sgb-muted: color-mix(in srgb, currentColor 62%, transparent);
        --sgb-line: color-mix(in srgb, currentColor 16%, transparent);
        --sgb-card: color-mix(in srgb, currentColor 4%, transparent);
    }
}
.sgb * { box-sizing: border-box; }
.sgb h1 { font-size: 34px; line-height: 1.2; margin: 0 0 6px; padding: 0; border: 0; text-transform: none; font-weight: 800; }
.sgb-lead { color: var(--sgb-muted); font-size: 17px; margin: 0 0 22px; }
.sgb a { color: var(--sgb-accent); }

.sgb-form, .sgb-prompt { background: var(--sgb-card); border: 1px solid var(--sgb-line); border-radius: 16px; padding: 18px; margin-bottom: 28px; }
.sgb-form label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 4px; text-transform: none; color: inherit; width: auto; white-space: normal; }
.sgb-form input, .sgb-form textarea {
    display: block; width: 100%; font: inherit; color: inherit; background: transparent; border: 1px solid var(--sgb-line);
    border-radius: 10px; padding: 10px 12px; margin: 0; height: auto; line-height: 1.5; box-shadow: none; outline: none;
}
.sgb-form input:focus, .sgb-form textarea:focus { border-color: var(--sgb-accent); }
.sgb-form textarea { resize: vertical; min-height: 100px; }
.sgb-as { font-size: 14px; color: var(--sgb-muted); }
.sgb-as strong { color: inherit; }
/* Only bots see and fill this */
.sgb-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.sgb-captcha { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.sgb-captcha img { border-radius: 8px; border: 1px solid var(--sgb-line); display: block; }
.sgb-captcha input { width: 110px; }
.sgb-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.sgb button { all: unset; box-sizing: border-box; cursor: pointer; font: inherit; }
.sgb .sgb-button { display: inline-flex; padding: 11px 22px; border-radius: 999px; background: var(--sgb-accent); color: #fff; font-weight: 700; font-size: 15px; }
.sgb .sgb-button:hover { filter: brightness(1.08); }
.sgb .sgb-button[disabled] { opacity: 0.6; cursor: default; }
.sgb .sgb-plain { padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--sgb-muted); border: 1px solid var(--sgb-line); }
.sgb .sgb-plain:hover { color: inherit; }
.sgb button:focus-visible { outline: 2px solid var(--sgb-accent); outline-offset: 2px; }

.sgb-entries { display: grid; gap: 4px; }
.sgb-entry { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--sgb-line); }
.sgb-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sgb-card); }
.sgb-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--sgb-muted); }
.sgb-meta strong { font-size: 15px; color: inherit; }
.sgb-message { overflow-wrap: anywhere; margin-top: 2px; }
.sgb-message p { margin: 0 0 8px; }
.sgb-message p:last-child { margin: 0; }
.sgb-new { animation: sgb-flash 2.4s ease-out; border-radius: 8px; }
@keyframes sgb-flash { from { background: rgba(255, 213, 79, 0.3); } to { background: transparent; } }
.sgb-empty { color: var(--sgb-muted); padding: 20px 0; }
.sgb-pages { display: flex; justify-content: space-between; margin-top: 20px; font-size: 14px; color: var(--sgb-muted); }

@media (max-width: 640px) {
    .sgb { padding-left: 14px; padding-right: 14px; }
    .sgb h1 { font-size: 28px; }
}
