/**
 * SGO SVG图标样式
 * 为SGO文件类型的SVG图标提供样式定义
 */

/* 基础SGO SVG图标样式 */
.file-icon-svg {
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    transition: all 0.3s ease;
}

/* SGO图标特定样式 */
svg.file-icon-svg path {
    fill: #4A90E2; /* SGO图标主色调 - 蓝色 */
    transition: fill 0.3s ease;
}

/* 搜索结果中的SGO图标 */
.search-results .file-icon svg.file-icon-svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.search-results .file-icon svg.file-icon-svg path {
    fill: #4A90E2;
}

/* 文件树中的SGO图标 */
.file-tree .file-icon svg.file-icon-svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

.file-tree .file-icon svg.file-icon-svg path {
    fill: #4A90E2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-results .file-icon svg.file-icon-svg {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }
    
    .file-tree .file-icon svg.file-icon-svg {
        width: 12px;
        height: 12px;
        margin-right: 4px;
    }
}

@media (max-width: 480px) {
    .search-results .file-icon svg.file-icon-svg {
        width: 12px;
        height: 12px;
        margin-right: 4px;
    }
    
    .file-tree .file-icon svg.file-icon-svg {
        width: 10px;
        height: 10px;
        margin-right: 3px;
    }
}

/* 悬停效果 */
.search-results .file-item:hover .file-icon svg.file-icon-svg path,
.file-tree .file-item:hover .file-icon svg.file-icon-svg path {
    fill: #357ABD; /* 悬停时的深蓝色 */
}

/* 激活状态 */
.search-results .file-item.active .file-icon svg.file-icon-svg path,
.file-tree .file-item.active .file-icon svg.file-icon-svg path {
    fill: #2E6DA4; /* 激活时的更深蓝色 */
}

/* 加载状态 */
.search-results .file-item.loading .file-icon svg.file-icon-svg,
.file-tree .file-item.loading .file-icon svg.file-icon-svg {
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    svg.file-icon-svg path {
        fill: #5BA3F5; /* 暗色主题下的浅蓝色 */
    }
    
    .search-results .file-item:hover .file-icon svg.file-icon-svg path,
    .file-tree .file-item:hover .file-icon svg.file-icon-svg path {
        fill: #7BB8F7; /* 暗色主题悬停色 */
    }
    
    .search-results .file-item.active .file-icon svg.file-icon-svg path,
    .file-tree .file-item.active .file-icon svg.file-icon-svg path {
        fill: #9CCBF9; /* 暗色主题激活色 */
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    svg.file-icon-svg path {
        fill: #000080; /* 高对比度模式下的深蓝色 */
    }
    
    @media (prefers-color-scheme: dark) {
        svg.file-icon-svg path {
            fill: #87CEEB; /* 暗色高对比度模式下的天蓝色 */
        }
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .file-icon-svg,
    svg.file-icon-svg path {
        transition: none;
    }
    
    .search-results .file-item.loading .file-icon svg.file-icon-svg,
    .file-tree .file-item.loading .file-icon svg.file-icon-svg {
        animation: none;
        opacity: 0.7;
    }
}