/* public/assets/css/image/id-photo.css */
.idphoto-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #3b82f6; --p-primary-hover: #2563eb; --p-success: #10b981; --p-text: #0f172a; --p-text-muted: #64748b; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; font-family: system-ui, -apple-system, sans-serif; }
.idphoto-wrapper *, .idphoto-wrapper *::before, .idphoto-wrapper *::after { box-sizing: border-box; }

.idphoto-header { text-align: center; margin-bottom: 24px; border-bottom: 1px solid var(--p-border); padding-bottom: 24px; }
.idphoto-title { font-size: 1.7rem; font-weight: 800; color: var(--p-text); margin: 0 0 10px 0; }
.idphoto-subtitle { font-size: 0.95rem; color: var(--p-text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

/* ================= 上传区与流光按钮 ================= */
.idphoto-upload-area { border: 2px dashed #cbd5e1; border-radius: 16px; padding: 60px 20px; text-align: center; background: #f8fafc; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.idphoto-upload-area:hover { border-color: var(--p-primary); background: #eff6ff; }
.idphoto-upload-icon { font-size: 4rem; margin-bottom: 16px; }
.idphoto-upload-text { font-size: 1.1rem; font-weight: 700; color: var(--p-text); margin-bottom: 8px; }
.idphoto-upload-hint { font-size: 0.9rem; color: var(--p-text-muted); }

/* 全新美化：流光渐变呼吸按钮 */
.idphoto-btn-upload-glow {
    margin-top: 24px;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 300% 300%;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    animation: gradientShift 4s ease infinite;
}
.idphoto-btn-upload-glow:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6);
}
.idphoto-btn-upload-glow:active {
    transform: translateY(0) scale(0.98);
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 布局 */
.idphoto-layout { display: flex; flex-direction: row; gap: 24px; align-items: stretch; }
@media (max-width: 850px) { .idphoto-layout { flex-direction: column; } }

.idphoto-preview-panel { flex: 1.5; display: flex; flex-direction: column; background: #f8fafc; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; }
.idphoto-controls-panel { flex: 1; display: flex; flex-direction: column; background: #ffffff; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; min-width: 320px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }

.idphoto-panel-title { font-size: 1.05rem; font-weight: 800; color: var(--p-text); padding: 16px 20px; background: #f1f5f9; border-bottom: 1px solid var(--p-border); margin: 0; display: flex; justify-content: space-between; align-items: center; }
.idphoto-hint-badge { font-size: 0.85rem; color: #3b82f6; font-weight: 700; background: #eff6ff; padding: 4px 10px; border-radius: 20px; border: 1px solid #bfdbfe; }

/* 画板区 */
.idphoto-canvas-container { position: relative; width: 100%; min-height: 400px; display: flex; align-items: center; justify-content: center; background: #e2e8f0; padding: 20px; overflow: hidden; cursor: crosshair; background-image: linear-gradient(45deg, #cbd5e1 25%, transparent 25%), linear-gradient(-45deg, #cbd5e1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cbd5e1 75%), linear-gradient(-45deg, transparent 75%, #cbd5e1 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
.idphoto-canvas { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.idphoto-crosshair { position: absolute; width: 20px; height: 20px; border: 2px solid #ef4444; border-radius: 50%; pointer-events: none; display: none; transform: translate(-50%, -50%); box-shadow: 0 0 5px rgba(255,255,255,0.8); z-index: 10; }
.idphoto-canvas-container:hover .idphoto-crosshair { display: block; }

/* ================= 底部按钮组 (垂直堆叠排列) ================= */
.idphoto-preview-actions { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: #ffffff; border-top: 1px solid var(--p-border); align-items: center; }
.idphoto-btn-success, .idphoto-btn-outline { width: 100%; max-width: 380px; padding: 16px; border-radius: 12px; font-weight: 800; font-size: 1.1rem; cursor: pointer; border: none; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.idphoto-btn-success { background: var(--p-success); color: #ffffff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.idphoto-btn-success:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4); }
.idphoto-btn-outline { background: #f8fafc; color: #475569; border: 2px solid #cbd5e1; }
.idphoto-btn-outline:hover { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }

/* 控件区 */
.idphoto-controls-body { padding: 24px 20px; display: flex; flex-direction: column; flex: 1; }
.idphoto-form-group { display: flex; flex-direction: column; gap: 10px; }
.idphoto-label { font-size: 0.95rem; font-weight: 700; color: #334155; display: flex; justify-content: space-between; }
.idphoto-val { color: var(--p-primary); font-weight: 800; }
.idphoto-slider { width: 100%; accent-color: var(--p-primary); cursor: pointer; }
.idphoto-hint { font-size: 0.85rem; color: #94a3b8; line-height: 1.4; }

.idphoto-select { width: 100%; padding: 12px 14px; border: 2px solid #cbd5e1; border-radius: 10px; font-size: 1rem; font-weight: 600; color: #1e293b; background: #ffffff; outline: none; cursor: pointer; transition: 0.2s; }
.idphoto-select:focus { border-color: var(--p-primary); }

/* 底色选择按钮 */
.idphoto-bg-colors { display: flex; gap: 16px; }
.idphoto-color-btn { flex: 1; height: 48px; border-radius: 10px; cursor: pointer; border: 2px solid #cbd5e1; transition: 0.2s; position: relative; }
.idphoto-color-btn.blue { background-color: #438edb; border-color: #438edb; }
.idphoto-color-btn.red { background-color: #ff0000; border-color: #ff0000; }
.idphoto-color-btn.white { background-color: #ffffff; }
.idphoto-color-btn.transparent { background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%), linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e2e8f0 75%), linear-gradient(-45deg, transparent 75%, #e2e8f0 75%); background-size: 10px 10px; background-position: 0 0, 0 5px, 5px -5px, -5px 0px; }
.idphoto-color-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.idphoto-color-btn.active::after { content: "✓"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-weight: 900; font-size: 1.2rem; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.idphoto-color-btn.white.active::after { color: #000; text-shadow: none; }
.idphoto-color-btn.transparent.active::after { color: #000; text-shadow: none; }

/* 品牌标识 */
.idphoto-credit { text-align: center; font-size: 0.85rem; color: #94a3b8; letter-spacing: 0.5px; }

/* 黑夜模式 */
[data-theme="dark"] .idphoto-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .idphoto-title, [data-theme="dark"] .idphoto-panel-title, [data-theme="dark"] .idphoto-upload-text, [data-theme="dark"] .idphoto-label { color: #f8fafc; }
[data-theme="dark"] .idphoto-subtitle, [data-theme="dark"] .idphoto-upload-hint, [data-theme="dark"] .idphoto-hint { color: #94a3b8; }
[data-theme="dark"] .idphoto-upload-area { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .idphoto-upload-area:hover { background: #1e293b; border-color: var(--p-primary); }
[data-theme="dark"] .idphoto-preview-panel, [data-theme="dark"] .idphoto-controls-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .idphoto-panel-title, [data-theme="dark"] .idphoto-preview-actions { background: #1e293b; border-color: #475569; }
[data-theme="dark"] .idphoto-canvas-container { background: #020617; background-image: linear-gradient(45deg, #1e293b 25%, transparent 25%), linear-gradient(-45deg, #1e293b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1e293b 75%), linear-gradient(-45deg, transparent 75%, #1e293b 75%); }
[data-theme="dark"] .idphoto-select { background: #020617; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .idphoto-btn-outline { border-color: #475569; color: #cbd5e1; background: transparent; }
[data-theme="dark"] .idphoto-btn-outline:hover { background: #1e293b; color: #fff; }
[data-theme="dark"] .idphoto-hint-badge { background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; }
/* 黑夜模式下的流光按钮稍微降低发光亮度，防止刺眼 */
[data-theme="dark"] .idphoto-btn-upload-glow { box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2); }