/* ====== Base64 转图片 专属样式（布局/按钮等通用样式由 common.css 提供） ====== */

/* 禁用态明显置灰，输入后有内容时启用态（紫色）才高亮 */
.btn-purple:disabled {
    background: #e8e8e8;
    color: #999;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-purple:not(:disabled) {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

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

/* 让图片尺寸显示在 card-header 中间 */
.card-header .image-size {
    flex: 1;
    text-align: center;
}

.code-editor {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #1e1e1e;
    color: #d4d4d4;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}

.code-editor:focus {
    outline: none;
    border-color: #8b5cf6;
}

.crop-wrapper {
    max-height: 500px;
    overflow: hidden;
    border-radius: 8px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.empty-preview {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fafafa;
}
