/**
 * Local Variants Styles for Tomorrowland Store
 * Стили для корректного отображения вариантов товаров
 */

/* Контейнер вариантов */
.m-variants {
  margin-bottom: 20px;
}

.m-variants.variants-initialised .a-loader__wrapper {
  display: none !important;
}

/* Option group */
.m-variants__option-group {
  margin-bottom: 15px;
}

/* Fieldset */
.m-variants__fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Legend */
.m-variants__legend {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

.m-variants__legend-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Radio inputs - визуально скрыты */
.m-variants__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Labels как кнопки */
.m-variants__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 10px 16px;
  margin: 0 8px 8px 0;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.m-variants__label:hover {
  background: #f5f5f5;
}

/* Выбранный вариант */
.m-variants__input:checked + .m-variants__label,
.m-variants__label.is-active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Недоступный вариант */
.m-variants__input:disabled + .m-variants__label,
.m-variants__label.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Threshold message */
.m-variants__threshold-message {
  display: block;
  margin-top: 10px;
  padding: 8px 12px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  font-size: 13px;
  color: #856404;
}

.m-variants__threshold-message.hide {
  display: none;
}

/* Quantity section */
.o-product__quantity {
  margin-top: 20px;
}

.o-product__quantity .a-input__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* Quantity ticker */
.m-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #000;
}

.m-quantity__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.m-quantity__button:hover {
  background: #f5f5f5;
}

.m-quantity__button svg {
  width: 20px;
  height: 20px;
}

.m-quantity__input {
  width: 60px;
  height: 44px;
  border: none;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  -moz-appearance: textfield;
}

.m-quantity__input::-webkit-outer-spin-button,
.m-quantity__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Color swatches */
.m-variants__fieldset-swatches .m-variants__label {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
}

.m-variants__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* KiwiSizing chart link */
#KiwiSizingChart {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
}

#KiwiSizingChart:hover {
  color: #000;
  text-decoration: underline;
}

/* Grid helper */
.grid--no-wrap {
  flex-wrap: nowrap;
}
