/* assets/profile-share.css */
/* Профиль: шаринг + QR (отдельный модуль) */

/* Скрываем старую кнопку "Копировать ссылку" в шапке профиля (без правок social.js) */
.c-social[data-social-root="profile"] .c-social__editRow [data-action="profile_copy"] {
  display: none !important;
}

/* Чтобы можно было позиционировать кнопку шаринга поверх cover */
.c-social[data-social-root="profile"] .c-social__profileCard {
  position: relative;
}

/* Кнопка Share/QR в правом верхнем углу cover */
.pshare-open-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  background: rgba(16, 18, 25, .55);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 8;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.pshare-open-btn:hover {
  transform: translateY(-1px);
  background: rgba(16, 18, 25, .72);
  border-color: rgba(255,255,255,.55);
}
.pshare-open-btn:active { transform: translateY(0); }

.pshare-open-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Если есть owner-кнопка камеры на cover — сдвигаем шаринг левее */
.pshare-open-btn.pshare-open-btn--owner-offset {
  right: 58px;
}

/* ===== Modal / Sheet ===== */

.pshare {
  position: fixed;
  inset: 0;
  z-index: 1000002; /* выше большинства модалок */
  display: none;
}
.pshare.is-open {
  display: block;
}

.pshare__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.52);
  opacity: 0;
  transition: opacity .2s ease;
}
.pshare.is-open .pshare__backdrop {
  opacity: 1;
}

.pshare__sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 18px);
  width: min(560px, calc(100vw - 20px));
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 20px 60px rgba(0,0,0,.24);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  overflow: hidden;
}
.pshare.is-open .pshare__sheet {
  transform: translate(-50%, 0);
  opacity: 1;
}

.pshare__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 8px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.pshare__title {
  font-size: 18px;
  font-weight: 700;
  color: #141414;
}
.pshare__close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: rgba(0,0,0,.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.pshare__body {
  padding: 14px;
  background:
    radial-gradient(1200px 400px at 50% -10%, rgba(255,72,120,.12), transparent 60%),
    radial-gradient(1200px 400px at 50% 110%, rgba(63,81,255,.12), transparent 60%),
    #fff;
}

.pshare__card {
  width: min(420px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
  padding: 14px;
}

.pshare__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pshare__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #ececf2;
  border: 1px solid rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #444;
}
.pshare__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pshare__avatarText {
  font-size: 18px;
}

.pshare__name {
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  color: #121212;
  word-break: break-word;
}
.pshare__tag {
  margin-top: 3px;
  color: #6f6f79;
  font-size: 14px;
  word-break: break-all;
}

.pshare__qrWrap {
  margin-top: 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.pshare__qrCanvas,
.pshare__qrImg {
  width: min(280px, 100%);
  height: auto;
  display: block;
  border-radius: 10px;
  background: #fff;
}

.pshare__url {
  margin-top: 10px;
  font-size: 12px;
  color: #70707a;
  text-align: center;
  word-break: break-all;
}

.pshare__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.pshare__btn {
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #111827;
}
.pshare__btn:hover { background: rgba(0,0,0,.02); }
.pshare__btn--primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.pshare__btn--primary:hover {
  background: #0b1220;
}
.pshare__btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.pshare__ownerRow {
  margin-top: 10px;
}
.pshare__hint {
  margin-top: 10px;
  text-align: center;
  color: #7a7a84;
  font-size: 12px;
}

.pshare__toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(17,24,39,.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 1000003;
}
.pshare__toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Desktop ===== */
@media (min-width: 900px) {
  .pshare__sheet {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, calc(-50% + 14px));
    width: min(620px, calc(100vw - 40px));
    border-radius: 24px;
  }
  .pshare.is-open .pshare__sheet {
    transform: translate(-50%, -50%);
  }
  .pshare__top { padding: 14px 16px 10px; }
  .pshare__body { padding: 16px; }
  .pshare__card { width: 440px; }
}

/* ===== Mobile full-screen (как ты хотел) ===== */
@media (max-width: 899px) {
  .pshare__sheet {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    transform: translateY(16px);
    border-radius: 0;
  }
  .pshare.is-open .pshare__sheet {
    transform: translateY(0);
  }
  .pshare__top {
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  }
  .pshare__body {
    min-height: calc(100dvh - 70px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  }
  .pshare-open-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
            top: 10px;
  }
}

.pshare-open-btn[data-pshare-mode="gift"] {
  width: 40px;
  height: 40px;
}


.pshare-open-btn[data-pshare-mode="gift"] svg {
  width: 35px;
  height: 35px;
  display: block;
}

















.c-shopMount.is-blocked,
.c-shopPaneMount.is-blocked{
  display:none !important;
}

.c-shopPreviewGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:8px;
}

