/* 공지사항 페이지 전용 스타일 */

/* CAU 블루 색상 */
.cau-blue {
    background-color: var(--cau-blue);
}

/* 섹션 스타일 */
.user-notice-section {
    padding: 2rem 1.5rem;
    background-color: #ffffff;
    min-height: 100vh;
}

.user-notice-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 1단계: 페이지 헤더 */
.page-header {
    margin-bottom: 2rem;
}

.page-header .title {
    margin-bottom: 0;
    color: #333;
    font-weight: 700;
    font-size: 1.75rem;
}

/* 2단계: 검색영역 */
.search-section {
    margin-bottom: 1.5rem;
}

.search-input-section .field.has-addons {
    justify-content: flex-start;
    width: 100%;
}

.search-input-section .input {
    border-radius: 4px 0 0 4px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    height: 2.5rem;
    padding: 0 0.75rem;
}

.search-input-section .input:focus {
    border-color: var(--cau-blue);
    box-shadow: none;
}

.search-input-section .button {
    height: 2.5rem;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
    border: 1px solid var(--cau-blue);
    padding: 0 1.5rem;
    font-size: 0.9rem;
}

.search-input-section .button:hover {
    background-color: #005a9a;
}

/* 3단계: 카운트 및 등록 버튼 영역 */
.count-register-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0;
}

.result-count p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.result-count span {
    color: #333;
    font-weight: 600;
}

.register-button .button {
    border-radius: 4px;
    font-weight: 500;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    height: 2.5rem;
}

.register-button .button:hover {
    background-color: #005a9a;
}

/* 4. 데이터 표출 영역 */
.data-display-section {
    margin-bottom: 2rem;
}

/* 반응형 뷰 제어 */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

