/* ============ 图片裁剪 - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box、empty-state等）已由 common.css 统一提供 */

/* ---- 容器 + 左右 1:2 布局 ---- */
#tc-container {
    margin-bottom: 15px;
}

#tc-container > .section-row {
    display: flex;
    gap: 15px;
}

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

#tc-container > .section-row > .preview-card {
    flex: 2;
    margin-top: 0;
    margin-bottom: 0;
}

/* ---- 头部右侧原图尺寸 ---- */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.image-size {
    font-size: 12px;
    color: #6b7280;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ---- 裁剪比例选项 ---- */
.ratio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-ratio {
    padding: 6px 12px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ratio:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-ratio.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    color: white;
}

/* ---- 自定义比例 ---- */
.custom-ratio {
    margin-top: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.custom-ratio-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.custom-ratio-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-ratio-item label {
    font-size: 12px;
    color: #6b7280;
}

.custom-input {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.custom-input:focus {
    border-color: #8b5cf6;
}

.custom-ratio-sep {
    font-size: 16px;
    color: #6b7280;
    padding-bottom: 6px;
    flex-shrink: 0;
}

/* ---- 操作按钮（旋转/翻转） ---- */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.btn-action {
    padding: 6px 12px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover:not(:disabled) {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- 缩放/质量滑块 ---- */
.zoom-slider {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.zoom-slider:disabled {
    opacity: 0.5;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #8b5cf6;
    border-radius: 50%;
    cursor: pointer;
}

.zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #8b5cf6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* ---- 输出格式 ---- */
.format-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.format-item:hover {
    border-color: #c4b5fd;
}

.format-item.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.format-item input {
    cursor: pointer;
}

/* ---- 裁剪信息 ---- */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.info-label {
    color: #6b7280;
}

.info-value {
    color: #374151;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* ---- 预览/裁剪区 ---- */
.crop-wrapper {
    max-height: 600px;
    overflow: hidden;
    border-radius: 8px;
    background: #1f2937;
}

.crop-wrapper.drag-over {
    border: 2px dashed #8b5cf6;
}

.crop-wrapper img {
    display: block;
    max-width: 100%;
}

/* ---- 上传区 ---- */
.upload-area {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 40px;
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-icon {
    font-size: 48px;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.upload-hint {
    font-size: 13px;
    color: #9ca3af;
}

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

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

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