/* Configure Page Styles */

/* Button-group radio styling (replaces Vue fra-radioButtons) */
.cfg-radio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.cfg-radio-buttons input[type="radio"] {
  display: none;
}
.cfg-radio-buttons label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--bs-primary);
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--bs-primary);
  background: transparent;
  transition: all 0.15s ease-in-out;
}
.cfg-radio-buttons input[type="radio"]:checked + label {
  background: var(--bs-primary);
  color: #fff;
}
.cfg-radio-buttons input[type="radio"]:disabled + label {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sticky summary panel */
.cfg-summary {
  position: sticky;
  top: 7em;
  z-index: 1;
}

/* Price line items */
.cfg-price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  line-height: 1.4;
}
.cfg-price-line .operator {
  font-weight: 600;
  min-width: 1.5em;
  text-align: right;
}

/* Swatch tiles */
.cfg-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cfg-swatch-tile {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  transition: border-color 0.15s;
}
.cfg-swatch-tile.selected {
  border-color: var(--bs-primary);
}
.cfg-swatch-tile img {
  display: block;
  border-radius: 0.125rem;
}
.cfg-swatch-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #dee2e6;
  transition: border-color 0.15s;
}
.cfg-swatch-circle.selected {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 2px var(--bs-primary);
}

/* Swatch image overlay (transparent PNG layers) */
.cfg-swatch-preview {
  height: 200px;
  background: #f8f9fa;
  border-radius: 0.375rem;
}
.cfg-swatch-layer {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
}
.cfg-swatch-layer img {
  max-width: 400px;
  max-height: 200px;
}

/* Section dividers */
.cfg-section-label {
  font-weight: 600;
  border-bottom: 1px solid var(--bs-secondary);
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
}

/* Instruction text */
.cfg-instructions {
  font-size: 0.8rem;
  color: var(--bs-secondary);
}

/* Max width constraints matching Nuxt */
@media (min-width: 1200px) {
  .cfg-mw-75 { max-width: 75%; }
}
@media (min-width: 992px) {
  .cfg-mw-lg-50 { max-width: 50%; }
}
@media (min-width: 768px) {
  .cfg-mw-md-50 { max-width: 50%; }
}

/* Cart page styles */
.cart-item {
  border-bottom: 1px solid var(--bs-border-color);
  padding: 1rem 0;
}
.cart-item:last-child {
  border-bottom: none;
}
.cart-qty-input {
  width: 60px;
  text-align: center;
}

/* Total price display */
.cfg-total-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-success);
}

/* Add to cart button */
.cfg-add-to-cart {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
}

/* Tab navigation for multi-cart products */
.cfg-cart-tabs .nav-link {
  color: var(--bs-dark);
  border: 1px solid var(--bs-border-color);
  margin: 0 0.25rem;
  border-radius: 0.375rem;
}
.cfg-cart-tabs .nav-link.active {
  background: var(--bs-primary);
  color: #fff;
  border-color: var(--bs-primary);
}


/* ── Stepped configurator sections (ranges) ── */
.cfg-step-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.cfg-step-head .cfg-section-label {
  border: 0;
  padding: 0;
  margin: 0;
  font-size: 1.05rem;
}
.cfg-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.cfg-step-help {
  margin-bottom: 0.5rem;
}
.cfg-step {
  margin-top: 2.5rem;
}
/* Divider between configurator steps (1–2, 2–3) */
.cfg-step-sep {
  margin: 0 0 1.75rem;
  border: 0;
  border-top: 1px solid #dee2e6;
  opacity: 1;
}

/* Width slider (ranges) */
.cfg-width-slider {
  accent-color: #28a745;
}

/* Ranges Step 1: selected-model chips */
.cfg-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e9f7ec;
  color: #1c7a33;
  border: 1px solid #bfe6c8;
  border-radius: 999px;
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  font-size: 0.875rem;
}
.cfg-model-chip-x {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.cfg-model-chip-x:hover {
  color: #b02a37;
}

/* Ranges Step 2 controls row — slider (~half) · qty · price · remove, top-aligned */
.cfg-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.cfg-range-slider {
  flex: 1 1 45%;
  min-width: 200px;
}
.cfg-range-qty {
  flex: 0 0 auto;
}
.cfg-range-price {
  flex: 0 0 auto;
  min-width: 90px;
  text-align: right;
  margin-left: auto;
}
.cfg-range-remove {
  flex: 0 0 auto;
  align-self: flex-start;
}
@media (max-width: 575px) {
  .cfg-range-slider { flex-basis: 100%; }
  .cfg-range-price { margin-left: 0; }
}
