/* ============================================================
   HOWZIT PORTAL — BUSINESS SHARE BUTTON + SHARE SHEET
   (Wildcard Catalogue — "Share this business" enhancement)
   ------------------------------------------------------------
   Adds a "Share" action to the business-detail popup footer and a
   small share sheet (link + Copy + WhatsApp / Email / Facebook / X /
   LinkedIn + native share). Uses the site's existing design tokens
   (--orange, --navy, --text-muted) so it matches the portal exactly.
   ============================================================ */

/* ---- Share button in the popup footer (.bp-actions grid) ---- */
.bp-btn-share {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
}
.bp-btn-share:hover { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }

/* ---- Share sheet overlay ---- */
.hzp-share-overlay {
  position: fixed;
  inset: 0;
  /* Must sit ABOVE the business-detail popup (#productModal / .modal-overlay
     = 9990000) and the full-screen promotions viewer (#catalogueModal =
     9995000), otherwise the sheet renders BEHIND the popup. Kept BELOW the
     Losus chatbot (10000000) and the lead/quote/splash overlays
     (2147483600+), which must always win. */
  z-index: 9996000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: hzpShareFade 0.18s ease both;
}

@keyframes hzpShareFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hzp-share-sheet {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
  padding: 18px 18px 20px;
  font-family: inherit;
  animation: hzpSharePop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes hzpSharePop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hzp-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.hzp-share-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy, #2d1952);
}

.hzp-share-title i { color: var(--orange, #ff6a02); }

.hzp-share-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.hzp-share-close:hover { background: #f1f5f9; color: #334155; }

.hzp-share-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-muted, #666);
  line-height: 1.5;
}

/* ---- Link row (input + copy) ---- */
.hzp-share-linkrow {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.hzp-share-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
}
.hzp-share-input:focus { border-color: var(--orange, #ff6a02); background: #fff; }

.hzp-share-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--orange, #ff6a02);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}
.hzp-share-copy:hover { background: var(--orange-dark, #e05800); }
.hzp-share-copy.is-copied { background: var(--green, #059669); }

/* ---- Social buttons ---- */
.hzp-share-socials {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.hzp-share-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 11px;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}
.hzp-share-social i { font-size: 17px; }
.hzp-share-social:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }

.hzp-share-wa { background: #25D366; }
.hzp-share-em { background: #64748b; }
.hzp-share-fb { background: #1877F2; }
.hzp-share-x  { background: #0f172a; }
.hzp-share-li { background: #0A66C2; }

/* ---- Native share button ---- */
.hzp-share-native {
  width: 100%;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy, #2d1952);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.18s;
}
.hzp-share-native:hover { background: #e2e8f0; }

/* ---- Mobile ---- */
@media (max-width: 520px) {
  .hzp-share-overlay { align-items: flex-end; padding: 0; }
  .hzp-share-sheet {
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px 22px;
    animation: hzpShareUp 0.24s ease both;
  }
  @keyframes hzpShareUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hzp-share-socials { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .hzp-share-social span { display: none; }
  .hzp-share-social { padding: 12px 4px; }
  .hzp-share-social i { font-size: 19px; }
}
