/* guestbook page styles */

article a {
    color: #000;
    font-weight: bold;
}

article a:visited {
    color: #666;
}

h1 {
    display: block;
    text-align: center;
    font-size: 1.5rem;
}

h2 {
    text-align: center;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

#kommentform input[type="text"],
#kommentform input[type="email"],
#kommentform input[type="url"],
#kommentform textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    font-size: 100%;
}

#kommentform textarea {
    border: 1px solid #ccc;
}

#kommentform input[type="submit"] {
    background-color: #000;
    color: #fff;
    font-weight: bold;
    border: none;
    padding: .5rem 1rem;
    text-align: center;
    font-size: 100%;
    font-family: 'Courier New', Courier, monospace;
}

#kommentform .form-feedback.moderation-note {
    margin-top: 1rem;
    padding: .5rem;
    background: #efefef;
    color: #000;
    text-align: center;
}

/* --- Comment list: three-column layout (avatar / content / author) --- */
.list-comments {
    list-style: none;
    margin: 1.5rem 0 0 0;
    padding: 0;
}

.list-comments .comment-header a {
    font-weight: normal;
    color: #fff;
}

.list-comments .u-comment {
    display: grid;
    grid-template-columns: 56px 1fr 160px;
    gap: 12px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.list-comments .u-comment .h-card {
    grid-column: 1 / -1; /* header spans full width */
}

.list-comments .u-comment .u-photo,
.list-comments .u-comment .gravatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.list-comments .u-comment .p-content {
    grid-column: 2;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.list-comments .u-comment .comment-avatar {
    grid-column: 1;
}

/* make avatar and content sit horizontally inside .p-content */
.list-comments .u-comment .p-content {
    display: flex;
    gap: 12px;
    align-items: flex-start; /* top aligned */
}

.list-comments .u-comment .comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.list-comments .u-comment .p-content .comment-body {
    flex: 1 1 auto;
}

.comment-header {
    grid-column: 1 / -1;
    background: #000;
    color: #fff;
    font-size: 75%;
    padding: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-header a { color: #fff; text-decoration: none; }

.list-comments .u-comment .u-author,
.list-comments .u-comment .p-author {
    grid-column: 3;
    justify-self: end;
    align-self: start;
    text-decoration: none;
}


@media (max-width: 640px) {
    .list-comments .u-comment { display: block; }
    .list-comments .u-comment .h-card { display:flex; align-items:center; gap:12px; }
    .list-comments .u-comment .u-author { margin-left:auto; }
    .list-comments .u-comment .p-content { margin: 8px 0; }
}
