/**
 * 🎨 MotorHub - Visual Pickers v7
 */

select[data-vp7-done] + .ts-wrapper {
    display: none !important;
}

.vp7 {
    position: relative !important;
    width: 100% !important;
    direction: inherit;
    font-family: inherit;
    display: block !important;
    box-sizing: border-box;
}

.vp7 *, .vp7 *::before, .vp7 *::after {
    box-sizing: border-box;
}

.vp7-btn {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 12px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    color: #111827 !important;
    font-size: 0.875rem !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: start;
    line-height: 1.2;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vp7.vp7-compact .vp7-btn {
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 10px !important;
    font-size: 0.8125rem !important;
}

.vp7-btn:hover {
    border-color: #d1d5db !important;
    background: #fafafa !important;
}

.vp7.vp7-open .vp7-btn {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
    outline: 0;
}

.vp7-btn-icon {
    color: #6b7280;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.vp7.vp7-open .vp7-btn-icon {
    color: #2563eb;
}

.vp7-btn-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    min-width: 0;
}

.vp7-btn-text.vp7-empty {
    font-weight: 400;
}

.vp7-btn-text.vp7-empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
}

.vp7-btn-arrow {
    color: #9ca3af;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.vp7.vp7-open .vp7-btn-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}

.vp7-pop {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08),
        0 10px 25px -5px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.02) !important;
    z-index: 99999 !important;
    overflow: hidden;
    min-width: 280px !important;
    max-width: 480px !important;
    display: flex !important;
    flex-direction: column !important;
    direction: rtl;
}

[dir="ltr"] .vp7-pop {
    direction: ltr;
}

.vp7-pop[hidden] {
    display: none !important;
}

.vp7-pop.vp7-open {
    animation: vp7-fadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.vp7-pop.vp7-pop-up.vp7-open {
    animation: vp7-fadeInUp 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes vp7-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vp7-fadeInUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.vp7-pop .vp7-search {
    position: relative !important;
    padding: 8px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: #fafafa !important;
    flex-shrink: 0;
}

.vp7-pop .vp7-search-icon {
    position: absolute !important;
    top: 50% !important;
    inset-inline-start: 18px !important;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
}

.vp7-pop .vp7-search input {
    width: 100% !important;
    height: 32px !important;
    padding: 6px 10px !important;
    padding-inline-start: 32px !important;
    padding-inline-end: 30px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 0.8125rem !important;
    outline: none !important;
    transition: all 0.12s;
    font-family: inherit;
    box-shadow: none !important;
}

.vp7-pop .vp7-search input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.vp7-pop .vp7-search input::placeholder {
    color: #9ca3af;
}

.vp7-pop .vp7-search-clear {
    position: absolute !important;
    top: 50% !important;
    inset-inline-end: 18px !important;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: none;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s;
    z-index: 1;
    padding: 0 !important;
}

.vp7-pop .vp7-search-clear:hover {
    background: #d1d5db;
    color: #111827;
}

.vp7-pop .vp7-search-clear[hidden] {
    display: none !important;
}

.vp7-pop .vp7-list {
    max-height: 280px !important;
    overflow-y: auto !important;
    padding: 4px !important;
    flex: 1;
}

.vp7-pop .vp7-list::-webkit-scrollbar {
    width: 6px;
}

.vp7-pop .vp7-list::-webkit-scrollbar-track {
    background: transparent;
}

.vp7-pop .vp7-list::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

.vp7-pop .vp7-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background-color 0.08s;
    user-select: none;
    margin-bottom: 1px;
    color: #111827;
    position: relative;
}

.vp7-pop .vp7-item:hover {
    background: #f9fafb !important;
}

.vp7-pop .vp7-item.vp7-hl {
    background: #eff6ff !important;
}

.vp7-pop .vp7-item.vp7-sel {
    background: #eff6ff !important;
    color: #1e40af !important;
}

.vp7-pop .vp7-item.vp7-sel.vp7-hl {
    background: #dbeafe !important;
}

.vp7-pop .vp7-logo {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    padding: 3px;
    transition: all 0.12s;
}

.vp7-pop .vp7-item:hover .vp7-logo,
.vp7-pop .vp7-item.vp7-hl .vp7-logo {
    border-color: #93c5fd;
}

.vp7-pop .vp7-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vp7-pop .vp7-logo-fallback {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    border-radius: 4px;
}

.vp7-pop .vp7-item-text {
    flex: 1 !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px;
}

.vp7-pop .vp7-primary {
    font-weight: 500;
    font-size: 0.875rem;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.vp7-pop .vp7-secondary {
    font-size: 0.75rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 400;
}

.vp7-pop .vp7-item.vp7-sel .vp7-secondary {
    color: rgba(30, 64, 175, 0.7);
}

.vp7-pop mark {
    background: #fef3c7 !important;
    color: #92400e !important;
    padding: 0 1px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
}

.vp7-pop .vp7-item.vp7-sel mark {
    background: #fbbf24 !important;
    color: #78350f !important;
}

.vp7-pop .vp7-check {
    color: #2563eb;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: #dbeafe;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    justify-content: center;
}

.vp7-pop .vp7-empty {
    padding: 28px 20px;
    text-align: center;
}

.vp7-pop .vp7-empty-icon {
    font-size: 28px;
    opacity: 0.4;
    margin-bottom: 8px;
}

.vp7-pop .vp7-empty-text {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.vp7-pop .vp7-empty-sub {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 2px;
}

.vp7-pop .vp7-footer {
    display: flex !important;
    align-items: center !important;
    gap: 4px;
    padding: 6px 10px !important;
    border-top: 1px solid #f3f4f6 !important;
    background: #fafafa !important;
    font-size: 0.6875rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.vp7-pop .vp7-footer-key {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 1px 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.625rem;
    font-weight: 500;
    color: #6b7280;
    min-width: 18px;
    text-align: center;
}

.vp7-pop .vp7-footer-label {
    margin-inline-end: 6px;
}

.vp7-pop .vp7-footer-label:last-child {
    margin-inline-end: 0;
}