/* ============ 字符串数组排序 - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box、form-textarea 等）已由 common.css 统一提供 */

/* ---- 容器 ---- */
#sort-container {
    margin-bottom: 15px;
}

/* ---- 左右两栏 flex 布局 ---- */
#sort-container > .section-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#sort-container > .section-row > .settings-card,
#sort-container > .section-row > .preview-card {
    flex: 1;
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- 输入统计 ---- */
.sort-stats {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
}

.sort-stats strong {
    color: #374151;
    font-weight: 600;
}

/* ---- 单选按钮组 ---- */
.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
    transition: all 0.2s ease;
    user-select: none;
}

.radio-item:hover {
    border-color: #a78bfa;
    background: #f5f3ff;
}

.radio-item.active {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    color: #5b21b6;
}

.radio-item input[type="radio"] {
    accent-color: #8b5cf6;
    width: 16px;
    height: 16px;
    margin: 0;
}

/* ---- 排序结果列表 ---- */
.sort-result-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sort-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    transition: background 0.15s;
}

.sort-result-item:hover {
    background: #f3f4f6;
}

.sort-result-index {
    width: 32px;
    font-weight: 700;
    color: #8b5cf6;
    margin-right: 12px;
    text-align: right;
    flex-shrink: 0;
    font-size: 13px;
}

.sort-result-value {
    flex: 1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #374151;
    word-break: break-all;
    line-height: 1.5;
}

/* ---- 结果统计 ---- */
.result-count {
    font-size: 13px;
    font-weight: 600;
    color: #8b5cf6;
    background: #ede9fe;
    padding: 2px 10px;
    border-radius: 12px;
}

/* ---- 空状态 ---- */
#sort-container .empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9ca3af;
}

#sort-container .empty-state-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

#sort-container .empty-state-desc {
    font-size: 14px;
    color: #888;
}

/* ---- 功能说明信息区 ---- */
#app > .info-section {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    #sort-container > .section-row {
        flex-direction: column;
        gap: 12px;
    }

    .radio-group {
        flex-direction: column;
    }

    .sort-result-list {
        max-height: 300px;
    }

    #app > .info-section {
        grid-template-columns: 1fr;
    }
}
