/**
 * NanoNside - 공지사항 스타일
 */

/* 검색 영역 */
.search-section {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    max-width: 400px;
}

/* 테이블 스타일 */
.notice-table {
    table-layout: fixed;
}

.notice-table .col-no {
    width: 120px;
    text-align: center;
}

.notice-table .col-title {
    width: auto;
}

.notice-table .col-date {
    width: 160px;
    text-align: center;
}

.notice-table .col-views {
    width: 120px;
    text-align: center;
}

.notice-table td {
    vertical-align: middle;
    text-align: center;
}

.notice-table .col-no,
.notice-table td:first-child {
    text-align: center;
}

.notice-table .col-date,
.notice-table td:nth-child(3) {
    text-align: center;
}

.notice-table .col-views,
.notice-table td:nth-child(4) {
    text-align: center;
}

/* 상단 고정 공지 스타일 */
.notice-row-pinned {
    background-color: #fef3c7;
}

.notice-row-pinned:hover {
    background-color: #fde68a;
}

.notice-title-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-pin-icon {
    width: 1rem;
    height: 1rem;
    color: #f59e0b;
    flex-shrink: 0;
    display: block;
    margin: 0 auto;
}

.notice-badge-important {
    display: inline-block;
    background-color: #ef4444;
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 500;
    flex-shrink: 0;
}

.notice-title-text {
    color: #374151;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-title-text:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* 상세 페이지 스타일 */
.back-link-container {
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    color: #f59e0b;
}

.back-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.notice-detail-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notice-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.notice-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notice-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.meta-separator {
    color: #d1d5db;
}

.notice-content {
    line-height: 1.8;
    color: #374151;
    min-height: 200px;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

/* 첨부파일 스타일 */
.attachment-section {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.attachment-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

.attachment-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
    flex-shrink: 0;
}

.attachment-name {
    flex: 1;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-name:hover {
    text-decoration: underline;
}

.attachment-size {
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* 이전글/다음글 네비게이션 */
.notice-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notice-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.notice-nav-item:hover {
    background-color: #f3f4f6;
}

.notice-nav-label {
    width: 60px;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

.notice-nav-title {
    flex: 1;
    color: #374151;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-nav-title:hover {
    color: #f59e0b;
}

/* 빈 데이터 메시지 */
.empty-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

/* 반응형 */
@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
    }

    .search-input {
        max-width: none;
    }

    .notice-table .col-no {
        width: 50px;
    }

    .notice-table .col-date {
        width: 70px;
    }

    .notice-table .col-views {
        display: none;
    }

    .notice-table td:nth-child(4) {
        display: none;
    }

    .notice-title {
        font-size: 1.25rem;
    }

    .notice-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .notice-nav-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .notice-nav-label {
        width: auto;
    }
}

/* 페이지네이션 컨테이너 */
.pagination-container {
    margin-top: 1.5rem;
}

/* 유틸리티 */
.hidden {
    display: none !important;
}
