
:root {
  --lego-blue: #2f91c3;
  --lego-red: #E3000B;
  --lego-lightred: rgb(255,4,16,0.25);
  --lego-yellow: #fed501;
  --lego-lightgreen: #EBFFDE;
  --gray-light: #F4F4F4;
  --gray-dark: #333333;
  --light-sand: #FFF5DE;
  --white: #FFFFFF;

  --text-muted: #898781;

  --btn-disabled: #C5C5C5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--gray-light);
  color: var(--gray-dark);
}

a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 999px;
  position: relative;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--lego-yellow);
  transition: width 0.15s ease;
}

a:hover::after {
  width: 100%;
}

button {
  padding: 8px 12px;
  border: none;
  background: var(--lego-blue);
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.25);
}
    button:hover:not(:disabled) {
        background: color-mix(in srgb, var(--lego-blue) 85%, black);
    }
	button:disabled,
	button.brick-disabled {
	  opacity: 0.5;
	  cursor: not-allowed;
	}

	button.active {
		background: var(--lego-yellow);
		color: var(--gray-dark);
	}
	    button.active:hover:not(:disabled) {
           background: color-mix(in srgb, var(--lego-yellow) 95%, black);
        }

	button.complete{
		background: var(--lego-lightgreen);
		color: var(--gray-dark);
	}
	    button.complete:hover:not(:disabled) {
	        background: color-mix(in srgb, var(--lego-lightgreen) 95%, black);
	    }

	button.incomplete{
		background: var(--lego-lightred);
		color: var(--gray-dark);
	}
        button.incomplete:hover:not(:disabled) {
	        background: color-mix(in srgb, var(--lego-lightred) 95%, black);
	    }

input[type=number]{
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

 /* COMMON  */
 .hide {
	 display: none !important;
 }

/* HEADER */

.header { 
  position: relative;
  height: 90px; /* compacte header */
  background-color: var(--lego-blue);
  background-image: url("/images/lego-texture.png");
  background-repeat: repeat;
  background-size: 120px; 
  padding: 0 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

/* LOGO */

.header-logo {
  position: relative;
  width: 300px; /* ruimte voor logo + tekst */
}

.header-logo img {
  height: 175px; /* groot logo */
  position: absolute;
  top: -35px; /* steekt boven header uit */
  left: 0;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.25));
}

.header-logo-text {
  position: relative;
  left: 230px; /* naast het logo */
  color: var(--white);
}

.header-logo-text-title {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.4rem;
  text-transform: uppercase;
}

.header-logo-text-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 0.7em;
}

/* NAV */

.header-nav {
  background: rgb(90 130 190 / 40%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 1px 7px;
}

.header-nav a {
  color: var(--white) !important;
}
.header-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--lego-yellow);
  width: 100% !important;
}
.header-nav .login-btn {
  background-color: var(--lego-yellow);
  color: var(--gray-dark);
  font-weight: 700;
  padding: 6px 14px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.header-nav .login-btn::after {
  display: none;
}

/* SUBMENU */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--white);
  border-radius: 8px;
  min-width: 180px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 10;
}

.nav-dropdown:hover .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-submenu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--gray-dark) !important;
  font-size: 14px;
  white-space: nowrap;
}

.nav-submenu a:hover {
  background: rgb(90 130 190 / 10%);
}

/* DETAILS FORM */
.details-form {
    background: var(--gray-light);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    margin-top: 16px;
	margin-bottom: 16px;
}
	.details-form label {
		font-weight: bold;
	}
	.details-form sub {
		font-style: italic;
		font-size: x-small;
	}
	
	.details-form .set-specs div {
		background: var(--white);
	}
	.details-form .actions {
		margin-top: 16px;
	}
	.details-form .actions button {
		min-width: 220px;
	}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
    opacity: 0.4;
}
	
/* FILTER BLOK */
.filter-bar, .filter-bar-small, .wizard-parts-filter .filter-bar {
  background-color: #eee;
  padding: 24px;
  border-bottom: 1px solid #ccc;
}

	.wizard-parts-filter .filter-bar-small {
		background-color: #dfdfdf !important;
	} 

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.filter-inner h2, .wizard-parts-filter .filter-bar h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.filter-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 4px;
}

.filter-form input,
.filter-form select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}

.filter-form button {
  font-weight: bold;
  padding: 10px 16px;
  margin-top: 22px;
}


.filter-bar-small, .wizard-parts-filter .filter-bar {
	border-radius: 8px;
	padding: 10px 24px;
}
	.filter-bar-small .filter-inner {
		max-width: inherit;
	}
	.filter-bar-small .filter-form label {
		align-items: center;
		display: flex;
		flex-direction: row;
		font-size: 0.7rem;
	}
	.filter-bar-small .filter-form input, .filter-bar-small .filter-form select {
		font-size: 0.7rem;
		margin-left: 5px;
		padding: 5px;
	}
	.filter-bar-small .filter-form button {
		font-size: 0.7rem;
		padding: 7px 10px;
		margin-top: 0;
	}

