/* ── 证件照制作工具页 ── */

/* 上传区域 */
.upload-area {
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafbfc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #2563eb;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.upload-text {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.4rem;
}

.upload-link {
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.82rem;
    color: #999;
}

/* 预览区域 */
.preview-area {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    background: #f8f9fb;
    border-bottom: 1px solid #e8eaf0;
}

.preview-name {
    font-size: 0.88rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.btn-change {
    font-size: 0.82rem;
    color: #2563eb;
    background: none;
    border: 1px solid #2563eb;
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-change:hover {
    background: #f0f4ff;
}

.preview-img-wrap {
    padding: 1rem;
    text-align: center;
    max-height: 360px;
    overflow: auto;
    background: #fafafa;
}

.preview-img-wrap img {
    max-width: 100%;
    max-height: 320px;
    border-radius: 4px;
}

/* 选项区域 */
.options-area {
    margin-top: 1rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.option-tabs {
    display: flex;
    gap: 0.5rem;
}

.option-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.option-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.option-tab.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.option-hint {
    font-size: 0.82rem;
    color: #999;
    margin-top: 0.4rem;
}

/* 底色选择 */
.color-tabs {
    display: flex;
    gap: 0.5rem;
}

.color-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.color-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.color-tab.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 尺寸规格表 */
.size-table-wrap {
    overflow-x: auto;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.size-table th,
.size-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e8eaf0;
}

.size-table th {
    background: #f8f9fb;
    font-weight: 600;
    color: #333;
}

.size-table td {
    color: #555;
}

.size-table tr:last-child td {
    border-bottom: none;
}

/* 结果区域 */
.result-area {
    margin-top: 1.2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.result-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.result-preview-wrap {
    padding: 1.5rem;
    text-align: center;
    background: #fafbfc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .preview-img-wrap {
        max-height: 240px;
    }

    .option-tabs {
        flex-wrap: wrap;
    }

    .option-tab {
        flex: 0 0 calc(50% - 0.25rem);
    }

    .color-tabs {
        flex-wrap: wrap;
    }

    .color-tab {
        flex: 0 0 calc(33.33% - 0.34rem);
    }

    .result-preview-wrap {
        padding: 1rem;
        min-height: 150px;
    }

    .size-table th,
    .size-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.82rem;
    }
}