/* Retro 2000s Guestbook Styles (Image-inspired) */

.guestbook-container,
.horse-diary-container {
    margin-top: 20px;
    text-align: center;
    /* Centered content like in the image */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-color);
    /* Theme text color */
}

/* Header image handling */
.guestbook-header-img {
    margin-bottom: 20px;
}

.guestbook-rules {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 1px dashed var(--border-color);
    font-size: 0.9em;
    background: #ffffffaa;
}

.guestbook-rules ul {
    list-style-type: square;
    padding-left: 20px;
    margin: 0;
}

.guestbook-rules li {
    margin-bottom: 8px;
}

.guestbook-divider {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 15px 0;
    width: 100%;
}

/* Message styling - mimic the image layout */
.messages-list {
    margin-top: 30px;
}

.message-item {
    margin-bottom: 40px;
    padding: 0 20px 20px 20px;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.6;
    text-align: left;
}

.message-meta {
    margin-bottom: 15px;
    display: block;
    /* Take full width to allow left alignment */
}

.meta-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.meta-label {
    font-weight: bold;
    text-align: right;
    width: 140px;
    padding-right: 10px;
    white-space: nowrap;
}

.meta-value {
    text-align: left;
    flex: 1;
    min-width: 200px;
}

.message-text {
    margin: 15px 0;
    max-width: 100%;
    text-align: left;
    white-space: pre-wrap;
}

.message-date {
    font-size: 0.85em;
    color: #666;
    margin-top: 20px;
    text-align: left;
    margin-left: 150px;
    /* Alihan kanssa samaan linjaan (140px label + 10px padding) */
}

/* Reply/Staff comment block */
.staff-reply {
    margin-top: 10px;
    font-size: 0.9em;
    color: #ff69b4;
    /* Pinkish-red for replies in image */
    font-style: italic;
}

/* Form styling */
.guestbook-form,
.horse-diary-form {
    padding: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    /* Align label to top of textarea/input */
}

.form-group label {
    width: 120px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    flex: 1;
    max-width: 400px;
    /* Prevent fields from being too long */
    border: 1px dashed var(--border-color);
    padding: 5px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1em;
    background: #fff;
    color: #333;
}

.form-group textarea {
    height: 80px;
}

.submit-btn {
    background: #fff;
    border: 1px dashed var(--border-color);
    padding: 5px 15px;
    cursor: pointer;
    font-weight: bold;
    color: var(--text-color);
}

.submit-btn:hover {
    background: var(--bg-color);
}

/* Navigation links (Sivut, Kirjoita jne) */
.gb-nav {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    border-top: 1px solid #999;
    border-bottom: 1px solid #999;
    padding: 5px 0;
    margin-bottom: 15px;
}

.gb-nav a {
    color: var(--link-color);
    text-decoration: underline;
}

/* Navigation Grid (Pagination) */
.gb-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Left column */
.pagination-cell:nth-child(3n+1) {
    text-align: left;
}

/* Center column */
.pagination-cell:nth-child(3n+2) {
    text-align: center;
}

/* Right column */
.pagination-cell:nth-child(3n) {
    text-align: right;
}

.pagination-cell a {
    color: var(--link-color);
    text-decoration: underline;
}

.pagination-cell a.nav-disabled {
    color: #999;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}