/* ─── Image Search Modal Styles ──────────────────────── */
.image-search-modal {
    max-width: 600px !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.image-search-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.2);
}

.search-group {
    margin-bottom: 20px;
}

.camera-search-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.img-search-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-search-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.search-box-guide {
    width: 60%;
    height: 80%;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.4);
}

.btn-switch-camera {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-switch-camera:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.btn-capture-search {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(233, 69, 96, 0.3);
}

.btn-capture-search:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.img-drop-zone {
    width: 100%;
    aspect-ratio: 4/3;
    border: 3px dashed var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.img-drop-zone:hover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

.drop-zone-content {
    text-align: center;
    color: var(--text-muted);
}

.drop-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.paste-zone {
    width: 100%;
    aspect-ratio: 4/3;
    border: 3px dashed var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
}

.paste-zone:focus {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
    outline: none;
}

.paste-content {
    text-align: center;
    color: var(--text-muted);
}

.paste-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.img-search-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
}

.pulse-loader {
    width: 12px;
    height: 12px;
    background: #2563eb;
    border-radius: 50%;
    animation: imageSearchPulse 1.5s infinite;
}

@keyframes imageSearchPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.image-search-results-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.match-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.match-result-item:hover {
    transform: translateX(4px);
    border-color: var(--accent);
}

.match-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    background: #f1f5f9;
}

.match-info {
    flex: 1;
}

.match-stock {
    font-weight: 800;
    font-size: 1rem;
    display: block;
}

.match-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.match-score-pill {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
}

.score-high { background: #059669; }
.score-med { background: #d97706; }
.score-low { background: #dc2626; }