/* === 데스크톱: 공지사항 테이블 스타일 (이미지와 동일하게) === */
.notice-table-container {
    background: white;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.notice-table {
    margin-bottom: 0;
    background: white;
    width: 100%;
    border-collapse: collapse;
}

.notice-table thead {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.notice-table thead th {
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 500;
    color: #666;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.9rem;
    border-right: none;
}

.notice-table tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.notice-table tbody tr:hover {
    background-color: #f8f9fa;
}

.notice-table tbody tr:last-child {
    border-bottom: 1px solid #f1f3f4;
}

.notice-table tbody td {
    border: none;
    padding: 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
    border-right: none;
}

/* 테이블 열 설정 */
.notice-title-header {
    text-align: center;
    width: auto;
}

.notice-author-header {
    width: 120px;
    text-align: center;
}

.notice-date-header {
    width: 120px;
    text-align: center;
}

/* 테이블 셀 스타일 */
.notice-title {
    text-align: left;
    padding-left: 1rem !important;
    position: relative;
}

.notice-title .notice-number {
    display: inline-block;
    color: #999;
    font-size: 0.85rem;
    margin-right: 1rem;
    min-width: 30px;
    text-align: left;
}

.notice-author {
    width: 120px;
    text-align: center;
    color: #666;
}

.notice-date {
    width: 120px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* === 모바일: 공지사항 카드 스타일 === */
.notice-cards-container {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.notice-card {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notice-card:last-child {
    border-bottom: none;
}

.notice-card:hover {
    background-color: #f8f9fa;
}

.notice-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.notice-card-number {
    background-color: var(--cau-blue);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 25px;
    text-align: center;
    flex-shrink: 0;
}

.notice-card-date {
    color: #999;
    font-size: 0.8rem;
}

.notice-card-title {
    margin-bottom: 0.75rem;
}

.notice-card-title .notice-title-text {
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

.notice-card-footer {
    display: flex;
    justify-content: flex-end;
}

.notice-card-author {
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
}

/* 공지 라벨 스타일 - 이미지와 정확히 동일하게 */
.notice-urgent {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.notice-title-text {
    color: #333;
    font-weight: 400;
    text-decoration: none;
}

.notice-title-text:hover {
    color: var(--cau-blue);
    text-decoration: none;
}

/* 날짜 스타일 */
.notice-date-text {
    color: #999;
    font-size: 0.85rem;
}

/* 작성자 스타일 */
.notice-author-text {
    color: #666;
    font-weight: 400;
}

/* 5. 페이징 처리 영역 - 원우아이템과 동일하게 */
.pagination-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.pagination-previous {
    order: 1;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #666;
    font-weight: 500;
    background: white;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.pagination-list {
    order: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.pagination-next {
    order: 3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #666;
    font-weight: 500;
    background: white;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.pagination-previous:hover,
.pagination-next:hover {
    border-color: var(--cau-blue);
    color: var(--cau-blue);
    background-color: #f8f9fa;
}

.pagination-previous.is-disabled,
.pagination-next.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-list li {
    list-style: none;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    color: #666;
    font-weight: 500;
    background: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.pagination-link:hover {
    border-color: var(--cau-blue);
    color: var(--cau-blue);
    background-color: #f8f9fa;
}

.pagination-link.is-current {
    background-color: var(--cau-blue);
    border-color: var(--cau-blue);
    color: white;
}

/* 상태 표시 영역 */
#loading-state,
#error-state,
#no-data-state {
    padding: 2rem;
    text-align: center;
}

/* 태블릿 대응 (1024px 이하) */
@media (max-width: 1024px) {
    .user-notice-section {
        padding: 1.5rem 1rem;
    }
    
    .notice-table thead th,
    .notice-table tbody td {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* 모바일 대응 (768px 이하) */
@media (max-width: 768px) {
    .desktop-view {
        display: none !important;
    }
    
    .mobile-view {
        display: block !important;
    }
    
    .user-notice-section {
        padding: 1.5rem 1rem;
    }

    .page-header .title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .search-section {
        margin-bottom: 1.5rem;
    }

    .search-input-section .field.has-addons {
        width: 100%;
    }

    .search-input-section .control.is-expanded {
        flex: 1;
    }

    .search-input-section .button {
        padding: 0 1rem;
    }

    .count-register-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .count-register-section .register-button {
        align-self: flex-end;
    }

    .notice-card {
        padding: 1rem;
    }

    .notice-card-header {
        margin-bottom: 0.5rem;
    }

    .notice-card-title {
        margin-bottom: 0.5rem;
    }

    .pagination-container {
        gap: 0.25rem;
        justify-content: center;
    }
    
    .pagination-previous {
        order: 1;
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .pagination-list {
        order: 2;
    }
    
    .pagination-next {
        order: 3;
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .pagination-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
        min-width: 35px;
    }
}

/* 소형 모바일 대응 (480px 이하) */
@media (max-width: 480px) {
    .user-notice-section {
        padding: 1rem 0.75rem;
    }

    .page-header .title {
        font-size: 1.25rem;
    }

    .search-input-section .field.has-addons {
        flex-direction: column;
    }

    .search-input-section .control.is-expanded {
        margin-bottom: 0.5rem;
    }

    .search-input-section .button {
        width: 100%;
        border-radius: 4px;
    }

    .notice-card {
        padding: 0.75rem;
    }

    .notice-card-title .notice-title-text {
        font-size: 0.9rem;
    }

    .notice-card-number {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
        min-width: 22px;
    }

    .notice-card-date,
    .notice-card-author {
        font-size: 0.75rem;
    }

    .pagination-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .pagination-container {
        gap: 0.2rem;
    }
    
    .pagination-previous {
        order: 1;
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .pagination-list {
        order: 2;
    }
    
    .pagination-next {
        order: 3;
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .pagination-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
        min-width: 30px;
    }
}

/* 대형 화면 대응 (1200px 이상) */
@media (min-width: 1200px) {
    .user-notice-section .container {
        max-width: 1400px;
    }
}

.popup-container{
    padding: 5px 0px 5px 0px;
}

.popup-content{
    padding: 3px 0px 10px 0px;
}