/* ============ 描字帖 - 工具特有样式 ============ */
/* 通用样式（卡片,按钮,分隔线,info-box,form-textarea 等）已由 common.css 统一提供 */

/* ---- 容器 ---- */
#miaozitie-container {
    margin-bottom: 15px;
}

/* ---- 左右两栏 flex 布局 ---- */
#miaozitie-container > .section-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

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

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

/* ---- 提示文字 ---- */
.mz-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #9ca3af;
}

/* ---- 按钮居中容器 ---- */
.btn-container-center {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
}

/* ---- 设置项 ---- */
.setting-item {
    margin-bottom: 14px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

/* ---- 换行开关行 ---- */
.mz-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- 开关 ---- */
.mz-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.mz-switch input {
    display: none;
}

.mz-switch-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: 0.25s;
}

.mz-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s;
}

.mz-switch input:checked + .mz-switch-slider {
    background: #8b5cf6;
}

.mz-switch input:checked + .mz-switch-slider::before {
    transform: translateX(20px);
}

/* ---- 滑块 ---- */
.mz-slider {
    width: 100%;
    margin-top: 6px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.mz-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8b5cf6;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
}

.mz-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8b5cf6;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
}

.mz-slider-val {
    font-weight: 600;
    color: #8b5cf6;
}

/* ---- 推荐方案独立卡片 ---- */
.presets-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 15px;
}

.presets-card .card-header {
    margin-bottom: 12px;
}

.presets-card .mz-preset-list {
    display: flex;
    gap: 8px;
}

.mz-preset-btn {
    flex: 1;
    padding: 12px 14px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mz-preset-btn:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.12);
}

.mz-preset-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.mz-preset-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #7c3aed;
    background: #f3e8ff;
    border-radius: 10px;
    vertical-align: middle;
}

.mz-preset-desc {
    font-size: 11px;
    color: #9ca3af;
}

/* ---- 快捷模式按钮 ---- */
.mz-quick-modes {
    display: flex;
    gap: 8px;
}

.mz-mode-btn {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    background: #fff;
}

.mz-mode-btn:hover {
    border-color: #8b5cf6;
    background: #f9fafb;
}

.mz-mode-btn.active {
    background: #f3e8ff;
    border-color: #8b5cf6;
    color: #7c3aed;
    font-weight: 600;
}

/* ---- 纸张规格 ---- */
.mz-paper-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.mz-paper-icon {
    font-size: 18px;
}

.mz-paper-spec {
    font-size: 13px;
    font-weight: 500;
    color: #166534;
}

/* ---- 颜色圆点 ---- */
.mz-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mz-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: inline-block;
}

.mz-color-dot:hover {
    transform: scale(1.15);
}

.mz-color-dot.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.mz-color-dot[style*="#ffffff"] {
    border: 2px solid #d1d5db;
}

.mz-color-dot[style*="#ffffff"].active {
    border-color: #8b5cf6;
}

/* ---- 字帖类型按钮 ---- */
.mz-grid-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mz-grid-btn {
    padding: 10px 12px;
    text-align: center;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mz-grid-btn:hover {
    border-color: #8b5cf6;
    background: #f9fafb;
}

.mz-grid-btn.active {
    background: #f3e8ff;
    border-color: #8b5cf6;
    color: #7c3aed;
    font-weight: 600;
}

/* ---- 翻页控件 ---- */
.mz-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 0;
}

.mz-pagination-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mz-page-btn {
    padding: 6px 16px;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mz-page-btn:hover:not(:disabled) {
    background: #f3e8ff;
    border-color: #8b5cf6;
    color: #7c3aed;
}

.mz-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mz-page-indicator {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* ---- 预览分页 ---- */
.mz-preview-page {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    display: inline-flex;
}

/* ---- 预览区域 ---- */
.mz-preview-area {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mz-sheet {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.mz-row {
    display: flex;
    gap: 0;
    justify-content: flex-start;
    margin: 5px 0;
}

.mz-row:first-child {
    margin-top: 0;
}

.mz-row:last-child {
    margin-bottom: 0;
}

.mz-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: -2px;
}

.mz-cell:first-child {
    margin-left: 0;
}

/* ---- 单元格内文字 ---- */
.mz-char {
    font-family: "妤蜂綋","妤蜂綋_gb2312","楷体","楷体_gb2312","Kaiti SC","STKaiti","AR PL UKai CN","AR PL UKai HK",
                 "AR PL UKai TW","AR PL UKai TW MBE","AR PL KaitiM GB","KaiTi",
                 "KaiTi_GB2312","DFKai-SB","TW-Kai",serif;
    color: #999;
    font-size: 40px;
    font-weight: normal;
    user-select: none;
    z-index: 1;
}



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

    .btn-container-center {
        flex-direction: column;
    }

    .btn-container-center .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mz-grid-types {
        grid-template-columns: 1fr 1fr;
    }
}
