/* TASK-012 Phase 3C — Поделиться корзиной */
.sofit-share {
  margin: 1rem 0 1.25rem;
}

.sofit-share__btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  color: #222;
  padding: 0.55rem 1rem;
  font: inherit;
  cursor: pointer;
}

.sofit-share__btn:hover {
  background: #f5f5f5;
}

.sofit-share__btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.sofit-share__status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #444;
}

.sofit-share__status.is-error {
  color: #a11;
}

.sofit-share__backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(0, 0, 0, 0.35);
}

.sofit-share__modal {
  position: fixed;
  z-index: 10050;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 2rem));
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 1.1rem 1.15rem 1.2rem;
}

.sofit-share__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.sofit-share__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.sofit-share__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  color: #444;
}

.sofit-share__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sofit-share__item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sofit-share__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: #f3f3f3;
  display: block;
}

.sofit-share__thumb--empty {
  display: inline-block;
}

.sofit-share__name {
  font-size: 0.95rem;
  line-height: 1.3;
}

.sofit-share__name a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sofit-share__row {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #666;
}

.sofit-share__sum {
  font-weight: 600;
  white-space: nowrap;
}

.sofit-share__empty {
  padding: 0.75rem 0;
  color: #666;
}

.sofit-share__total {
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.sofit-share__warn {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #8a5a00;
}

.sofit-share__link {
  width: 100%;
  box-sizing: border-box;
  margin: 0.35rem 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font: inherit;
}

.sofit-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.sofit-share__actions button {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #222;
  color: #fff;
  padding: 0.5rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.sofit-share__actions button[data-share-secondary] {
  background: #fff;
  color: #222;
}

.sofit-share__actions button:disabled {
  opacity: 0.55;
  cursor: wait;
}

html.sofit-share-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .sofit-share__item {
    grid-template-columns: 48px 1fr;
  }

  .sofit-share__sum {
    grid-column: 2;
    justify-self: start;
  }
}
