/* ===== SIT Customizer — Frontend ===== */

.stk-customizer {
  margin: 20px 0;
  font-family: inherit;
}

/* Toggle button */
.stk-toggle-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  background: #ffca00;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
}

.stk-toggle-btn:hover {
  background: #f0c000;
}

.stk-toggle-btn--disabled,
.stk-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.stk-toggle-btn.active {
  background: #ffca00;
}

/* Steps container */
.stk-steps-container {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  margin-top: 12px;
  background: #fafafa;
}

/* ===== Stepper navigation ===== */
.stk-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  gap: 0;
}

.stk-stepper-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.stk-stepper-item.active,
.stk-stepper-item.completed {
  opacity: 1;
}

.stk-stepper-item.completed {
  cursor: pointer;
}

.stk-stepper-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ddd;
  color: #666;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.stk-stepper-item.active .stk-stepper-num {
  background: #2c3e50;
  color: #fff;
}

.stk-stepper-item.completed .stk-stepper-num {
  background: #27ae60;
  color: #fff;
}

.stk-stepper-label {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.stk-stepper-item.active .stk-stepper-label {
  color: #2c3e50;
  font-weight: 600;
}

.stk-stepper-line {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 8px;
  min-width: 20px;
  max-width: 60px;
}

/* ===== Step content ===== */
.stk-step {
  -webkit-animation: stkFadeIn 0.3s ease;
  animation: stkFadeIn 0.3s ease;
}

@-webkit-keyframes stkFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stkFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stk-step-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
}

/* ===== Options grid ===== */
.stk-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.stk-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.stk-option-card:hover {
  border-color: #2c3e50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stk-option-card.selected {
  border-color: #2c3e50;
  background: #f0f4f8;
  box-shadow: 0 0 0 1px #2c3e50;
}

.stk-option-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.stk-option-card-sub {
  font-size: 12px;
  color: #888;
}

.stk-option-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #27ae60;
}

.stk-option-card-img {
  width: 80px;
  height: 80px;
  -o-object-fit: contain;
  object-fit: contain;
  margin-bottom: 8px;
  border-radius: 4px;
}

/* ===== Summary ===== */
.stk-summary {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.stk-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.stk-summary-label {
  font-size: 14px;
  color: #666;
}

.stk-summary-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.stk-summary-divider {
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

.stk-price {
  color: #2c3e50;
}

.stk-price-total {
  font-size: 18px;
  color: #27ae60;
}

.stk-summary-price-row {
  padding: 10px 0;
}

/* Warning message */
.stk-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 13px;
}

/* ===== Free-type notice ===== */
.stk-free-type-notice {
  background: #e8f4fd;
  border: 1px solid #b3d9f5;
  color: #1a5276;
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.stk-free-type-notice p:last-child {
  margin-bottom: 0;
}

/* ===== Order total ===== */
.stk-order-total {
  margin-top: 16px;
  background: #f0f4f8;
  border: 2px solid #2c3e50;
  border-radius: 8px;
  padding: 16px 20px;
}

.stk-order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stk-order-total-label {
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
}

.stk-order-total-value {
  font-size: 20px;
  font-weight: 700;
  color: #27ae60;
}

/* ===== Step hint text ===== */
.stk-step-hint {
  font-size: 13px;
  color: #888;
  margin: -8px 0 14px 0;
}

/* ===== Step actions (Indietro / Avanti) ===== */
.stk-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

/* When only one button (e.g. step 1 has only Next, step 4 only Back) */
.stk-step-actions > :only-child {
  margin-left: auto;
}

.stk-btn-next,
.stk-btn-back {
  padding: 10px 20px;
  border: 2px solid #2c3e50;
  border-radius: 6px;
  background: #fff;
  color: #2c3e50;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.stk-btn-next:hover,
.stk-btn-back:hover {
  background: #2c3e50;
  color: #fff;
}

.stk-btn-next:disabled,
.stk-btn-next.stk-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stk-btn-next:disabled:hover,
.stk-btn-next.stk-btn-disabled:hover {
  background: #fff;
  color: #2c3e50;
}

/* ===== Location sections in step 2 & 3 ===== */
.stk-location-section {
  margin-bottom: 20px;
}

.stk-location-section:last-child {
  margin-bottom: 0;
}

.stk-location-label {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}

.stk-location-technique {
  font-weight: 400;
  color: #888;
  font-style: italic;
}

/* Auto-selected technique card */
.stk-option-card.stk-auto-selected {
  border-color: #27ae60;
  background: #f0fbf4;
  cursor: default;
}

/* ===== Combo card (step 3) ===== */
.stk-combo-card {
  align-items: flex-start;
  gap: 8px;
}

.stk-combo-card-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.stk-combo-dim {
  font-weight: 700;
  font-size: 13px;
  color: #333;
}

.stk-combo-code {
  font-size: 11px;
}

.stk-combo-colors-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.stk-colors-label {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}

.stk-colors-select {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

.stk-option-card.selected .stk-colors-select {
  border-color: #2c3e50;
}

.stk-combo-price {
  align-self: flex-end;
}

/* ===== Upload Files (step 4) ===== */

.stk-upload-areas-hint {
  margin-bottom: 5px;
  margin-top: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #ffca00;
}

#stk-upload-areas-wrapper {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #ffca00;
}

/* ===== Summary list (step 5) ===== */
.stk-areas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.stk-area-row {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.stk-area-row-info {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.stk-area-row-info small {
  font-size: 12px;
  color: #888;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .stk-steps-container {
    padding: 16px;
  }

  .stk-stepper-label {
    display: none;
  }

  .stk-stepper-line {
    min-width: 12px;
  }

  .stk-options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stk-option-card {
    padding: 10px 8px;
  }

  .stk-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .stk-order-total-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
