/* ═══════════════════════════════════════════════════════════════
   WooCommerce 3D Mug Customizer v3 — LIGHT THEME
   ═══════════════════════════════════════════════════════════════ */

.wmc-trigger-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #2563eb; color: #fff; border: none;
    padding: 14px 28px; border-radius: 10px; font-size: 15px;
    font-weight: 700; cursor: pointer; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}
.wmc-trigger-btn:hover { background: #1d4ed8; transform: translateY(-1px); }

#wmc-customized-badge {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px;
}
#wmc-customized-badge span { font-size: 14px; font-weight: 600; color: #166534; }
#wmc-customized-badge button { background: none; border: 1px solid #86efac; color: #166534; padding: 5px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
#wmc-customized-badge button:hover { background: #dcfce7; }

#wmc-popup-overlay {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    animation: wmcFadeIn 0.2s ease;
}
#wmc-popup {
    width: min(95vw, 1200px); height: min(92vh, 750px);
    background: #ffffff; border-radius: 20px; overflow: hidden;
    display: flex; box-shadow: 0 24px 64px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    animation: wmcSlideUp 0.3s ease;
}
@keyframes wmcFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes wmcSlideUp { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: translateY(0) } }

#wmc-viewer-panel { flex: 1; position: relative; background: #eef1f6; }
#wmc-canvas-container { width: 100%; height: 100%; cursor: grab; min-height: 400px; }
#wmc-canvas-container:active { cursor: grabbing; }
#wmc-canvas-container canvas { display: block; width: 100% !important; height: 100% !important; }

.wmc-viewer-header {
    position: absolute; top: 0; left: 0; right: 0; padding: 18px 22px;
    display: flex; justify-content: space-between; align-items: flex-start;
    background: linear-gradient(to bottom, rgba(238,241,246,0.95), transparent);
    pointer-events: none;
}
.wmc-viewer-header > * { pointer-events: all; }
.wmc-viewer-title { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.wmc-viewer-title span { color: #2563eb; }
.wmc-viewer-subtitle { font-size: 11px; color: #999; margin-top: 2px; }

.wmc-close-btn {
    background: rgba(0,0,0,0.06); border: none; width: 36px; height: 36px; border-radius: 10px;
    color: #666; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.wmc-close-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

.wmc-viewer-hint {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: rgba(255,255,255,0.9); padding: 6px 18px; border-radius: 20px;
    font-size: 11px; color: #999; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#wmc-controls-panel {
    width: 340px; background: #f8f9fb; border-left: 1px solid #e5e7eb;
    display: flex; flex-direction: column; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1a1a1a;
}
.wmc-controls-header { padding: 18px 18px 14px; border-bottom: 1px solid #e5e7eb; display: flex; gap: 8px; }
.wmc-add-btn { flex: 1; padding: 10px 0; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.15s; border: 1px solid; }
.wmc-add-image { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.wmc-add-image:hover { background: #dbeafe; }
.wmc-add-text { background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }
.wmc-add-text:hover { background: #ede9fe; }

#wmc-layers-list { flex: 1; overflow-y: auto; padding: 12px 14px; }
#wmc-layers-empty { text-align: center; padding: 40px 20px; color: #aaa; font-size: 13px; }
#wmc-layers-empty p { margin: 0; line-height: 1.5; }

.wmc-layer-item {
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
    transition: all 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.wmc-layer-item:hover { border-color: #d1d5db; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.wmc-layer-item.selected { background: #f0f7ff; border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,0.1); }

.wmc-layer-header { display: flex; align-items: center; gap: 10px; }
.wmc-layer-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; flex-shrink: 0; }
.wmc-layer-thumb-text { width: 36px; height: 36px; border-radius: 6px; background: #eff6ff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #2563eb; flex-shrink: 0; }
.wmc-layer-info { flex: 1; min-width: 0; }
.wmc-layer-name { font-size: 12px; font-weight: 600; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wmc-layer-type { font-size: 10px; color: #999; margin-top: 1px; }

.wmc-layer-actions { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.wmc-layer-actions button {
    background: #f3f4f6; border: 1px solid #e5e7eb; color: #888; cursor: pointer;
    font-size: 10px; width: 26px; height: 26px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s; padding: 0;
}
.wmc-layer-actions button:hover:not(:disabled) { background: #dbeafe; color: #2563eb; border-color: #93c5fd; }
.wmc-layer-actions button:disabled { opacity: 0.3; cursor: default; }
.wmc-layer-actions .wmc-layer-remove { margin-left: 4px; }
.wmc-layer-actions .wmc-layer-remove:hover { background: #fef2f2; color: #ef4444; border-color: #fca5a5; }

.wmc-layer-controls { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e5e7eb; }
.wmc-text-input {
    width: 100%; background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
    padding: 8px 10px; color: #1a1a1a; font-size: 13px; outline: none; margin-bottom: 8px; box-sizing: border-box;
}
.wmc-text-input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.wmc-text-options { display: flex; gap: 6px; margin-bottom: 10px; }
.wmc-color-input { width: 32px; height: 28px; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; background: none; padding: 0; }
.wmc-font-select { flex: 1; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 4px 8px; color: #333; font-size: 12px; outline: none; }

.wmc-slider-row { margin-bottom: 8px; }
.wmc-slider-label { display: flex; justify-content: space-between; margin-bottom: 3px; }
.wmc-slider-label span:first-child { font-size: 11px; color: #666; }
.wmc-slider-val { font-size: 11px; color: #2563eb; font-weight: 600; }

.wmc-layer-controls input[type="range"] {
    -webkit-appearance: none; width: 100%; height: 4px; background: #e5e7eb; border-radius: 4px; outline: none;
}
.wmc-layer-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: #2563eb; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.wmc-layer-controls input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%; background: #2563eb;
    cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.wmc-color-section { padding: 14px 18px; border-top: 1px solid #e5e7eb; }
.wmc-color-section label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #999; margin-bottom: 10px; }
#wmc-color-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.wmc-mug-color-btn {
    width: 30px; height: 30px; border-radius: 8px; padding: 0; cursor: pointer;
    transition: all 0.15s; border: 2px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.wmc-mug-color-btn:hover { transform: scale(1.1); }
.wmc-mug-color-btn.active { border-color: #2563eb; box-shadow: 0 0 10px rgba(37,99,235,0.25); transform: scale(1.1); }

.wmc-actions { padding: 16px 18px; border-top: 1px solid #e5e7eb; display: flex; gap: 10px; }
.wmc-btn-cancel { flex: 1; padding: 13px 0; border-radius: 10px; background: #fff; border: 1px solid #d1d5db; color: #666; font-size: 13px; font-weight: 600; cursor: pointer; }
.wmc-btn-cancel:hover { background: #f9fafb; }
.wmc-btn-confirm {
    flex: 2; padding: 13px 0; border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8); border: none;
    color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3); transition: all 0.2s;
}
.wmc-btn-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }
.wmc-btn-confirm:disabled { opacity: 0.6; cursor: wait; transform: none; }

#wmc-layers-list::-webkit-scrollbar { width: 5px; }
#wmc-layers-list::-webkit-scrollbar-track { background: transparent; }
#wmc-layers-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
#wmc-layers-list { scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }

@media (max-width: 768px) {
    #wmc-popup { flex-direction: column; height: 95vh; width: 98vw; border-radius: 14px; }
    #wmc-viewer-panel { min-height: 280px; flex: none; height: 40%; }
    #wmc-controls-panel { width: 100%; flex: 1; }
}
