/* Màu BIỂU TƯỢNG của nút #st-share-btn trong cụm nút nổi. Kiểu viên thuốc/viên tròn
   dùng chung khai ở js/floorplan.css; ở đây chỉ đặt màu riêng, cùng lệ js/feedback.css
   (#c2410c) và js/welcome.css (#a37400).

   TÍM #7e22ce (~5.6:1 trên nền trắng): bốn nút kia đã chiếm xanh lá · xanh dương ·
   vàng đậm · cam gạch, nên tím là màu còn lại tách bạch được ở nét vẽ 18px. */
#st-share-btn svg {
  stroke: #7e22ce;
  fill: none;
}

/* share-reward.css — hộp thoại "Chia sẻ tour · Nhận mã giảm giá" (js/share-reward.js).
   CHỈ index.htm nạp. Khuôn nền mờ + thẻ giữa màn lấy đúng theo js/feedback.css để hai
   hộp thoại của trang trông là một bộ. */

#st-share-back {
  position: fixed;
  inset: 0;
  z-index: 10060;              /* trên #fp-overlay (10001) và #viewer (10005/10008) */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .55);
  opacity: 0;
  transition: opacity .22s ease;
  font-family: "DVN - Gustavo", "DVN Gustavo", "Be Vietnam Pro", system-ui, sans-serif;
}
/* `.vis` bật display, `.on` chạy hiệu ứng — transition không chạy từ display:none, mà
   để mỗi opacity:0 thì nền mờ vẫn nuốt cú bấm vào tour (cùng lệ #st-fb-back). */
#st-share-back.vis { display: flex; }
#st-share-back.on { opacity: 1; }

#st-share-card {
  width: min(460px, 100%);
  max-height: 94dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .35);
  padding: 22px 22px 20px;
  transform: translateY(12px) scale(.98);
  transition: transform .24s cubic-bezier(.2, .8, .3, 1);
  box-sizing: border-box;
}
#st-share-back.on #st-share-card { transform: none; }
#st-share-card * { box-sizing: border-box; }

.st-sr-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.st-sr-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: #0f172a; flex: 1; line-height: 1.3; }
.st-sr-x {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f1f5f9; color: #475569; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.st-sr-x:hover { background: #e2e8f0; }
.st-sr-x svg { width: 15px; height: 15px; }
.st-sr-sub { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: #64748b; }

/* ---- bước 1: chọn nơi chia sẻ ---- */
.st-sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.st-sr-net {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; color: #0f172a;
  cursor: pointer; text-align: left; transition: border-color .15s, background .15s;
}
.st-sr-net:hover { background: #f8fafc; border-color: #cbd5e1; }
.st-sr-net svg { width: 20px; height: 20px; flex: none; }
.st-sr-net.wide { grid-column: 1 / -1; justify-content: center; }
/* Nền thương hiệu chỉ ở phần biểu tượng — nút để trắng cho đồng bộ với cả trang. */
.st-sr-net .ic { width: 30px; height: 30px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; flex: none; color: #fff; }
.st-sr-ic-fb { background: #1877f2; }
.st-sr-ic-zalo { background: #0068ff; font-weight: 800; font-size: 12.5px; letter-spacing: -.3px; }
.st-sr-ic-x { background: #0f172a; }
.st-sr-ic-copy { background: #64748b; }
.st-sr-ic-native { background: #0e6b2e; }

/* Dấu tích "đã chia sẻ qua kênh này" — khách bấm xong thì thấy ngay là đã tính. */
.st-sr-net.done { border-color: #0e6b2e; background: rgba(14, 107, 46, .06); }
.st-sr-net.done::after { content: "✓"; margin-left: auto; color: #0e6b2e; font-weight: 800; }

/* ---- bước 2: email ---- */
.st-sr-step2 { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.st-sr-step2[hidden] { display: none; }
.st-sr-fld { margin-bottom: 12px; }
.st-sr-fld label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.st-sr-fld input {
  width: 100%; padding: 11px 13px; border: 1.5px solid #cbd5e1; border-radius: 10px;
  font: inherit; font-size: 14px; color: #0f172a; background: #fff;
}
.st-sr-fld input:focus { outline: none; border-color: #0e6b2e; box-shadow: 0 0 0 3px rgba(14, 107, 46, .14); }
/* Honeypot: ô người thật không bao giờ thấy. `display:none` thì nhiều bot bỏ qua, nên
   giấu bằng cách đẩy ra ngoài khung nhìn — cùng lệ #st-fb-hp của js/feedback.css. */
.st-sr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.st-sr-send {
  width: 100%; padding: 13px; border: 0; border-radius: 11px;
  background: #0e6b2e; color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: filter .15s;
}
.st-sr-send:hover { filter: brightness(1.08); }
.st-sr-send:disabled { opacity: .55; cursor: not-allowed; }
.st-sr-err { margin: 10px 0 0; font-size: 13px; color: #b91c1c; line-height: 1.5; }
.st-sr-note { margin: 10px 0 0; font-size: 11.5px; color: #94a3b8; line-height: 1.5; }

/* ---- bước 3: mã ---- */
.st-sr-done { text-align: center; padding: 6px 0 2px; }
.st-sr-done .big { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.st-sr-done h3 { margin: 0 0 6px; font-size: 18px; color: #0f172a; }
.st-sr-done p { margin: 0 0 14px; font-size: 13.5px; color: #64748b; line-height: 1.55; }
.st-sr-code {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 2px dashed #0e6b2e; border-radius: 12px; padding: 14px;
  background: rgba(14, 107, 46, .06); margin-bottom: 10px;
}
.st-sr-code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 21px; letter-spacing: 1px; color: #0e6b2e; word-break: break-all;
}
.st-sr-copy {
  flex: none; border: 1px solid #0e6b2e; background: #fff; color: #0e6b2e;
  border-radius: 8px; padding: 7px 11px; font: inherit; font-size: 12.5px;
  font-weight: 700; cursor: pointer;
}
.st-sr-copy:hover { background: rgba(14, 107, 46, .1); }

@media (max-width: 420px) {
  #st-share-card { padding: 18px 16px 16px; }
  .st-sr-grid { grid-template-columns: 1fr; }
  .st-sr-head h2 { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
  #st-share-back, #st-share-card { transition: none; }
}
