:root {
    --loader-background: rgb(0,0,0, 0.7);
}

.cam-content, .scan-header {
    display: flex;
    gap: 32px;
}
    .cam-content[data-state="scan"] .cam-part-header {
        display: none;
    }
    .cam-content[data-state="part"] .cam-wrapper {
        display: none;
    }
  .scan {
    min-width: 320px;
  }
	.cam-content .cam-wrapper {
		max-height: 250px;
	}

	.cam-content .cam-part-header {
		align-items: flex-start;
		display: flex;
		gap: 32px;
		width: 100%;
	}
	.cam-content .cam-part-header img {
		max-height: 320px;
		width: 320px;
		border-radius: 12px;
		box-shadow: 0 4px 10px rgba(0,0,0,0.15);
	}
	.cam-content .cam-part-info {
		width: 100%;
	}
	
  .scan-dropzone {
    border: 2px dashed #e67e22;
    border-radius: 8px;
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;

    background: #fdf6ee;
    color: #555;
  }

  .scan-dropzone.dragover {
    background: #fde8cc;
    border-color: #c0392b;
  }

  .scan-dropzone input[type="file"] {
    display: none;
  }

  .scan-dropzone svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    color: #e67e22;
  }

  .scan-dropzone p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
  }

    .scan button {
        margin-top: 1rem;
        width: 100%;
    }

  .scan-preview {
    text-align: center;
  }
  .scan-preview div {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    box-shadow0 4px 10px rgba(0,0,0,0.15): ;
    border-radius: 12px;
    padding: 10px;
    height: calc(100% - 53px);
  }

  .scan-preview img {
    max-height: 165px;
  }
	
	.camera-preview video {
		min-height: 320px;
		min-width: 320px;
	}

  /* ── Resultaat ────────────────────────────────────────────────── */
.part-info {
    padding: 5px;
	width: 100%;
}
    .part-info .part-loader {
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 99;

        background: var(--loader-background);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
        .part-info .part-loader label {
            color: var(--white);
            font-size: 18pt;
        }

    .part-info .part-img {
        position: absolute;
        top: 0;
        right: 5px;
        max-width: 100px;
        max-height: 100px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }
        .part-info .part-img img {
            max-width: inherit;
            max-height: inherit;
        }
    .part-info h1 {
		font-size: 1.8rem;
		margin-bottom: 8px;
    }

    .part-info .part-number {
		font-size: 1rem;
		font-weight: 700;
		color: var(--lego-blue);
		margin-bottom: 12px;
    }

    .part-specs {
		margin-top: 16px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
    }

    .part-specs div {
		background: var(--gray-light);
		padding: 10px;
		border-radius: 8px;
		font-size: 0.9rem;
    }
.set-part-filter-colors	{
	max-width: 350px;
}
	.set-part-filter-colors .color-selection {
		background: transparent;
		border-radius: 8px;
		box-shadow: 0 4px 10px rgba(0,0,0,0.15);
		display: inline-block;
		height: 25px;
		margin: 3px;
		width: 25px;
	}
		.set-part-filter-colors .color-selection:hover {
			cursor: pointer;
			transform: scale(1.2) !important;
			box-shadow: 0 6px 14px rgba(0,0,0,0.15);
			
		}
	.set-part-filter-colors .color-selection.selected {
		border: solid 2px #000;
		transform: scale(1.1);
	}

  .bf-resultaat {
    display: none;
    margin-top: 1.5rem;
  }

  .bf-part-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
  }

  .bf-part-info img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f5f5;
  }

  .bf-part-info h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
  .bf-part-info p  { margin: 0.15rem 0; font-size: 0.85rem; color: #666; }

  .bf-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
  }

  .bf-badge.hoog    { background: #d4edda; color: #155724; }
  .bf-badge.gemiddeld { background: #fff3cd; color: #856404; }
  .bf-badge.laag    { background: #f8d7da; color: #721c24; }

  .bf-sets-titel {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
  }

  .bf-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .bf-set-kaart {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.82rem;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.15s;
  }

  .bf-set-kaart:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

  .bf-set-kaart img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    margin-bottom: 0.4rem;
  }

  .bf-set-kaart .set-num  { color: #888; font-size: 0.75rem; }
  .bf-set-kaart .set-naam { font-weight: 600; color: #333; line-height: 1.3; }
  .bf-set-kaart .set-jaar { color: #aaa; margin-top: 0.2rem; }

  .bf-geen-sets {
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }

  .bf-fout {
    color: #c0392b;
    background: #fdecea;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
  }



*,
*::before,
*::after {
    -webkit-tap-highlight-color: transparent;
}

.cam-wrapper {
    background: var(--surface-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    overflow: hidden;
    max-width: 640px;
    margin: 0 auto;
}
    .cam-wrapper[data-state="idle"] .cam-screen #cam-video {
        display: none;
    }
    .cam-wrapper[data-state="active"] .cam-screen #cam-placeholder {
        display: none;
    }
    .cam-wrapper[data-state="idle"] .cam-controls #btn_switch_camera,
    .cam-wrapper[data-state="idle"] .cam-controls #btn_snapshot {
        display: none;
    }
    .cam-wrapper[data-state="active"] .cam-controls #btn_start_camera {
        display: none;
    }	
.cam-screen {
    background: #111;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height:250px;
    position: relative;
    width: 100%;
}
	
.cam-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 15px;
}

.cam-placeholder i {
    font-size: 48px;
    color: #555;
}

.cam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Viewfinder overlay */
.cam-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: none;
}

/* Controls */
.cam-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
}


    .cam-controls #btn_switch_camera {
        min-height: 50px;
        font-size: 14px;
    }
    .cam-controls #btn_snapshot {
        min-height: 120px;
        font-size: 17px;
    }

.cam-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    cursor: pointer;
    min-height: 52px;
    touch-action: manipulation;
    user-select: none;
    transition: background 0.15s, opacity 0.15s;
}

.cam-btn i {
    font-size: 20px;
}

