.guestbook-layout {
    grid-template:
        "header header" auto
        "leftSidebar main" 1fr
        "footer footer" auto / var(--sidebar-width) minmax(0, 1fr);
}

.guestbook-intro,
.guestbook-card,
.guestbook-message {
    margin-bottom: 1.5em;
}

.guestbook-card,
.guestbook-message {
    padding: 20px;
}

.guestbook-form {
    display: grid;
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 0.4rem;
}

.form-row label {
    font-family: var(--heading-font);
    font-size: 1.3em;
    color: white;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 2px solid #313131;
    border-radius: 12px;
    background: #0f0c12;
    color: var(--text-color);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 1rem;
}

.form-row textarea {
    resize: vertical;
    min-height: 10rem;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
}

#name-row {
    width: 15%;
}

.guestbook-button {
    justify-self: end;
    width: auto;
    display: inline-block;
    padding: 0;
    margin-top: 0.25rem;
    margin-right: 1em;
    border: 0;
    background: transparent;
    color: var(--title-text-color);
    font-family: var(--title-font);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.guestbook-button:hover,
.guestbook-button:focus {
    background: transparent;
    color: var(--link-color-hover);
    transform: scale(1.2);
}
.guestbook-success {
    border-color: #305d30;
}

.guestbook-error {
    border-color: #7c2f2f;
}

.guestbook-error ul {
    margin: 0.75em 0 0;
    padding-left: 1.5em;
}

.entries-list {
    display: grid;
    gap: 1rem;
}

.entry {
    padding-bottom: 1rem;
    border-bottom: 1px dashed #3c3c3c;
}

.entry:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.entry p {
    padding-left: 2rem;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.entry-header h3 {
    margin: 0;
    padding-left: 2rem;
}

.entry-header time {
    color: var(--link-color);
    font-size: 0.95rem;
    padding-right: 2rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 800px) {
    .guestbook-layout {
        grid-template:
            "header" auto
            "main" auto
            "footer" auto / 1fr;
    }

    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
