/* ==========================================================================
   게시판 컴포넌트 스타일
   ========================================================================== */

/* 고급 게시판 테이블 스타일 */
.board-table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.board-table thead th {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
    border: none;
    letter-spacing: 0.5px;
    position: relative;
}

.board-table thead th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.board-table thead th:last-child::after {
    display: none;
}

.board-row {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.board-row:hover {
    background-color: rgba(74, 107, 138, 0.02);
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 var(--accent-color);
}

.board-row td {
    padding: .75rem .5rem;
    vertical-align: middle;
    border-top: none;
}

.board-num .post-number {
    color: #8a8a8a;
    font-weight: 500;
    font-size: 0.9rem;
}

.notice-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.board-title .post-link {
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-row:hover .post-link {
    color: var(--primary-color);
}

.board-title .post-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.board-title .post-link:hover::after {
    width: 100%;
}

.board-author .author-name {
    color: #666;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    font-weight: 500;
}

.board-date {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.board-views .view-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
}

/* 모바일 게시판 리스트 스타일 */
.mobile-board-list {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.mobile-board-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-board-item:hover {
    background-color: rgba(74, 107, 138, 0.02);
    transform: translateX(3px);
    box-shadow: inset 3px 0 0 var(--accent-color);
}

.mobile-board-item:last-child {
    border-bottom: none;
}

.mobile-board-item:active {
    background-color: rgba(74, 107, 138, 0.05);
    transform: translateX(1px);
}

/* 첫 번째 줄: 번호 + 제목 */
.mobile-board-row-1 {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.mobile-board-meta {
    flex-shrink: 0;
    align-self: flex-start;
}

.mobile-post-number {
    color: #8a8a8a;
    font-weight: 500;
    font-size: 0.75rem;
    background: #f8f9fa;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    min-width: 24px;
    text-align: center;
    display: inline-block;
    line-height: 1.2;
}

.mobile-notice-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    line-height: 1.2;
}

.mobile-board-title {
    flex: 1;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-word;
}

/* 두 번째 줄: 작성자, 조회수, 작성일 */
.mobile-board-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.mobile-board-author {
    font-weight: 500;
}

.mobile-board-stats {
    display: flex;
    gap: 1rem;
}

.mobile-board-views,
.mobile-board-date {
    color: #888;
}

.mobile-board-views {
    color: var(--primary-color);
    font-weight: 600;
}

.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.empty-state i {
    opacity: 0.6;
}

/* 반응형 조정 */
@media (max-width: 576px) {
    .board-card .card-body {
        padding: 1rem;
    }
    
    .board-card .card-title {
        font-size: 0.95rem;
    }
    
    .post-link-mobile {
        font-weight: 500;
    }
}

/* ==========================================================================
   댓글 관련 스타일
   ========================================================================== */

/* 댓글 수 표시 */
.comment-count {
    font-size: 0.85em;
    font-weight: 500;
}

.comment-count i {
    font-size: 0.9em;
}

/* 댓글 아이템 */
.comment-item {
    transition: background-color 0.2s ease;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.comment-item:hover {
    background-color: #f8f9fa;
}

.comment-content {
    line-height: 1.6;
    word-wrap: break-word;
    margin-top: 0.5rem;
    color: #333;
}

/* 댓글 수정 폼 */
.comment-edit-form textarea {
    resize: vertical;
    min-height: 80px;
}

.comment-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
}

/* 댓글 작성 폼 */
#commentForm textarea {
    resize: vertical;
    min-height: 80px;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease;
}

#commentForm textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 107, 138, 0.1);
}

/* 댓글 정보 스타일 */
.comment-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.comment-info .text-muted {
    font-size: 0.85rem;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .comment-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        border-radius: 0.375rem;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
    }
    
    .comment-actions {
        margin-top: 0.5rem;
    }
    
    .comment-actions .btn {
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .comment-info {
        margin-bottom: 0.5rem;
    }
    
    .comment-content {
        margin-top: 0.25rem;
        font-size: 0.9rem;
    }
    
    #commentForm textarea {
        min-height: 100px;
    }
} 