/**
 * VMarket Category UI — EasyBid 主題配色 v6.2
 * 深藍 #1e2a4a / 橘紅 #e8490f / 圓潤卡片風格
 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   Modal 外框
   ═══════════════════════════════════════════════════════════ */
body #dokan-product-category-modal .dokan-product-category-modal-content {
    font-family: 'Noto Sans TC', -apple-system, sans-serif !important;
    border-radius: 20px !important;
    box-shadow: 0 32px 80px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.08) !important;
    border: none !important;
    overflow: hidden !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════
   Header — 深藍漸層
   ═══════════════════════════════════════════════════════════ */
body #dokan-product-category-modal .dokan-product-category-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 28px 20px !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
    background: linear-gradient(135deg, #1e2a4a 0%, #2d3f6e 100%) !important;
    position: relative !important;
}

body #dokan-product-category-modal .dokan-product-category-modal-header::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #e8490f, #ff6b35, #e8490f) !important;
    background-size: 200% !important;
    animation: dcef-shimmer 3s linear infinite !important;
}
@keyframes dcef-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

body #dokan-product-category-modal .dokan-product-category-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}
body #dokan-product-category-modal .dokan-single-title {
    display: block !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -.2px !important;
    font-family: 'Noto Sans TC', sans-serif !important;
}
body #dokan-product-category-modal .dokan-single-des {
    display: block !important;
    font-size: 12px !important;
    color: rgba(255,255,255,.6) !important;
}

/* 關閉按鈕 */
body #dokan-product-category-modal #dokan-category-close-modal {
    width: 34px !important; height: 34px !important;
    background: rgba(255,255,255,.12) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: rgba(255,255,255,.8) !important;
    cursor: pointer !important;
    transition: background .15s, transform .2s !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255,255,255,.2) !important;
}
body #dokan-product-category-modal #dokan-category-close-modal:hover {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
    transform: rotate(90deg) !important;
}

/* ═══════════════════════════════════════════════════════════
   Body
   ═══════════════════════════════════════════════════════════ */
body #dokan-product-category-modal .dokan-product-category-modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 0 !important;
    min-height: 0 !important;
    background: #fafbfc !important;
}

/* 搜尋框 */
body #dokan-product-category-modal .dokan-category-search-container {
    padding: 16px 24px 12px !important;
    background: #fff !important;
    border-bottom: 1px solid #eef0f3 !important;
}
body #dokan-product-category-modal .dokan-cat-search-box {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #f5f6f8 !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 10px !important;
    padding: 9px 14px !important;
    transition: border-color .2s, box-shadow .2s !important;
}
body #dokan-product-category-modal .dokan-cat-search-box:focus-within {
    border-color: #e8490f !important;
    box-shadow: 0 0 0 3px rgba(232,73,15,.12) !important;
    background: #fff !important;
}
body #dokan-product-category-modal .dokan-cat-search-icon {
    color: #9ca3af !important; font-size: 14px !important;
}
body #dokan-product-category-modal .dokan-cat-search-input {
    flex: 1 !important;
    border: none !important; background: transparent !important;
    outline: none !important; box-shadow: none !important;
    font-size: 14px !important; color: #1e2a4a !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    padding: 0 !important; margin: 0 !important;
}
body #dokan-product-category-modal .dokan-cat-search-input::placeholder { color: #9ca3af !important; }
body #dokan-product-category-modal .dokan-cat-search-text-limit {
    font-size: 11px !important; color: #c4c9d4 !important; white-space: nowrap !important;
}

/* 搜尋結果下拉 */
body #dokan-product-category-modal .dokan-cat-search-res {
    margin-top: 6px !important;
    border: 1px solid #e2e5ea !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(30,42,74,.12) !important;
    overflow: hidden !important;
}
body #dokan-product-category-modal .dokan-cat-search-res-ul {
    list-style: none !important; margin: 0 !important; padding: 6px !important;
    max-height: 200px !important; overflow-y: auto !important;
}
body #dokan-product-category-modal .dokan-cat-search-res-ul li {
    padding: 9px 12px !important; border-radius: 7px !important;
    cursor: pointer !important; font-size: 13px !important; color: #374151 !important;
    transition: background .12s !important;
}
body #dokan-product-category-modal .dokan-cat-search-res-ul li:hover {
    background: #f0f4ff !important; color: #1e2a4a !important;
}

/* ═══════════════════════════════════════════════════════════
   分類多欄容器
   ═══════════════════════════════════════════════════════════ */
