/* Solutioo DocumentHub - Frontend Styles */

/* Container */
.solutioo-documenthub-tab,
.solutioo-documenthub-section .documenthub-section-content {
    padding: 15px 0;
}

/* Section header (collapsible) */
.solutioo-documenthub-section {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.documenthub-section-header {
    background: #f5f5f5;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.documenthub-section-header:hover {
    background: #eee;
}

.documenthub-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.documenthub-toggle-icon::after {
    content: '\25BC'; /* down arrow */
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

[data-collapsible="true"] .documenthub-toggle-icon::after {
    transform: rotate(-90deg);
}

.documenthub-section-content {
    padding: 16px;
}

/* Type group */
.documenthub-type-group {
    margin-bottom: 20px;
}

.documenthub-type-group:last-child {
    margin-bottom: 0;
}

.documenthub-type-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.documenthub-count {
    font-weight: 400;
    color: #888;
    font-size: 13px;
}

/* Document list */
.documenthub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.documenthub-item {
    margin-bottom: 4px;
}

.documenthub-item:last-child {
    margin-bottom: 0;
}

/* Download link */
.documenthub-download-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    background: #fff;
}

.documenthub-download-link:hover {
    border-color: #2196F3;
    background: #f8fbff;
    text-decoration: none;
    color: #333;
}

/* File icon */
.documenthub-file-icon::before {
    content: '\1F4C4'; /* document emoji fallback */
    font-size: 20px;
}

/* File info */
.documenthub-file-info {
    flex: 1;
    min-width: 0;
}

.documenthub-file-title {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.documenthub-file-name {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* File size */
.documenthub-file-size {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
}

/* Download icon */
.documenthub-download-icon::after {
    content: '\2B07'; /* down arrow */
    font-size: 16px;
    color: #2196F3;
    transition: transform 0.2s ease;
}

.documenthub-download-link:hover .documenthub-download-icon::after {
    transform: translateY(2px);
}

/* Type icons */
.documenthub-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    text-align: center;
}

.icon-datasheet::before { content: '\1F4CA'; font-size: 16px; }
.icon-cad::before { content: '\1F4D0'; font-size: 16px; }
.icon-certificate::before { content: '\1F4DC'; font-size: 16px; }
.icon-manual::before { content: '\1F4D6'; font-size: 16px; }
.icon-document::before { content: '\1F4C4'; font-size: 16px; }

/* File description */
.documenthub-file-description {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0 44px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .documenthub-download-link {
        padding: 8px 10px;
        gap: 8px;
    }

    .documenthub-file-size {
        display: none;
    }

    .documenthub-file-title {
        font-size: 13px;
    }

    .documenthub-file-description {
        margin-left: 0;
    }
}
