/* Frontend Message Board Styles */

/* Prevents page scroll when a modal/lightbox is open.
   Uses !important so WordPress theme or plugin JS cannot override it. */
html.wr-scroll-locked,
html.wr-scroll-locked body {
    overflow: hidden !important;
}

.wr-board {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.wr-board-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
}

.wr-board-header h2 {
    color: #0073aa;
    font-size: 28px;
    margin: 0;
}

/* Create Post Section */
.wr-create-post-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.wr-create-post-section h3 {
    color: #333;
    margin-top: 0;
}

.wr-create-post-section .form-group {
    margin-bottom: 15px;
}

.wr-create-post-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wr-create-post-section input[type="text"],
.wr-create-post-section input[type="email"],
.wr-create-post-section input[type="tel"],
.wr-create-post-section select,
.wr-create-post-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wr-create-post-section textarea {
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.btn-primary,
.btn-small {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-primary:hover,
.btn-small:hover {
    background-color: #005a87;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

#wr-create-message,
#wr-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#wr-create-message.error,
#wr-message.error {
    background-color: #fee;
    color: #c00;
    border: 1px solid #fcc;
    display: block;
}

#wr-create-message.success,
#wr-message.success {
    background-color: #efe;
    color: #060;
    border: 1px solid #cfc;
    display: block;
}

/* Posts Section */
.wr-posts-section {
    margin-top: 30px;
}

.wr-posts-section h3 {
    color: #333;
    font-size: 22px;
}

.wr-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Post */
.wr-post {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wr-post-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.wr-post-header h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 18px;
}

.wr-post-group {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 10px;
}

.wr-post-header small {
    color: #666;
    font-size: 13px;
}

.wr-post-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Comments Section */
.wr-comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wr-comments-section h5 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.wr-comment {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid #0073aa;
}

.wr-comment strong {
    color: #0073aa;
}

.wr-comment br {
    line-height: 1.4;
}

/* Add Comment Form */
.wr-add-comment-form {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.wr-add-comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    resize: vertical;
}

.wr-add-comment-form button {
    background-color: #0073aa;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.wr-add-comment-form button:hover {
    background-color: #005a87;
}

@media (max-width: 600px) {
    .wr-board {
        padding: 10px;
    }

    .wr-post {
        padding: 15px;
    }

    .btn-primary,
    .btn-small {
        width: 100%;
    }

    .wr-add-comment-form button {
        width: 100%;
    }
}
