/**
 * 前端帖子功能样式
 */

/* ============================================
   1. 搜索表单
   ============================================ */
.pm-search-form {
    margin: 20px 0;
}

.search-input-group {
    display: flex;
    gap: 10px;
    max-width: 600px;
}

.pm-search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.pm-search-input:focus {
    outline: none;
    border-color: #E87C2F;
}

.pm-search-button {
    padding: 12px 30px;
    background: #E87C2F;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-search-button:hover {
    background: #F7A754;
}

/* ============================================
   2. 发布帖子表单
   ============================================ */
.pm-submit-form-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.pm-submit-form-container h2 {
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #E87C2F;
    font-size: 24px;
}

.pm-form-group {
    margin-bottom: 20px;
}

.pm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.pm-form-group .required {
    color: #d63638;
}

.pm-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.pm-form-control:focus {
    outline: none;
    border-color: #E87C2F;
}

.pm-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.pm-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pm-button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pm-button-primary {
    background: #E87C2F;
    color: #fff;
}

.pm-button-primary:hover {
    background: #F7A754;
}

.pm-button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pm-form-message {
    margin-left: 15px;
    font-size: 15px;
}

/* ============================================
   3. 帖子列表
   ============================================ */
.pm-post-list-container {
    margin: 20px 0;
}

.pm-post-list {
    display: grid;
    gap: 20px;
}

.pm-post-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pm-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pm-post-thumbnail {
    border-radius: 8px;
    overflow: hidden;
}

.pm-post-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.pm-post-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pm-post-title {
    margin: 0 0 10px;
    font-size: 20px;
}

.pm-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.pm-post-title a:hover {
    color: #E87C2F;
}

.pm-post-excerpt {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.pm-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #999;
}

.pm-post-meta > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pm-post-price {
    color: #E87C2F;
    font-weight: 600;
    font-size: 16px;
}

.pm-no-posts {
    padding: 60px 20px;
    text-align: center;
    background: #f7f7f7;
    border-radius: 12px;
    color: #999;
}

/* ============================================
   4. 筛选器
   ============================================ */
.pm-filters {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pm-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.pm-filter-group {
    flex: 1;
    min-width: 150px;
}

.pm-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.pm-filter-select,
.pm-filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.pm-filter-select:focus,
.pm-filter-input:focus {
    outline: none;
    border-color: #E87C2F;
}

.pm-filter-button {
    padding: 10px 25px;
    background: #E87C2F;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.pm-filter-button:hover {
    background: #F7A754;
}

.pm-filter-reset {
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.pm-filter-reset:hover {
    border-color: #E87C2F;
    color: #E87C2F;
}

/* ============================================
   5-8. 帖子操作按钮
   ============================================ */
.pm-post-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 12px;
}

.pm-action-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pm-action-button:hover {
    border-color: #E87C2F;
    color: #E87C2F;
}

.pm-favorite-button.active {
    background: #E87C2F;
    color: #fff;
    border-color: #E87C2F;
}

/* 分享下拉菜单 */
.pm-share-dropdown {
    position: relative;
}

.pm-share-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 150px;
}

.pm-share-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.pm-share-item:hover {
    background: #f7f7f7;
    color: #E87C2F;
}

/* 举报模态框 */
.pm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.pm-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.pm-modal-close:hover {
    color: #333;
}

.pm-modal-content h3 {
    margin: 0 0 20px;
    font-size: 22px;
}

/* ============================================
   分页
   ============================================ */
.pm-pagination {
    margin: 30px 0;
    text-align: center;
}

.pm-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pm-pagination .page-numbers:hover,
.pm-pagination .page-numbers.current {
    background: #E87C2F;
    color: #fff;
    border-color: #E87C2F;
}

/* ============================================
   提示信息
   ============================================ */
.pm-notice {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pm-notice-warning {
    background: #fff9e5;
    border-left: 4px solid #dba617;
    color: #856404;
}

.pm-notice a {
    color: #E87C2F;
    font-weight: 600;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    .pm-post-item {
        grid-template-columns: 1fr;
    }
    
    .pm-post-thumbnail img {
        height: 200px;
    }
    
    .pm-post-actions {
        flex-wrap: wrap;
    }
    
    .pm-filter-form {
        flex-direction: column;
    }
    
    .pm-filter-group {
        width: 100%;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .pm-search-button {
        justify-content: center;
    }
}
