/* 자료실 상세 페이지 스타일 */
.data-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.data-title {
    font-size: 24px;
    color: var(--text-main);
    margin: 0 0 15px;
    word-break: break-word;
}

.data-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-sub2);
    gap: 15px;
}

.data-author {
    font-weight: 500;
    color: var(--text-sub1);
}

.data-content {
    min-height: 200px;
    line-height: 1.8;
    word-break: break-word;
    color: var(--text-main);
    margin-bottom: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.data-content img {
    max-width: 100%;
    height: auto;
}

/* 파일 목록 스타일 */
.data-files {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ebebeb;
}

.data-files h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.file-count {
    margin-left: 10px;
    font-size: 14px;
    color: var(--text-sub2);
    font-weight: normal;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #ebebeb;
    transition: all 0.3s;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 파일 타입별 테두리 색상 */
.file-type-pdf {
    border-left: 4px solid #F44336;
}

.file-type-doc, .file-type-docx {
    border-left: 4px solid #2196F3;
}

.file-type-ppt, .file-type-pptx {
    border-left: 4px solid #FF9800;
}

.file-type-xls, .file-type-xlsx {
    border-left: 4px solid #4CAF50;
}

.file-type-zip, .file-type-rar {
    border-left: 4px solid #9C27B0;
}

.file-type-jpg, .file-type-jpeg, .file-type-png, .file-type-gif {
    border-left: 4px solid #03A9F4;
}

/* 파일 아이콘 스타일 개선 */
.file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.file-icon i {
    font-size: 14px;
    font-weight: bold;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-transform: uppercase;
    border-radius: 4px;
}

/* 파일 아이콘 타입별 스타일 */
.file-icon-pdf {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.file-icon-pdf::before {
    content: "PDF";
}

.file-icon-doc, .file-icon-docx {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.file-icon-doc::before, .file-icon-docx::before {
    content: "DOC";
}

.file-icon-ppt, .file-icon-pptx {
    background-color: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.file-icon-ppt::before, .file-icon-pptx::before {
    content: "PPT";
}

.file-icon-xls, .file-icon-xlsx {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.file-icon-xls::before, .file-icon-xlsx::before {
    content: "XLS";
}

.file-icon-zip, .file-icon-rar {
    background-color: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.file-icon-zip::before, .file-icon-rar::before {
    content: "ZIP";
}

.file-icon-jpg, .file-icon-jpeg,
.file-icon-png, .file-icon-gif {
    background-color: rgba(3, 169, 244, 0.1);
    color: #03A9F4;
}

.file-icon-jpg::before, .file-icon-jpeg::before,
.file-icon-png::before, .file-icon-gif::before {
    content: "IMG";
}

.file-icon-hwp {
    background-color: rgba(86, 130, 163, 0.1);
    color: #5682A3;
}

.file-icon-hwp::before {
    content: "HWP";
}

.file-info {
    flex-grow: 1;
    min-width: 0;
}

.file-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.file-size, .file-type, .file-download-count {
    font-size: 13px;
    color: var(--text-sub2);
}

.file-download-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.file-download-btn:hover {
    background-color: var(--sub-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(255, 127, 42, 0.3);
}

/* 버튼 컨테이너 */
.data-actions-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

/* SNS 공유 버튼 */
.data-share {
    display: flex;
    gap: 10px;
}

.btn-share {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-share svg {
    width: 16px;
    height: 16px;
}

.btn-share-x {
    background-color: #f8f9fa;
    color: #000;
    border: 1px solid #e0e0e0;
}

.btn-share-x:hover {
    background-color: #000;
    color: #fff;
}

.btn-share-facebook {
    background-color: #f8f9fa;
    color: #1877F2;
    border: 1px solid #e0e0e0;
}

.btn-share-facebook:hover {
    background-color: #1877F2;
    color: #fff;
}

/* 액션 버튼 스타일 */
.data-actions {
    display: flex;
    gap: 10px;
}

.btn-edit,
.btn-delete,
.btn-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    height: 38px;
    min-width: 100px;
}

.btn-edit {
    background-color: #4A90E2;
    color: white;
    border: none;
}

.btn-edit:hover {
    background-color: #3A7EC9;
    box-shadow: 0 2px 5px rgba(74, 144, 226, 0.3);
}

.btn-delete {
    background-color: #E53935;
    color: white;
    border: none;
}

.btn-delete:hover {
    background-color: #D32F2F;
    box-shadow: 0 2px 5px rgba(229, 57, 53, 0.3);
}

.btn-list {
    background-color: #ECEFF1;
    color: #455A64;
    border: 1px solid #CFD8DC;
}

.btn-list:hover {
    background-color: #CFD8DC;
    color: #263238;
    box-shadow: 0 2px 5px rgba(69, 90, 100, 0.1);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .data-title {
        font-size: 20px;
    }

    .data-actions-container {
        flex-direction: column;
        align-items: stretch;
    }

    .data-share {
        justify-content: center;
        order: 2;
    }

    .data-actions {
        flex-direction: column;
        order: 1;
        width: 100%;
    }

    .btn-edit,
    .btn-delete,
    .btn-list {
        width: 100%;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .file-info {
        width: 100%;
    }

    .file-download-btn {
        width: 100%;
        justify-content: center;
    }
}