/* Stile per i pulsanti dei ricambi */
.parts-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin: 20px 0 30px;
  width: 100%;
}

.part-option {
  display: inline-block;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
  box-sizing: border-box;
  position: relative;
  margin-bottom: 8px;
}

@media (max-width: 992px) {
  .part-option {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }
}

@media (max-width: 768px) {
  .part-option {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
  }
}

@media (max-width: 576px) {
  .part-option {
    flex: 0 0 calc(100% - 8px);
    max-width: calc(100% - 8px);
  }
}

@media (max-width: 480px) {
  .part-option {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.part-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-color: #ccc;
}

.part-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.part-option.selected {
  background-color: #FFF5F5;
  border-color: #FF6B6B;
  box-shadow: 0 4px 10px rgba(255,107,107,0.15);
}

.part-option.selected .part-icon {
  color: #FF6B6B;
}

.part-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  display: block;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.part-option.long-text .part-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  height: 2.6em;
}

.part-option .checkmark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s ease;
}

.part-option.selected .checkmark {
  background-color: #FF6B6B;
  border-color: #FF6B6B;
  color: white;
}

.custom-part {
  width: 100%;
  margin-top: 15px;
  text-align: center;
}

.custom-part button {
  background-color: transparent;
  border: 1px dashed #ccc;
  color: #666;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 250px;
}

.custom-part button:hover {
  background-color: #f9f9f9;
  border-color: #bbb;
}

.step-instruction h3 {
  margin-bottom: 5px;
}

.step-instruction p {
  margin-bottom: 5px;
}

.instruction-note {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-bottom: 10px;
}

#addCustomPartBtn {
  background-color: #f8f9fa;
  border: 2px dashed #4caf50;
  color: #4caf50;
  font-weight: bold;
  margin-bottom: 10px;
  width: 100%;
  max-width: none;
}

#addCustomPartBtn:hover {
  background-color: #e8f5e9;
  border-color: #2e7d32;
}

.reset-custom-parts-btn {
  background-color: #fff8f8;
  border: 2px dashed #f44336;
  color: #f44336;
  font-weight: bold;
  margin-top: 5px;
  width: 100%;
  max-width: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-custom-parts-btn:hover {
  background-color: #ffebee;
  border-color: #c62828;
}

.hidden-textarea {
  display: none;
}
