/* Main widget container */
#stlq_widget {
  max-width: 500px;
  margin: 1.5em auto;
  font-family: Arial, sans-serif;
  color: #000;
  background: #f9f9f9;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Title and instruction */
.stlq-title {
  margin-top: 0;
  font-size: 1.4em;
  text-align: center;
}
.stlq-instruction {
  font-size: 0.9em;
  text-align: center;
  margin-bottom: 1em;
  color: #555;
}

/* Block grouping */
.stlq-block {
  margin-bottom: 1em;
}

/* File input styles */
.stlq-file input[type="file"] {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Options row */
.stlq-options {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
.stlq-options label {
  display: block;
  font-size: 0.9em;
  margin-bottom: 0.3em;
}
.stlq-infill, .stlq-material, .stlq-color-picker {
  flex: 1;
  min-width: 120px;
}
.stlq-options input[type="range"] {
  width: 100%;
}
.stlq-options select,
.stlq-options input[type="color"] {
  width: 100%;
  padding: 0.3em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Submit button */
.stlq-submit button {
  width: 100%;
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 0.7em;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.stlq-submit button:hover {
  background: #005177;
}

/* Progress bar */
.stlq-progress {
  background: #e0e0e0;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}
#stlq_bar {
  background: #0073aa;
  width: 0;
  height: 100%;
  transition: width 0.4s ease;
}

/* Result panel */
.stlq-result {
  text-align: center;
}
.stlq-price {
  font-size: 1.3em;
  font-weight: bold;
  margin: 0.5em 0;
  color: #0073aa;
}

/* 3D canvas container */
.stlq-3d {
  margin: 0 auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

/* Checkout container */
.stlq-checkout {
  margin-top: 0.8em;
}


@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

#stlq_widget {
  font-family: 'Montserrat', sans-serif;
}

.color-choice {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #ccc;
}
.color-choice.selected {
  border: 2px solid #000;
}


.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


#stlq_widget {
  align-items: flex-start;
}

#stlq_price {
  margin-top: 0.5em;
}


/* Responsive layout: stack columns on small screens */
@media (max-width: 768px) {
  #stlq_widget {
    flex-direction: column;
    align-items: stretch;
  }

  #stlq_widget > div {
    width: 100%;
    text-align: center;
  }

  #stlq_3d {
    height: 250px;
  }
}


#stlq_widget {
  align-items: flex-start;
}

#stlq_price {
  text-align: center;
  margin-top: 0.5em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #stlq_widget {
    flex-direction: column;
    align-items: center;
  }

  #stlq_widget > div {
    width: 100%;
    text-align: center;
  }

  #stlq_3d {
    width: 200px;
    height: 200px;
  }
}


#stlq_price {
  text-align: center;
  margin-top: 0.5em;
}


/* Ensure grey background covers the entire widget */
#stlq_widget {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* Wrap colors every 5 items */
#stlq_color_choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  max-width: 140px; /* 5 circles of ~24px + gaps */
}


/* Force colors to wrap every 5 items */
#stlq_color_choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  max-width: 150px; /* 5 circles per row */
}

#stlq_color_choices .color-choice {
  flex: 0 0 24px; /* fixed width */
}


/* Wrap colors every 7 items */
#stlq_color_choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  max-width: 210px; /* 7 circles of ~24px + gaps */
}

#stlq_color_choices .color-choice {
  flex: 0 0 24px;
}


/* Wrap colors every 10 items */
#stlq_color_choices {
  max-width: 300px; /* 10 circles of ~24px + gaps */
}


#stlq_price {
  font-weight: bold;
  font-size: 1.5em;
  color: #222;
}


.fade-in {
  opacity: 0;
  animation: fadeInAnim 0.5s forwards ease-in-out;
}

@keyframes fadeInAnim {
  from { opacity: 0; }
  to { opacity: 1; }
}
