/* ═══════════════════════════════════════════
   Share Widget
   ═══════════════════════════════════════════ */

.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  animation: swBgIn 0.22s ease both;
   justify-content: flex-end;
}

@keyframes swBgIn { from { opacity: 0; } to { opacity: 1; } }

.sw {
  width: 100%;
  background: #111;
  border-radius: 24px 24px 0 0;
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
  animation: swSheetIn 0.32s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes swSheetIn {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (min-width: 768px) {
  .sw-overlay { align-items: center; justify-content: center; }
  .sw {
    max-width: 420px;
    border-radius: 20px;
    padding-bottom: 24px;
    animation: swModalIn 0.25s ease both;
  }
  @keyframes swModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
}

.sw__handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  margin: 12px auto 0;
}

.sw__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.sw__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.sw__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer;
  transition: background 0.2s;
}
.sw__close:hover { background: rgba(255,255,255,0.14); }


.sw__preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px 20px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
}
.sw__preview-thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: rgba(255,255,255,0.3);
}
.sw__preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sw__preview-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sw__preview-price {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}


.sw__options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 20px 20px;
}
.sw__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 14px;
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.2s;
}
.sw__option:hover { background: rgba(255,255,255,0.06); }

.sw__option-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sw__option-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  font-family: inherit;
}


.sw__option--copy   .sw__option-icon { background: rgba(255,255,255,0.08); color: #fff; }
.sw__option--wa     .sw__option-icon { background: rgba(37,211,102,0.15); color: #25d366; }
.sw__option--twitter .sw__option-icon { background: rgba(29,161,242,0.15); color: #1da1f2; }
.sw__option--ig     .sw__option-icon {
  background: linear-gradient(135deg, rgba(225,48,108,0.2), rgba(193,53,132,0.2), rgba(88,81,219,0.2));
  color: #e1306c;
}
.sw__option--fb     .sw__option-icon { background: rgba(66,103,178,0.15); color: #4267b2; }
.sw__option--tg     .sw__option-icon { background: rgba(0,136,204,0.15); color: #0088cc; }
.sw__option--tiktok .sw__option-icon { background: rgba(255,0,80,0.1); color: #ff0050; }
.sw__option--more   .sw__option-icon { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }


.sw__link-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 20px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.sw__link-text {
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw__copy-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--c-accent, #b8f53d);
  color: #080808;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  font-family: inherit;
}
.sw__copy-btn:hover { transform: scale(1.04); }
.sw__copy-btn.is-copied {
  background: rgba(78,203,141,0.2);
  color: #8ab633;
}


.sw__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 16px 20px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}
.sw__qr canvas {
  border-radius: 8px;
}
.sw__qr-label {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.3px;
}
