/* ===== 名片 vCard 二维码工具与美化名片样式 - 2026 精美 UI 规范 ===== */

.qrcode-vcard-page {
    background-color: var(--page-bg, #f8fafc);
}

/* 预设名片模板选择网格 */
.vcard-template-section {
    background: #f8fafc;
    border: 1px solid var(--border-main, #e2e8f0);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.vcard-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    margin-bottom: 10px;
    display: block;
}

.vcard-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.vcard-template-item {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
}

.vcard-template-item:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.vcard-template-item.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.vcard-template-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* 高级自定义设置面板 */
.vcard-advanced-box {
    background: #f8fafc;
    border: 1px solid var(--border-main, #e2e8f0);
    border-radius: 10px;
    padding: 14px;
    margin-top: 14px;
}

/* 正方形紧凑颜色选择器 */
.vcard-color-picker-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid var(--border-main, #cbd5e1);
    border-radius: 6px;
    padding: 3px 10px;
    height: 38px;
}

.vcard-color-swatch {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.vcard-color-swatch::-webkit-color-swatch-wrapper {
    padding: 0;
}

.vcard-color-swatch::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.vcard-color-hex {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    font-family: monospace;
    text-transform: uppercase;
}

/* 实时可打印电子名片 Preview Stage */
.vcard-preview-stage {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.vcard-preview-stage .vcard-banner {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.vcard-preview-stage .vcard-avatar-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.vcard-preview-stage .vcard-header-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vcard-preview-stage .vcard-display-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.vcard-preview-stage .vcard-display-sub {
    font-size: 11.5px;
    opacity: 0.9;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 二维码容器 */
.vcard-preview-stage .vcard-qr-box {
    width: 180px;
    height: 180px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.vcard-preview-stage .vcard-qr-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 详细联系方式列表条 */
.vcard-preview-stage .vcard-details-list {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.vcard-detail-item .item-label {
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vcard-detail-item .item-val {
    color: #0f172a;
    font-weight: 700;
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcard-footer-tip {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 5 款模板主题样式切换适配 ===== */

/* 1. 商务精英蓝 (business) */
.vcard-preview-stage[data-style="business"] {
    background: #ffffff;
    border-color: #bfdbfe;
}
.vcard-preview-stage[data-style="business"] .vcard-banner {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
}
.vcard-preview-stage[data-style="business"] .vcard-details-list {
    background: #eff6ff;
    border-color: #dbeafe;
}
.vcard-preview-stage[data-style="business"] .item-val {
    color: #1e40af;
}

/* 2. 极简质感黑 (dark) */
.vcard-preview-stage[data-style="dark"] {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}
.vcard-preview-stage[data-style="dark"] .vcard-banner {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #fbbf24;
    border: 1px solid #475569;
}
.vcard-preview-stage[data-style="dark"] .vcard-details-list {
    background: #1e293b;
    border-color: #334155;
}
.vcard-preview-stage[data-style="dark"] .item-label {
    color: #94a3b8;
}
.vcard-preview-stage[data-style="dark"] .item-val {
    color: #fbbf24;
}
.vcard-preview-stage[data-style="dark"] .vcard-footer-tip {
    color: #cbd5e1;
}

/* 3. 优雅金领 (gold) */
.vcard-preview-stage[data-style="gold"] {
    background: #fdfbf7;
    border-color: #fcd34d;
}
.vcard-preview-stage[data-style="gold"] .vcard-banner {
    background: linear-gradient(135deg, #b45309, #78350f);
    color: #ffffff;
}
.vcard-preview-stage[data-style="gold"] .vcard-details-list {
    background: #fef3c7;
    border-color: #fde68a;
}
.vcard-preview-stage[data-style="gold"] .item-val {
    color: #78350f;
}

/* 4. 活力科技绿 (mint) */
.vcard-preview-stage[data-style="mint"] {
    background: #f0fdf4;
    border-color: #a7f3d0;
}
.vcard-preview-stage[data-style="mint"] .vcard-banner {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
}
.vcard-preview-stage[data-style="mint"] .vcard-details-list {
    background: #dcfce7;
    border-color: #bbf7d0;
}
.vcard-preview-stage[data-style="mint"] .item-val {
    color: #166534;
}

/* 5. 纯二维码 (pure) */
.vcard-preview-stage[data-style="pure"] {
    background: #ffffff;
    border-color: #e2e8f0;
}
.vcard-preview-stage[data-style="pure"] .vcard-banner {
    display: none;
}

/* ===== 适用场景与指南 4 卡片网格布局 ===== */
.vcard-scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.vcard-scenario-card {
    background: #ffffff;
    border: 1px solid var(--border-main, #e2e8f0);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.vcard-scenario-card:hover {
    border-color: #2563eb;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.vcard-scenario-card .scenario-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.vcard-scenario-card .scenario-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.vcard-scenario-card .scenario-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    margin: 0 0 3px 0;
}

.vcard-scenario-card .scenario-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.vcard-scenario-card .scenario-desc {
    font-size: 12.5px;
    color: var(--text-sub, #475569);
    line-height: 1.6;
    margin: 0;
}
