/**
 * SSR-стили конфигуратора (до инициализации JS).
 * Повторяют ключевые правила megashop-sdk.css для params/summary/price.
 */

.megashop-configurator-host .megashop-configurator--ssr {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
}

.megashop-configurator--ssr *,
.megashop-configurator--ssr *::before,
.megashop-configurator--ssr *::after {
  box-sizing: border-box;
}

.megashop-configurator--ssr .megashop-configurator__params {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.megashop-configurator--ssr .megashop-configurator__params--static {
  margin-bottom: 0;
}

.megashop-configurator--ssr .megashop-configurator__not-configured {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: #94a3b8;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background-color: #f8fafc;
}

.megashop-configurator--ssr .megashop-configurator__param-label-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.megashop-configurator--ssr .megashop-configurator__param-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
}

.megashop-configurator--ssr .megashop-configurator__group-select-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.megashop-configurator--ssr .megashop-configurator__group-select-row > .megashop-configurator__param-groups,
.megashop-configurator--ssr .megashop-configurator__group-select-row > .megashop-configurator__dropdown {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin-bottom: 0;
}

.megashop-configurator--ssr .megashop-configurator__param--number-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.megashop-configurator--ssr .megashop-configurator__param--number-stepper .megashop-configurator__param-label-row {
  margin-bottom: 0;
  min-width: 0;
  flex: 1;
}

.megashop-configurator--ssr .megashop-configurator__number-stepper {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
}

.megashop-configurator--ssr .megashop-configurator__number-stepper-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.megashop-configurator--ssr .megashop-configurator__number-stepper-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.megashop-configurator--ssr .megashop-configurator__number-stepper-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 2rem;
  padding: 0 0.375rem;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  text-align: center;
}

.megashop-configurator--ssr .megashop-configurator__checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.megashop-configurator--ssr .megashop-configurator__checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.megashop-configurator--ssr .megashop-configurator__checkbox,
.megashop-configurator--ssr .megashop-configurator__radio {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: #0f172a;
}

.megashop-configurator--ssr .megashop-configurator__checkbox {
  width: 1.125rem;
  height: 1.125rem;
}

.megashop-configurator--ssr .megashop-configurator__radio-group:not(.megashop-singleconf__radio-group--compact) {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.megashop-configurator--ssr .megashop-configurator__choice-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
}

.megashop-configurator--ssr .megashop-configurator__option-content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.megashop-configurator--ssr .megashop-configurator__option-label {
  color: #334155;
  line-height: 1.35;
}

.megashop-configurator--ssr .megashop-configurator__option-thumbnail {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  overflow: visible;
}

.megashop-configurator--ssr .megashop-configurator__option-thumbnail-img {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  object-fit: cover;
  background: #f8fafc center / cover no-repeat;
}

.megashop-configurator--ssr .megashop-configurator__dropdown {
  position: relative;
}

.megashop-configurator--ssr .megashop-configurator__dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
}

.megashop-configurator--ssr .megashop-configurator__dropdown--static .megashop-configurator__dropdown-trigger {
  cursor: default;
  pointer-events: none;
}

.megashop-configurator--ssr .megashop-configurator__dropdown-trigger-content {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 2rem;
  flex: 1;
}

.megashop-configurator--ssr .megashop-configurator__dropdown-caret {
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg) translateY(-1px);
}

.megashop-configurator--ssr .megashop-configurator__bed-size-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.megashop-configurator--ssr .megashop-configurator__bed-size-control > .megashop-configurator__dropdown {
  flex: 1;
  min-width: 0;
}

.megashop-configurator--ssr .megashop-configurator__bed-size-separator {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 2rem;
  line-height: 1;
  user-select: none;
}

.megashop-configurator--ssr .megashop-configurator__bed-size-sleeping {
  flex-shrink: 0;
  min-width: 5.5rem;
  height: 50px;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  display: grid;
  align-content: center;
  justify-content: center;
}

.megashop-configurator--ssr .megashop-configurator__summary--static {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.megashop-configurator--ssr .megashop-configurator__price-top {
  margin-bottom: 1rem;
}

.megashop-configurator--ssr .megashop-configurator__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.megashop-configurator--ssr .megashop-configurator__price-main {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.megashop-configurator--ssr .megashop-configurator__price-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
}

.megashop-configurator--ssr .megashop-configurator__action {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  min-height: 2rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.megashop-configurator--ssr .megashop-configurator__action:disabled {
  opacity: 0.45;
  cursor: default;
}

.megashop-configurator--ssr .megashop-configurator__price-old-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.megashop-configurator--ssr .megashop-configurator__price-old {
  font-size: 1.125rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: line-through;
}

.megashop-configurator--ssr .megashop-configurator__keep-price {
  border: 0;
  padding: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  text-decoration: underline;
  cursor: pointer;
}

.megashop-configurator--ssr .megashop-configurator__keep-price:disabled {
  opacity: 0.45;
  cursor: default;
}

.megashop-configurator--ssr .megashop-configurator__set-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.75rem;
}

.megashop-configurator--ssr .megashop-configurator__qty {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #fff;
}

.megashop-configurator--ssr .megashop-configurator__qty-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.megashop-configurator--ssr .megashop-configurator__qty-btn:disabled {
  opacity: 0.4;
}

.megashop-configurator--ssr .megashop-configurator__qty-input {
  width: 2.25rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  border-radius: 0;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
}

.megashop-configurator--ssr .megashop-configurator__add-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.megashop-configurator--ssr .megashop-configurator__add-toggle input {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #0f172a;
  cursor: pointer;
}

.megashop-configurator--ssr .megashop-configurator__price-old {
  font-size: 1.125rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: line-through;
}

.megashop-configurator--ssr .megashop-configurator__price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.megashop-configurator--ssr .megashop-configurator__price--empty {
  color: #94a3b8;
}

.megashop-configurator--ssr .megashop-configurator__reset-config {
  margin-left: auto;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 1.125rem;
  line-height: 1;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}

.megashop-configurator--ssr .megashop-configurator__reset-config:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.megashop-configurator--ssr .megashop-configurator__radio-group--static .megashop-configurator__choice-row,
.megashop-configurator--ssr .megashop-configurator__checkbox-row {
  pointer-events: none;
}
