/* PNG 스프라이트 자르기 전용 스타일 (색상은 디자인 토큰만 사용) */

/* 파일 목록 (파일이 많으면 스크롤) */
.sc-file-list {
    max-height: 240px;
    overflow-y: auto;
}

/* 설정 패널 라벨 정렬 */
.sc-settings .form-label {
    min-width: 120px;
}

/* 모드 라디오 */
.sc-mode-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 배경 색상 미리보기 스와치 (감지 후 인라인 배경색으로 교체됨) */
.sc-bg-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background-size: 8px 8px;
}

/* 프리뷰 */
.sc-preview {
    margin-top: 24px;
}

.sc-preview h3,
.sc-results-header h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-text);
}

.sc-preview h3 {
    margin-bottom: 12px;
}

.sc-preview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sc-preview-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
    word-break: break-all;
}

.sc-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sc-preview-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.sc-preview-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* 결과 */
.sc-results-section {
    margin-top: 24px;
}

.sc-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.sc-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sc-results-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--color-border);
    word-break: break-all;
}

.sc-results-group-title .sc-results-group-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-left: 8px;
}

.sc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.sc-sprite-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.sc-sprite-card:hover {
    box-shadow: var(--shadow-md);
}

.sc-sprite-thumb {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 8px;
}

.sc-sprite-thumb img {
    max-width: 100%;
    max-height: 120px;
    background-size: 10px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.sc-sprite-info {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .sc-settings .form-label {
        min-width: 0;
    }

    .sc-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }

    .sc-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
