/* documents.html - 자료실 페이지 전용 스타일 */
.doc-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-controls select {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    font-size: 0.88rem;
    color: var(--text-medium);
    background-color: white;
    cursor: pointer;
    outline: none;
}

/* ═══ 서식자료 미니탭 스타일 ═══ */
.doc-sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.doc-sub-tab-btn {
    padding: 8px 18px;
    border: 1px solid var(--border-light);
    background: #f8fafc;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s;
}

.doc-sub-tab-btn:hover {
    background: #f1f5f9;
    color: var(--color-primary);
}

.doc-sub-tab-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sub-tab-section {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .doc-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-controls select {
        width: 100%;
    }

    .doc-sub-tabs {
        gap: 6px;
    }

    .doc-sub-tab-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

/* ═══ HWP/HWPX 듀얼 다운로드 버튼 ═══ */
.file-dl-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.file-dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    text-decoration: none !important;
    color: white !important;
    font-size: 0.65rem;
    font-weight: 800;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.file-dl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    color: white !important;
    text-decoration: none !important;
}

.file-dl-btn:active {
    transform: translateY(0);
}

.file-dl-btn.hwp {
    background: #1565C0;
}

.file-dl-btn.hwp:hover {
    background: #0D47A1;
}

.file-dl-btn.hwpx {
    background: #2E7D32;
    font-size: 0.55rem;
}

.file-dl-btn.hwpx:hover {
    background: #1B5E20;
}

.file-dl-btn.pdf {
    background: #C62828;
}

.file-dl-btn.pdf:hover {
    background: #B71C1C;
}

.file-dl-btn.jpg {
    background: #E65100;
}

.file-dl-btn.jpg:hover {
    background: #BF360C;
}

.file-dl-btn.zip {
    background: #7c3aed;
}

.file-dl-btn.zip:hover {
    background: #6d28d9;
}

.file-dl-btn svg {
    width: 10px;
    height: 10px;
}

div.file-item {
    cursor: default;
    display: flex;
    align-items: center;
}

/* 다운로드 횟수 정보 스타일 */
div.file-item .file-stats {
    color: #9E9E9E;
    font-size: 0.7rem;
    font-weight: 500;
    gap: 0;
}

/* 모바일 버튼 크기 — 컴팩트 가로 pill */
@media (max-width: 768px) {
    .file-dl-btn {
        width: auto !important;
        min-width: 36px;
        max-width: none;
        height: 26px !important;
        padding: 2px 8px !important;
        font-size: 0.6rem;
        border-radius: 5px;
        gap: 2px;
        flex-direction: row;
    }

    .file-dl-btn.hwpx {
        font-size: 0.55rem;
    }

    .file-dl-btn svg {
        width: 8px !important;
        height: 8px !important;
    }

    /* Mobile download box compact height */
    #mobileRoot a[download].rounded-xl,
    #mobileRoot div.rounded-xl.bg-surface {
        padding: 6px 10px !important;
        gap: 8px !important;
    }
}
