
/* 검색 컨테이너 스타일 */
.search-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 검색 헤더 스타일 */
.search-header {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.search-type {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 120px;
}

.search-input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 상세조건 섹션 스타일 */
.detail-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;  /* 제목 길이만큼만 차지하도록 변경 */
    position: relative;     /* 가상 요소 위치 기준점 */
    padding-bottom: 8px;    /* 밑줄과 텍스트 사이 간격 */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;           /* 텍스트 길이만큼 */
    height: 2px;           /* 선 두께 */
    background-color: #000;
}

.detail-form {
    display: flex;
    gap: 20px;
    max-width: 600px;
    margin-bottom: 20px;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-group:first-child {
    flex: 2;
}

.input-group:last-child {
    flex: 1;
}

.input-group label {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
}

.detail-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

/* 문서유형 섹션 스타일 */
.doc-type-section {
    margin-bottom: 20px;
    text-align: left;
}

.subsection-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
}

.checkbox-group {
    display: inline-flex;
    gap: 10px;
}

.checkbox-button {
    position: relative;
    display: inline-block;
}

.checkbox-button input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-button label {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.checkbox-button input[type="checkbox"]:checked + label {
    background: #0052cc;
    color: white;
    border-color: #0052cc;
}

/* 문서요소 섹션 스타일 */
.doc-element-section {
    text-align: left;
    margin-bottom: 20px;
}

.element-group {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.element-checkbox {
    position: relative;
    display: inline-block;
}

.element-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.element-checkbox label {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    transition: all 0.3s ease;
}

.element-checkbox input[type="checkbox"]:checked + label {
    background: #0052cc;
    color: white;
}

/* 검색결과 섹션 스타일 */
.results-section {
    margin-top: 30px;
}

.results-header {
    margin-bottom: 20px;
}

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 8px;
}

.results-count {
    color: #666;
    font-size: 14px;
}

.page-size-wrapper {
    position: relative;
}

.page-size-selector {
    padding: 8px 36px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    min-width: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.page-size-selector:hover {
    border-color: #999;
}

.page-size-selector:focus {
    outline: none;
    border-color: #0052cc;
}

/* 검색결과 테이블 스타일 */
.results-list {
    margin-top: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.results-table th {
    font-weight: 500;
    color: #666;
    font-size: 14px;
    background-color: #f8f9fa;
}

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

.text-ellipsis {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 페이지네이션 스타일 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
}

.page-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.page-arrow {
    width: 16px;
    height: 16px;
}

.page-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.page-input:focus {
    outline: none;
    border-color: #0052cc;
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.1);
}

.page-separator {
    color: #666;
}

#totalPages {
    color: #666;
    min-width: 20px;
    text-align: center;
}

/* 문서보기 버튼 스타일 */
.view-btn {
    background: #0052cc;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.view-btn:hover {
    background: #0043a7;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; 
    overflow: hidden;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    /* padding: 50px 30px 0; */
    /* height: calc(100% - 75px); */
    /* padding: 20px; */
    border: 1px solid #888;
    width: 80%;
    height: 80%;
}

#modalContent {
    background-color: #999;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.doc-nav {
    background: #0052cc;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    height: 48px;  /* 높이 고정 */
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.nav-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* .nav-button svg,
.close-button svg {
    stroke: white;  
    width: 24px;
    height: 24px;
} */

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button:hover:not(:disabled),
.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.page-info {
    font-size: 14px;
    margin: 0 8px;
    color: white;
    min-width: 60px;
    text-align: center;
}

.close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

/* 문서 뷰어 영역 */
.viewer-container {
    height: calc(100% - 48px);
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

.document-page {
    background: white;
    /* width: 100%; */
    /* width: 800px; */
    /* height: 1132px; A4 비율 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: auto;
}

#cont-img {
    width: 100%;
}