body #dokan-product-category-modal .dokan-single-categories-container {
    display: flex !important;
    align-items: stretch !important;
    padding: 14px 20px 10px !important;
    gap: 4px !important;
    min-height: 240px !important;
    background: #fff !important;
    border-bottom: 1px solid #eef0f3 !important;
}
body #dokan-product-category-modal .dokan-single-categories-arrow {
    display: flex !important; align-items: center !important; flex-shrink: 0 !important;
}
body #dokan-product-category-modal .dokan-single-categories-left-box,
body #dokan-product-category-modal .dokan-single-categories-right-box {
    width: 28px !important; height: 28px !important;
    background: #fff !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; color: #6b7280 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
    transition: border-color .15s, box-shadow .15s !important;
}
body #dokan-product-category-modal .dokan-single-categories-left-box:hover,
body #dokan-product-category-modal .dokan-single-categories-right-box:hover {
    border-color: #1e2a4a !important;
    box-shadow: 0 2px 8px rgba(30,42,74,.15) !important;
}
body #dokan-product-category-modal .dokan-single-categories {
    flex: 1 !important;
    display: flex !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
}
body #dokan-product-category-modal .dokan-single-categories::-webkit-scrollbar { display: none !important; }

/* 每一欄 ul */
body #dokan-product-category-modal .dokan-product-category-ul {
    min-width: 170px !important;
    max-width: 200px !important;
    flex-shrink: 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    border-right: 1px solid #eef0f3 !important;
    padding: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    scrollbar-width: thin !important;
    scrollbar-color: #e2e5ea transparent !important;
    box-sizing: border-box !important;
}
body #dokan-product-category-modal .dokan-product-category-ul:last-child { border-right: none !important; }

/* 隱藏 checkbox/radio */
body #dokan-product-category-modal .dokan-single-categories input[type="checkbox"],
body #dokan-product-category-modal .dokan-single-categories input[type="radio"] {
    position: absolute !important;
    width: 0 !important; height: 0 !important;
    opacity: 0 !important; pointer-events: none !important;
    visibility: hidden !important;
}

/* li 樣式 */
body #dokan-product-category-modal .dokan-product-category-li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px 8px 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 13.5px !important;
    color: #374151 !important;
    transition: background .1s, color .1s !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    min-height: 38px !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 2px 0 !important;
    border-bottom: none !important;
    border-top: none !important;
}
body #dokan-product-category-modal .dokan-product-category-li:hover {
    background: #f0f4ff !important;
    color: #1e2a4a !important;
}

/* 分類名稱 span */
body #dokan-product-category-modal .dokan-product-category {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

/* 子分類箭頭 */
body #dokan-product-category-modal .dokan-product-category-icon {
    flex-shrink: 0 !important;
    color: #c4c9d4 !important;
    font-size: 11px !important;
    pointer-events: none !important;
    transition: color .1s, transform .15s !important;
}
body #dokan-product-category-modal .dokan-product-category-li[data-haschild="false"] .dokan-product-category-icon {
    display: none !important;
}
body #dokan-product-category-modal .dokan-product-category-li:hover .dokan-product-category-icon {
    color: #9ca3af !important;
    transform: translateX(2px) !important;
}

/* Active / Selected li — 橘紅主色 */
body #dokan-product-category-modal .dokan-product-category-li.dokan-active,
body #dokan-product-category-modal .dokan-product-category-li.checked,
body #dokan-product-category-modal .dokan-product-category-li-active,
body #dokan-product-category-modal .dokan-product-category-li.active {
    background: linear-gradient(135deg, #fff2ee 0%, #fff8f5 100%) !important;
    color: #c73a0c !important;
    font-weight: 600 !important;
    border-left: 3px solid #e8490f !important;
    padding-left: 9px !important;
}

/* ═══════════════════════════════════════════════════════════
   Footer — 已選路徑 + Done 按鈕
   ═══════════════════════════════════════════════════════════ */
body #dokan-product-category-modal .dokan-product-category-modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 14px 24px 18px !important;
    border-top: 1px solid #eef0f3 !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
    background: #fff !important;
}
body #dokan-product-category-modal .dokan-selected-category-label-container {
    display: flex !important; align-items: center !important;
    gap: 4px !important; flex-wrap: wrap !important; flex: 1 !important;
}
body #dokan-product-category-modal .dokan-selected-category-label {
    font-size: 11px !important; font-weight: 700 !important;
    color: #9ca3af !important; text-transform: uppercase !important;
    letter-spacing: .6px !important; flex-shrink: 0 !important;
    margin-right: 4px !important;
}
body #dokan-product-category-modal .dokan-selected-category-product {
    font-size: 13px !important; color: #6b7280 !important;
}
body #dokan-product-category-modal .dokan-selected-category-product.dokan-cat-selected {
    color: #c73a0c !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #fff2ee, #ffe8e0) !important;
    padding: 3px 12px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(232,73,15,.2) !important;
}
body #dokan-product-category-modal .dokan-selected-category-icon {
    color: #d1d5db !important; font-size: 10px !important; padding: 0 2px !important;
}

