/* ============================================
   Guestbook / Bulletin Board — Styles
   ============================================ */

/* --- Form Card --- */
.gb-form-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.gb-form-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.gb-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.gb-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.gb-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.gb-required {
    color: var(--accent);
}

.gb-field input,
.gb-field textarea {
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

.gb-field input:focus,
.gb-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.08);
}

.gb-field input::placeholder,
.gb-field textarea::placeholder {
    color: var(--text-muted);
}

.gb-field-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.gb-field-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gb-char-count {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.gb-char-count.gb-char-warn {
    color: var(--accent);
}

.gb-char-count.gb-char-full {
    color: #ff4757;
}

.gb-form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.gb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary, #00ccff));
    color: var(--bg-primary);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gb-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.gb-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.gb-notice {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

.gb-form-result {
    margin-top: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
}

.gb-form-result.gb-result-success {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--accent);
}

.gb-form-result.gb-result-error {
    background: rgba(255, 71, 87, 0.08);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

/* --- Stats Bar --- */
.gb-stats-bar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 0;
    margin-bottom: 1.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.gb-stats-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* --- Messages --- */
.gb-messages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gb-message {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gb-message:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.gb-message-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.gb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), rgba(0, 204, 255, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.gb-meta {
    flex: 1;
    min-width: 0;
}

.gb-author {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gb-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.gb-flag {
    font-size: 0.85rem;
    line-height: 1;
}

.gb-time {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.gb-message-body {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
    word-break: break-word;
}

/* --- Empty State --- */
.gb-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.gb-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* --- Pagination --- */
.gb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.gb-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gb-page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.gb-page-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.gb-page-dots {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 0.25rem;
}

/* --- Privacy Note --- */
.gb-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    line-height: 1.6;
}

.gb-privacy-note svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 0.1rem;
}

.gb-privacy-note p {
    margin: 0;
}

.gb-privacy-note a {
    color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .gb-messages {
        grid-template-columns: 1fr;
    }

    .gb-form-card {
        padding: 1.25rem;
    }

    .gb-form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .gb-message-header {
        flex-wrap: wrap;
    }

    .gb-time {
        width: 100%;
        margin-top: 0.25rem;
    }
}
