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

/* Form 레이아웃 스타일 */
#listForm {
    width: 100%;
    box-sizing: border-box;
}

/* 게시판 유형 필터 스타일 */
.board-type-filter {
    margin-top: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.filter-tab:hover {
    color: #2c5aa0;
    background-color: #f8f9fa;
}

.filter-tab.active {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
    background-color: #fff;
    font-weight: 600;
}

/* 헤더 스타일 개선 */
.sub__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-admin-manage, .btn-admin-add {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-admin-manage {
    background-color: #6c757d;
    color: white;
}

.btn-admin-manage:hover {
    background-color: #5a6268;
}

.btn-admin-add {
    background-color: #3d3c54;
    color: white;
}

.btn-admin-add:hover {
    background-color: #3d3c54;
}

/* 관리 페이지 전용 스타일 */
.manage-container {
    margin-top: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.manage-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.manage-table th,
.manage-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.manage-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.conference-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #28a745;
    color: white;
}

.status-badge.inactive {
    background-color: #6c757d;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}

.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action.view {
    background-color: #17a2b8;
    color: white;
}

.btn-action.view:hover {
    background-color: #138496;
}

.btn-action.edit {
    background-color: #28a745;
    color: white;
}

.btn-action.edit:hover {
    background-color: #218838;
}

.btn-action.delete {
    background-color: #dc3545;
    color: white;
}

.btn-action.delete:hover {
    background-color: #c82333;
}

.no-conferences {
    text-align: center;
    padding: 60px 20px;
}

.no-conferences .btn-admin-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
}

.no-conferences .icon-plus:before {
    content: "+";
    font-weight: bold;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    /* 헤더 반응형 - 같은 행에 유지 */
    .sub__header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .sub__title {
        font-size: 20px;
        flex: 1;
        min-width: 0;
    }
    
    .admin-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .btn-admin-manage, .btn-admin-add {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* 탭 네비게이션 반응형 */
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tab {
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    /* 검색 영역 반응형 */
    .board_list__search {
        width: 100%;
    }
    
    .board_list__input {
        width: 100%;
        font-size: 16px; /* iOS 줌 방지 */
    }
    
    /* 테이블 반응형 - 카드 형태로 변경 */
    .sub3_1 .board_list__table colgroup {
        display: none !important;
    }
    
    .sub3_1 .board_list__table {
        border: none !important;
        table-layout: auto !important;
    }
    
    .sub3_1 .board_list__table thead {
        display: none !important;
    }
    
    .sub3_1 .board_list__table tbody tr {
        display: flex !important;
        align-items: center !important;
        border: none !important;
        border-bottom: 1px solid #e0e0e0 !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        padding: 12px 15px !important;
        background: white !important;
        box-shadow: none !important;
        gap: 15px !important;
    }
    
    .sub3_1 .board_list__table tbody tr:hover {
        background-color: #f8f9fa !important;
    }
    
    .sub3_1 .board_list__table tbody tr:last-child {
        border-bottom: none !important;
    }
    
    .sub3_1 .board_list__table tbody td {
        display: flex !important;
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
        margin: 0 !important;
    }
    
    .sub3_1 .board_list__table tbody td:first-child {
        display: none !important; /* 번호 숨김 */
    }
    
    .sub3_1 .board_list__table .board_list__title_col {
        flex: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        min-width: 0 !important; /* flex item이 축소될 수 있도록 */
    }
    
    .sub3_1 .board_list__table .board_list__title_col a {
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 1.3 !important;
        color: #333 !important;
        display: block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(3) {
        display: flex !important;
        align-items: center !important;
        font-size: 12px !important;
        color: #666 !important;
        white-space: nowrap !important;
        margin-right: 10px !important;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(3):before {
        content: "";
        margin-right: 0;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(4) {
        display: flex !important;
        align-items: center !important;
        font-size: 12px !important;
        color: #666 !important;
        white-space: nowrap !important;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(4):before {
        content: "조회 ";
        margin-right: 2px;
        font-size: 11px;
    }
    
    /* 관리 테이블 반응형 */
    .manage-table,
    .board_list__table {
        border: none;
    }
    
    .manage-table thead,
    .board_list__table thead {
        display: none;
    }
    
    .manage-table tbody tr,
    .board_list__table tbody tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .manage-table tbody td,
    .board_list__table tbody td {
        display: block;
        border: none;
        padding: 5px 0;
        text-align: left !important;
    }
    
    /* 관리 테이블 특화 스타일 */
    .manage-table tbody tr {
        position: relative;
    }
    
    .manage-table .conference-info {
        margin-bottom: 12px;
    }
    
    .manage-table .conference-info h4 {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .manage-table tbody td:nth-child(2) {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .manage-table tbody td:nth-child(2):before {
        content: "상태: ";
        font-weight: 600;
        color: #666;
        margin-right: 8px;
        font-size: 12px;
    }
    
    .manage-table tbody td:nth-child(3) {
        display: flex;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .manage-table tbody td:nth-child(3):before {
        content: "작성자: ";
        font-weight: 600;
        color: #666;
        margin-right: 8px;
        font-size: 12px;
    }
    
    .manage-table .action-cell {
        border-top: 1px solid #f0f0f0;
        padding-top: 12px !important;
        margin-top: 8px;
        width: 100%;
    }
    
    .manage-table .action-buttons {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .manage-table .btn-action {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    
    /* 일반 게시판 테이블 반응형 */
    .board_list__table tbody tr {
        margin-bottom: 15px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .board_list__table tbody td {
        display: block;
        border: none;
        padding: 0;
        text-align: left !important;
    }
    
    .board_list__table tbody td:first-child {
        font-size: 12px;
        color: #666;
        margin-bottom: 8px;
    }
    
    .board_list__table tbody td:first-child:before {
        content: "번호: ";
        font-weight: 600;
    }
    
    .board_list__title_col {
        margin-bottom: 12px;
    }
    
    .board_list__title_col a {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.4;
        color: #333;
    }
    
    .board_list__table tbody td:nth-child(3) {
        display: inline-block;
        margin-right: 15px;
        margin-bottom: 8px;
        font-size: 13px;
        color: #666;
    }
    
    .board_list__table tbody td:nth-child(3):before {
        content: "등록일: ";
        font-weight: 500;
    }
    
    .board_list__table tbody td:nth-child(4) {
        display: inline-block;
        margin-right: 15px;
        margin-bottom: 8px;
        font-size: 13px;
        color: #666;
    }
    
    .board_list__table tbody td:nth-child(4):before {
        content: "조회수: ";
        font-weight: 500;
    }
    
    /* 관리 버튼들 반응형 */
    .board_list__table tbody td:last-child {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }
    
    .btn-action {
        margin: 2px;
        padding: 6px 10px;
        font-size: 11px;
        min-width: 50px;
    }
    
    /* 페이지네이션 반응형 */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a, .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    /* 모달 반응형 */
    .modal-content {
        width: 90%;
        max-width: 400px;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .modal p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    /* 빈 상태 메시지 모바일 */
    .no-conferences {
        padding: 40px 15px;
    }
    
    .no-conferences .btn-admin-add {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sub__title {
        font-size: 18px;
    }
    
    .btn-admin-manage, .btn-admin-add {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .filter-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 일반 게시판 테이블 */
    .sub3_1 .board_list__table tbody tr {
        padding: 10px 12px !important;
        margin-bottom: 0 !important;
        gap: 10px !important;
    }
    
    .sub3_1 .board_list__table .board_list__title_col a {
        font-size: 13px !important;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(3),
    .sub3_1 .board_list__table tbody td:nth-child(4) {
        font-size: 11px !important;
    }
    
    .sub3_1 .board_list__table tbody td:nth-child(3) {
        margin-right: 8px !important;
    }
    
    /* 관리 테이블 */
    .manage-table tbody tr,
    .board_list__table tbody tr {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .manage-table .conference-info h4 {
        font-size: 15px;
    }
    
    .manage-table .btn-action,
    .btn-action {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 45px;
    }
    
    .board_list__title_col a {
        font-size: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
}
