/* Страница черновика запроса (бывшая «Моя подборка»).
   Маркетплейс-лейаут: список + sticky-итог, мобильный бар. */

.rfq-selection {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 96px;
}

.rfq-selection__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.rfq-selection__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text, #1d1d1f);
}

.rfq-selection__count-badge {
  min-width: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-accent, #007aff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.rfq-selection__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-selection__clear {
  flex: none;
  border: none;
  background: none;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rfq-selection__clear:hover {
  color: #b0413e;
}

.rfq-selection__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.rfq-selection__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rfq-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  border-radius: 12px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.rfq-item:hover {
  border-color: transparent;
  box-shadow: 0 2px 16px rgba(20, 30, 45, 0.1);
}

.rfq-item--removing {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.rfq-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--color-surface, #f5f5f7);
  color: #aeb8c2;
  text-decoration: none;
  overflow: hidden;
}

.rfq-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rfq-item__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rfq-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text, #1d1d1f);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rfq-item__title:hover {
  color: var(--color-accent, #007aff);
}

.rfq-item__article {
  font-size: 13px;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-item__article b {
  font-weight: 600;
  color: var(--color-text, #1d1d1f);
}

.rfq-item__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rfq-item__remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  padding: 6px;
  font-size: 13px;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.rfq-item__remove:hover {
  color: #b0413e;
  background: rgba(176, 65, 62, 0.07);
}

/* Степпер на странице (компактный; виджет карточки — в reference-catalog.css) */
.rfq-selection .rfq-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.rfq-selection .rfq-stepper__btn {
  width: 34px;
  min-height: 36px;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
  cursor: pointer;
}

.rfq-selection .rfq-stepper__btn:hover {
  background: var(--color-surface, #f5f5f7);
  color: var(--color-text, #1d1d1f);
}

.rfq-selection .rfq-stepper__input {
  width: 52px;
  border: 0;
  border-left: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  border-right: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  text-align: center;
  font: inherit;
  font-weight: 600;
  -moz-appearance: textfield;
}

.rfq-selection .rfq-stepper__input::-webkit-outer-spin-button,
.rfq-selection .rfq-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rfq-selection .rfq-stepper__input:focus {
  outline: 2px solid var(--color-accent, #007aff);
  outline-offset: -2px;
}

.rfq-summary {
  position: sticky;
  top: 24px;
}

.rfq-summary__card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  border-radius: 12px;
  box-shadow: 0 1px 10px rgba(20, 30, 45, 0.06);
}

.rfq-summary__title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.rfq-summary__rows {
  margin: 0 0 16px;
}

.rfq-summary__row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px dashed var(--color-border, rgba(29, 29, 31, 0.12));
}

.rfq-summary__row:last-child {
  border-bottom: none;
}

.rfq-summary__row dt {
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-summary__row dd {
  margin: 0;
  font-weight: 700;
}

.rfq-summary__submit {
  display: block;
  width: 100%;
  min-height: 46px;
  text-align: center;
  font-size: 15px;
}

.rfq-summary__note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-summary__back {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--color-accent, #007aff);
  text-decoration: none;
}

.rfq-summary__back:hover {
  text-decoration: underline;
}

.rfq-empty {
  max-width: 440px;
  margin: 48px auto;
  text-align: center;
}

.rfq-empty__icon {
  color: #c3ccd5;
  margin-bottom: 16px;
}

.rfq-empty__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.rfq-empty__text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-empty__cta {
  min-height: 44px;
  padding: 0 24px;
}

.rfq-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--color-border, rgba(29, 29, 31, 0.12));
  box-shadow: 0 -4px 16px rgba(20, 30, 45, 0.08);
}

.rfq-mobile-bar__info {
  display: flex;
  flex-direction: column;
}

.rfq-mobile-bar__count {
  font-size: 14px;
  font-weight: 700;
}

.rfq-mobile-bar__qty {
  font-size: 12px;
  color: var(--color-text-muted, rgba(29, 29, 31, 0.62));
}

.rfq-mobile-bar__submit {
  min-height: 42px;
  padding: 0 20px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .rfq-selection__layout {
    grid-template-columns: 1fr;
  }

  .rfq-summary {
    position: static;
  }

  .rfq-summary__submit {
    display: none;
  }

  .rfq-mobile-bar[data-sel-mobile-bar]:not([hidden]) {
    display: flex;
  }
}

@media (max-width: 560px) {
  .rfq-selection__title {
    font-size: 21px;
  }

  .rfq-item {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "media body"
      "controls controls";
  }

  .rfq-item__media {
    grid-area: media;
    width: 56px;
    height: 56px;
  }

  .rfq-item__body {
    grid-area: body;
  }

  .rfq-item__controls {
    grid-area: controls;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid var(--color-surface, #f5f5f7);
  }
}
