/* ============ 控件部件（common.css 未提供的统一配套样式） ============ */
.content-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

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

.content-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.content-textarea:focus {
    border-color: #8b5cf6;
}

/* 范围滑块（统一控件） */
.range-with-value {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.range-slider {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

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

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

.range-value {
    font-size: 13px;
    font-weight: 600;
    color: #6d28d9;
    min-width: 52px;
    text-align: right;
}

.range-slider.small {
    width: 50px;
    flex: 0 0 auto;
}

.range-slider.small::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
}

.range-slider.small::-moz-range-thumb {
    width: 12px;
    height: 12px;
}

/* 分段选择（样式对齐 giftupiansuofang 的缩放模式按钮） */
.mode-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    padding: 8px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.mode-btn:hover {
    border-color: #c4b5fd;
}

.mode-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #6d28d9;
}

.mode-selector.compact {
    flex-wrap: nowrap;
}

.mode-selector.compact .mode-btn {
    padding: 4px 8px;
    min-width: auto;
    font-size: 11px;
}

/* 复选框行（统一控件） */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-row input {
    margin: 0;
}

.checkbox-row span {
    font-size: 13px;
    color: #374151;
}

/* 上传占位（统一控件） */
.upload-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 40px;
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

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

/* 预览区（统一控件） */
.preview-area {
    padding: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-area-clickable {
    cursor: pointer;
}

/* 颜色选择 */
.color-picker {
    width: 44px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

/* ============ 二维码专属样式 ============ */
.style-settings {
    padding: 12px;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.type-btn.active {
    border-color: #8b5cf6;
    background: #ede9fe;
}

.type-icon {
    font-size: 24px;
}

.type-name {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.style-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.style-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.style-control {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.logo-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-upload-area.compact {
    padding: 6px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.logo-upload-area.compact:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.logo-placeholder-small,
.logo-preview-small {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.logo-preview-small {
    position: relative;
}

.logo-preview-small img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: contain;
}

.logo-preview-small .logo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.logo-placeholder-small span {
    font-size: 11px;
}

.logo-size-slider {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.qr-preview-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, transparent 0% 50%) 50% / 16px 16px;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.qr-code-display canvas,
.qr-code-display img {
    max-width: 100%;
    height: auto;
}

.qr-tip {
    margin: 12px 0 0;
    font-size: 12px;
    color: #d97706;
    text-align: center;
}

@media (max-width: 768px) {
    .section-row-1-2 {
        grid-template-columns: 1fr;
    }
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