/* Done 按鈕 — 深藍背景 + 橘紅 hover */
body #dokan-product-category-modal #dokan-single-cat-select-btn,
body #dokan-product-category-modal .dokan-single-cat-select-btn {
    padding: 10px 28px !important;
    background: linear-gradient(135deg, #1e2a4a 0%, #2d3f6e 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .2s !important;
    box-shadow: 0 4px 12px rgba(30,42,74,.3) !important;
    font-family: 'Noto Sans TC', sans-serif !important;
    flex-shrink: 0 !important;
    letter-spacing: .3px !important;
    position: relative !important;
    overflow: hidden !important;
}
body #dokan-product-category-modal #dokan-single-cat-select-btn::before,
body #dokan-product-category-modal .dokan-single-cat-select-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(135deg, #e8490f 0%, #ff6b35 100%) !important;
    opacity: 0 !important;
    transition: opacity .2s !important;
}
body #dokan-product-category-modal #dokan-single-cat-select-btn:hover::before,
body #dokan-product-category-modal .dokan-single-cat-select-btn:hover::before {
    opacity: 1 !important;
}
body #dokan-product-category-modal #dokan-single-cat-select-btn:hover,
body #dokan-product-category-modal .dokan-single-cat-select-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(232,73,15,.35) !important;
}
body #dokan-product-category-modal #dokan-single-cat-select-btn span,
body #dokan-product-category-modal .dokan-single-cat-select-btn span,
body #dokan-product-category-modal #dokan-single-cat-select-btn,
body #dokan-product-category-modal .dokan-single-cat-select-btn {
    position: relative !important; z-index: 1 !important;
}
body #dokan-product-category-modal #dokan-single-cat-select-btn:disabled,
body #dokan-product-category-modal .dokan-single-cat-select-btn:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════
   額外欄位 Popup（dcef-popup）
   ═══════════════════════════════════════════════════════════ */
#dcef-popup-overlay {
    background: rgba(15,20,35,.55) !important;
    backdrop-filter: blur(4px) !important;
}
#dcef-popup-box {
    border-radius: 18px !important;
    box-shadow: 0 32px 80px rgba(15,20,35,.3) !important;
    overflow: hidden !important;
    width: 400px !important;
}
#dcef-popup-head {
    background: linear-gradient(135deg, #1e2a4a 0%, #2d3f6e 100%) !important;
    border-bottom: none !important;
    padding: 18px 22px 16px !important;
    position: relative !important;
}
#dcef-popup-head::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #e8490f, #ff6b35, #e8490f) !important;
    background-size: 200% !important;
    animation: dcef-shimmer 3s linear infinite !important;
}
#dcef-popup-head h4 {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}
#dcef-popup-head h4::before {
    background: linear-gradient(180deg, #e8490f, #ff6b35) !important;
}
#dcef-popup-close {
    background: rgba(255,255,255,.12) !important;
    color: rgba(255,255,255,.8) !important;
    border: 1px solid rgba(255,255,255,.2) !important;
}
#dcef-popup-close:hover {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
}
#dcef-popup-body {
    background: #fafbfc !important;
    padding: 18px 20px 6px !important;
}
.dcef-field-group { margin-bottom: 16px !important; }
.dcef-field-label {
    color: #1e2a4a !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.dcef-field-select {
    border: 1.5px solid #e2e5ea !important;
    border-radius: 9px !important;
    color: #1e2a4a !important;
    background-color: #fff !important;
    font-size: 13.5px !important;
    padding: 9px 34px 9px 12px !important;
    transition: border-color .15s, box-shadow .15s !important;
}
.dcef-field-select:focus {
    border-color: #e8490f !important;
    box-shadow: 0 0 0 3px rgba(232,73,15,.12) !important;
}
.dcef-field-select.dcef-invalid {
    border-color: #e8490f !important;
    box-shadow: 0 0 0 3px rgba(232,73,15,.15) !important;
    background-color: #fff8f6 !important;
}
#dcef-popup-foot {
    background: #fff !important;
    border-top: 1px solid #eef0f3 !important;
    padding: 14px 20px 18px !important;
}
#dcef-popup-cancel {
    border-radius: 9px !important;
    border-color: #e2e5ea !important;
    color: #6b7280 !important;
}
#dcef-popup-cancel:hover {
    background: #f5f6f8 !important;
    border-color: #c4c9d4 !important;
}
#dcef-popup-confirm {
    border-radius: 9px !important;
    background: linear-gradient(135deg, #1e2a4a 0%, #2d3f6e 100%) !important;
    box-shadow: 0 4px 12px rgba(30,42,74,.25) !important;
    transition: all .2s !important;
    position: relative !important;
    overflow: hidden !important;
}
#dcef-popup-confirm::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(135deg, #e8490f 0%, #ff6b35 100%) !important;
    opacity: 0 !important;
    transition: opacity .2s !important;
}
#dcef-popup-confirm:hover::before { opacity: 1 !important; }
#dcef-popup-confirm:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(232,73,15,.3) !important;
}
#dcef-popup-confirm span,
#dcef-popup-confirm { position: relative !important; z-index: 1 !important; }
#dcef-popup-err {
    color: #c73a0c !important;
    background: #fff2ee !important;
    border-radius: 8px !important;
    margin: 0 20px 8px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
}