.wizard-parts-filter {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);		
}
	.wizard-parts-filter .step:last-of-type {
		padding-bottom: 20px !important;
	}
	.wizard-parts-filter .step {
		padding: 20px;
		padding-bottom: 0;
	}
		.wizard-parts-filter .step h2 {
			position: relative;
			margin-bottom: 0;
		}
		.wizard-parts-filter .step h2 span {
			position: relative;
			top: -6px;
		}

		.wizard-parts-filter .step .selected-tile{
			height: 29px;
			width: 55px;
			display: inline-block;
		}
		.wizard-parts-filter .step .selected-tile img {
			height: inherit;
			width: inherit;
		}
		
		.step-grid {
			display: grid;
			grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
			gap: 16px;
			margin-top: 16px;
		}

		.step-tile {
			background: #fff;
			border-radius: 8px;
			padding: 16px;
			text-align: center;
			cursor: pointer;
			border: 2px solid #e0e0e0;
			transition: transform 0.15s ease, border-color 0.15s ease;
			font-family: 'Lato', sans-serif;
		}

			.step-tile:hover {
				transform: translateY(-4px);
			}

			.step-tile.selected{
				background: var(--light-sand);
			}
			.step-tile img{
				height: 75px;
				width: 75px;
			}
			.step-tile h4{
				font-size: 14px;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
	
	.step[data-color-selected="true"] .filter-bar{
		cursor: pointer;
	}
	.step[data-color-selected="true"] .step-grid {
		display: none !important;
	}

.accordion-header {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* De arrow zelf */
.accordion-header .arrow {
	width: 8px;
	height: 8px;
	border-left: 2px solid #333;
	border-bottom: 2px solid #333;
	transform: rotate(-45deg); /* pijltje naar beneden */
	transition: transform 0.25s ease;
}

/* Als open → pijltje omhoog */
.accordion-header.open .arrow {
	transform: rotate(135deg);
}

/* PAGINATION  */
.pagination {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* TABS */
.tabs {
  margin-top: 40px;
}

.tab-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-content {
  background: var(--white);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

	.tab-content[data-state="empty"] #results { display: none; }
	.tab-content[data-state="results"] .empty-state { display: none; }

/* CUSTOM CHECKBOX  */
.chk_setowned_wrapper {
	position: absolute;
	top: 2px;
	right:0;
}
.chk_setowned_wrapper .control {
	display: block;
	position: relative;
	padding-left: 30px;
	cursor: pointer;
	font-size: 18px;
}
.chk_setowned_wrapper .control input {
	position: absolute;
	z-index: -1;
	opacity: 0;
}
.chk_setowned_wrapper .control_indicator {
	position: absolute;
	top: 2px;
	left: 0;
	height: 20px;
	width: 20px;
	background: #e6e6e6;
	border-radius: 6px;
}

.chk_setowned_wrapper:not(.checked) .control:hover .control_indicator,
.chk_setowned_wrapper:not(.checked) .control input:focus ~ .control_indicator {
	background: #ccc;
}

.checkbox-wrapper-21.checked .control:hover input:not([disabled]) ~ .control__indicator,
.checkbox-wrapper-21.checked .control input:checked:focus ~ .control__indicator {
	background: #0e647d;
}  
.chk_setowned_wrapper.checked .control_indicator {
	background: #0e647d;
}

.chk_setowned_wrapper.checked .control_indicator:after {
	display: block;
}

.chk_setowned_wrapper .control_indicator:after {
	content: '';
	position: absolute;
	display: none;
}
.chk_setowned_wrapper .setowned_checkbox .control_indicator:after {
	left: 8px;
	top: 4px;
	width: 3px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

button.checked {
	padding-left: 35px;
	position: relative;
	right: 0;
}
button.checked:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 6px;
    width: 6px;
    height: 12px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Lego dialog */
.lego-dialog {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.lego-dialog.hidden {
    display: none;
}
.lego-dialog img {
	height: 125px;
}

.lego-dialog-box {
    background: #fff;
    border: 4px solid #e2b200;
	display: flex;
	gap: 20px;
    padding: 24px;
    max-width: 600px;
	min-width: 450px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    text-align: center;
}

.lego-dialog-actions {
    margin-top: 20px;
}

.lego-btn {
    padding: 10px 16px;
    margin: 6px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.lego-btn.primary { background: #0077ff; color: white; }
.lego-btn.secondary { background: #00a84f; color: white; }
.lego-btn.cancel { background: #d32f2f; color: white; }


/* MAIN CONTENT */

main {
  max-width: 1600px;
  margin: 40px auto;
  padding: 0 24px 60px;
  z-index: 10;
}

/* SET CONTAINER  */

#set-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.set-card {
    background: white;
    border-radius: 12px;
    font-size: 13px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}
	.set-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 6px 14px rgba(0,0,0,0.15);
	}

	/* Semi-transparante overlay */
	.set-card.loading::after {
	  content: "";
	  position: absolute;
	  inset: 0;
	  background: rgba(255, 255, 255, 0.55);
	  backdrop-filter: blur(2px);
	  pointer-events: none;
	  border-radius: 8px; /* match jouw kaart */
	}

	/* Kleine spinner rechtsboven */
	.set-card.loading::before {
	  content: "";
	  position: absolute;
	  top: 8px;
	  right: 8px;
	  width: 18px;
	  height: 18px;
	  border: 2px solid #ccc;
	  border-top-color: #333;
	  border-radius: 50%;
	  animation: spin 0.7s linear infinite;
	  z-index: 3;
	}

	@keyframes spin {
	  to { transform: rotate(360deg); }
	}

	.set-card.owned{
		background: var(--light-sand);
	}
	.set-card.is_complete{
		background: var(--lego-lightgreen);
	}
	.set-card a {
		cursor: pointer;
		font-size: inherit;
		font-weight: normal;
		position: static;
		padding: 0;
		text-decoration: none;
	}
	.set-card a:hover::after {
		width: 0;
	}
	.set-card .set-theme {
		display: block;
		color: #d7d4d4;
		font-size: smaller;
		font-weight: bold;
		position: relative;
		overflow: hidden;
		text-overflow: ellipsis;
		top: -10px;
		white-space: nowrap;
		width: 150px;
	}
	.set-card img {
		width: auto;
		height: auto;
		border-radius: 8px;
		max-width: 180px;
		max-height: 100px;
		min-height: 100px;
		object-fit: contain;
		display: block;
		margin: 0 auto;
	}

	.set-card h3 {
		color: #333;
		font-size: 18px;
		margin: 10px 0 5px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.set-card p {
		margin: 4px 0;
		color: #555;
		display: grid; 
		grid-template-columns: 80px 1fr; /* label | waarde */
	}
	.set-card div.set-menu{
		position: absolute;
		right: 0;
		bottom: 0;
		height: 67px;
	}
	.set-card a.view-set-btn {
		padding: 1px 2px 2px;
		display: block;
		height: 24px;
		margin-bottom: 2px;
	}

table.tbl {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;	
}
table.tbl tbody tr:hover{
	background: var(--gray-light);
}

    table.tbl th, table.tbl td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
      text-align: left;
    }

.themes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

	.theme-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10px;
		border-bottom: 1px solid #ddd;
	}

	.theme-row:hover {
		background: var(--gray-light);
	}

	.theme-info {
		display: flex;
		flex-direction: column;
		flex: 1;
		min-width: 0;
	}

	.theme-name {
		font-weight: 600;
	}

	.theme-children {
		font-size: 8pt;
		color: #7e7e7e;
		margin-left: 30px;
		font-style: italic;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.theme-sync {
		width: 60px;
		text-align: center;
	}


.specs {
    background: var(--gray-light);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr; /* alles onder elkaar */
    gap: 8px;
    padding: 12px;
    margin-top: 16px;
}

.specs > label {
    font-weight: bold;
    font-size: 1rem;
}

.specs .row {
    display: flex;
    justify-content: space-between; /* tekst links, button rechts */
    align-items: center;
    font-size: 0.9rem;
	padding: 0 16px;
}

/* SET HEADER CARD */
.set-header {
	background-color: var(--white);
	border-radius: 16px;
	padding: 24px;
	display: flex;
	gap: 32px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    .set-header img {
		max-height: 320px;
		width: 320px;
		border-radius: 12px;
		box-shadow: 0 4px 10px rgba(0,0,0,0.15);
		padding: 5px;
    }

.set-info {
	width: 100%;
}
	.set-info .set-menu {
		position: absolute;
		right: 0;
	}
	
    .set-info h1 {
		font-size: 1.8rem;
		margin-bottom: 8px;
    }

    .set-info .set-number {
		font-size: 1rem;
		font-weight: 700;
		color: var(--lego-blue);
		margin-bottom: 12px;
    }

    .set-specs {
		margin-top: 16px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
    }

    .set-specs div {
		background: var(--gray-light);
		padding: 10px;
		border-radius: 8px;
		font-size: 0.9rem;
    }



.lego-brick-iso .brick-top {
    fill: var(--brick-color);
    filter: brightness(1.20); /* top = licht */
}

.lego-brick-iso .brick-front {
    fill: var(--brick-color);
    filter: brightness(0.85); /* front = donkerder */
}

.lego-brick-iso .brick-side {
    fill: var(--brick-color);
    filter: brightness(0.75); /* side = nog donkerder */
}

/* Studs */
.lego-brick-iso .stud-top {
    fill: var(--brick-color);
    filter: brightness(1.30);
}

.lego-brick-iso .stud-side {
    fill: var(--brick-color);
    filter: brightness(1.05);
}

.lego-brick-iso .stud-shadow {
    fill: rgba(0,0,0,0.18);
}



.no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: 'Lato', sans-serif;
  color: #444;
  background: #f5f59852;
  border-radius: 8px;
}

	.no-results .lego-detective {
	  width: 90px;
	}
	.no-results p{
		font-size: 0.9rem;
		font-weight: bold;
	}
	
	
