/* ===== WiFi 二维码工具与美化台卡样式 - 2026 精美 UI 规范 ===== */

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

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

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

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

.wifi-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;
}

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

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

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

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

/* 正方形紧凑颜色选择器 */
.wifi-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;
}

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

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

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

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

/* 实时可打印 WiFi 台卡/海报 Preview Stage */
.wifi-card-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;
}

/* Banner 页头标题 */
.wifi-card-banner {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    text-align: center;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.wifi-card-icon {
    font-size: 16px;
}

.wifi-card-slogan {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 二维码容器 */
.wifi-card-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);
}

.wifi-card-qr-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 详细信息条 (SSID & Password) */
.wifi-card-details {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.wifi-info-item .info-label {
    color: #64748b;
    font-weight: 500;
}

.wifi-info-item .info-val {
    color: #0f172a;
    font-weight: 700;
    font-family: monospace, sans-serif;
}

/* 底部扫码提示 */
.wifi-card-footer-tip {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

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

/* 2. 暖木咖啡店 (cafe) */
.wifi-card-preview-stage[data-style="cafe"] {
    background: #fdfbf7;
    border-color: #fcd34d;
}
.wifi-card-preview-stage[data-style="cafe"] .wifi-card-banner {
    background: linear-gradient(135deg, #b45309, #78350f);
    color: #ffffff;
}
.wifi-card-preview-stage[data-style="cafe"] .wifi-card-details {
    background: #fef3c7;
    border-color: #fde68a;
}
.wifi-card-preview-stage[data-style="cafe"] .info-val {
    color: #78350f;
}

/* 3. 清新民宿绿 (mint) */
.wifi-card-preview-stage[data-style="mint"] {
    background: #f0fdf4;
    border-color: #a7f3d0;
}
.wifi-card-preview-stage[data-style="mint"] .wifi-card-banner {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
}
.wifi-card-preview-stage[data-style="mint"] .wifi-card-details {
    background: #dcfce7;
    border-color: #bbf7d0;
}
.wifi-card-preview-stage[data-style="mint"] .info-val {
    color: #166534;
}

/* 4. 深色尊享金 (darkgold) */
.wifi-card-preview-stage[data-style="darkgold"] {
    background: #0f172a;
    border-color: #f59e0b;
    color: #f8fafc;
}
.wifi-card-preview-stage[data-style="darkgold"] .wifi-card-banner {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #fbbf24;
    border: 1px solid #f59e0b;
}
.wifi-card-preview-stage[data-style="darkgold"] .wifi-card-details {
    background: #1e293b;
    border-color: #334155;
}
.wifi-card-preview-stage[data-style="darkgold"] .info-label {
    color: #94a3b8;
}
.wifi-card-preview-stage[data-style="darkgold"] .info-val {
    color: #fbbf24;
}
.wifi-card-preview-stage[data-style="darkgold"] .wifi-card-footer-tip {
    color: #cbd5e1;
}

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

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

.wifi-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;
}

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

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

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

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

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

.badge-cafe { background: #fef3c7; color: #78350f; border: 1px solid #fde68a; }
.badge-mint { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-business { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-darkgold { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }

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