.c-shopPreviewItem{
  position:relative;
  aspect-ratio:1 / 1;
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.c-shopPreviewItem img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.c-shopPreviewRemove{
  position:absolute;
  top:6px;
  right:6px;
  width:28px;
  height:28px;
  border:0;
  border-radius:999px;
  background:rgba(0,0,0,.68);
  color:#fff;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}

.c-shopDetailBack{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.62);
  backdrop-filter:blur(4px);
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
  z-index:999992;
}

.c-shopDetailBack[data-open="1"]{
  opacity:1;
  pointer-events:auto;
}

.c-shopDetail{
  position:fixed;
  inset:auto 0 0 0;
  margin:auto;
  width:min(920px, 100vw);
  max-height:92vh;
  overflow:auto;
  background:#10131c;
  border:1px solid rgba(255,255,255,.08);
  border-radius:24px 24px 0 0;
  transform:translateY(105%);
  transition:transform .24s ease;
  z-index:999993;
  box-shadow:0 -12px 40px rgba(0,0,0,.34);
}

.c-shopDetail[data-open="1"]{
  transform:translateY(0);
}

.c-shopDetailInner{
  padding:16px 16px calc(20px + env(safe-area-inset-bottom));
}

.c-shopDetailTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.c-shopDetailClose{
  appearance:none;
  border:0;
  width:42px;
  height:42px;
  border-radius:14px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:20px;
  cursor:pointer;
}

.c-shopDetailGrid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.c-shopDetailMedia{
  display:grid;
  gap:10px;
}

.c-shopDetailHero{
  aspect-ratio:1 / 1;
  border-radius:20px;
  overflow:hidden;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
}

.c-shopDetailHero img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.c-shopDetailThumbs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}

.c-shopDetailThumb{
  aspect-ratio:1 / 1;
  border-radius:12px;
  overflow:hidden;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  cursor:pointer;
}

.c-shopDetailThumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.c-shopDetailTitle{
  color:#fff;
  font-size:24px;
  font-weight:900;
  line-height:1.2;
  margin-bottom:8px;
}

.c-shopDetailSeller{
  color:rgba(255,255,255,.72);
  font-size:14px;
  margin-bottom:10px;
}

.c-shopDetailPrice{
  color:#f4d37d;
  font-size:24px;
  font-weight:900;
  margin-bottom:10px;
}

.c-shopDetailDesc{
  color:rgba(255,255,255,.82);
  line-height:1.55;
  margin-bottom:14px;
  white-space:pre-wrap;
}

.c-shopDetailActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.c-shopRelated{
  margin-top:18px;
}

.c-shopRelatedTitle{
  color:#fff;
  font-size:18px;
  font-weight:800;
  margin-bottom:10px;
}

.c-shopRelatedHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.c-shopRelatedAll{
  color:#f4d37d;
  text-decoration:none;
  font-weight:700;
}

.c-shopRelatedGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
}

.c-shopMini{
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  cursor:pointer;
}

.c-shopMiniImg{
  aspect-ratio:1 / 1;
  overflow:hidden;
}

.c-shopMiniImg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.c-shopMiniBody{
  padding:10px;
}

.c-shopMiniTitle{
  color:#fff;
  font-size:14px;
  font-weight:800;
  line-height:1.25;
  margin-bottom:6px;
}

.c-shopMiniPrice{
  color:#f4d37d;
  font-size:14px;
  font-weight:800;
}

@media (min-width: 900px){
  .c-shopDetailGrid{
    grid-template-columns:minmax(0, 1.05fr) minmax(0, .95fr);
  }
}
