/* sortablejs-handle-order-save: SortableJSでハンドル指定・並び順保存する方法 */

.sj-demo {
  max-width: 480px;
  margin: 20px 0;
}

.sj-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

.sj-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E9F2;
  transition: background 0.1s;
}

.sj-item:last-child { border-bottom: none; }
.sj-item:hover { background: #F4F7FF; }

/* SortableJSのghostClassで付与される、ドラッグ中アイテムの見た目 */
.sj-item--ghost {
  opacity: 0.4;
}

/* ドラッグハンドル */
.sj-handle {
  flex-shrink: 0;
  color: #CBD5E1;
  font-size: 18px;
  cursor: grab;
  padding: 0 4px;
  line-height: 1;
}

.sj-handle:active { cursor: grabbing; }

.sj-body {
  flex: 1;
  min-width: 0;
}

.sj-name {
  font-size: 14px;
  font-weight: 700;
  color: #1A2332;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sj-role {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sj-status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #6B7280;
}

.sj-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.sj-reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-family: sans-serif;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sj-reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* オプション一覧表 */
.sj-option-table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.sj-option-table th,
.sj-option-table td {
  padding: 10px 12px;
  border: 1px solid #D0D7E0;
  text-align: left;
  vertical-align: top;
}

.sj-option-table th {
  background: #F4F6F9;
  color: #1A2332;
  font-weight: 600;
}

.sj-option-table td {
  color: #5A6A7A;
}

@media (max-width: 480px) {
  .sj-item { gap: 8px; padding: 10px 12px; }
  .sj-option-table { font-size: 12px; }
  .sj-option-table th,
  .sj-option-table td { padding: 8px; }
}
