/* ==========================================================================
   Share Modal — reusable across all pages
   Adapted from links-page share modal
   ========================================================================== */

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0ms;
}

.share-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 12, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.share-panel {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 360px;
  padding: 2rem 1.5rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(40,30,35,0.95) 0%, rgba(25,18,22,0.98) 100%);
  border: 1px solid rgba(201,169,138,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(201,169,138,0.08);
  transform: scale(0.9) translateY(20px);
  transition: transform 50ms ease-out;
  overflow: hidden;
}

.share-modal.active .share-panel {
  transform: scale(1) translateY(0);
}

.share-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}

.share-close:hover {
  color: rgba(255,255,255,0.9);
}

.share-close:focus-visible {
  outline: 2px solid var(--color-accent, #C9956A);
  outline-offset: 2px;
}

/* Floating stars inside modal */
.share-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.share-star {
  position: absolute;
  color: rgba(201,169,138,0.3);
  animation: shareStarFloat var(--sd, 6s) ease-in-out infinite;
  font-size: var(--ss, 0.6rem);
}

@keyframes shareStarFloat {
  0%, 100% { opacity: 0.15; transform: translateY(0) rotate(0deg); }
  50% { opacity: 0.4; transform: translateY(-8px) rotate(30deg); }
}

.share-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.8rem;
  font-weight: 300;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.share-subtitle {
  font-family: var(--font-body, sans-serif);
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.share-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(201,169,138,0.3);
  transform: translateY(-2px);
}

.share-item:active {
  transform: scale(0.95);
}

.share-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.share-icon svg {
  width: 20px;
  height: 20px;
}

.share-icon--copy      { background: rgba(201,169,138,0.6); }
.share-icon--text      { background: rgba(107,158,174,0.7); }
.share-icon--instagram  { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-icon--whatsapp   { background: #25D366; }
.share-icon--facebook   { background: #1877F2; }
.share-icon--email      { background: rgba(139,107,174,0.7); }

.share-label {
  font-family: var(--font-body, sans-serif);
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.share-copied {
  text-align: center;
  font-family: var(--font-body, sans-serif);
  font-size: 0.7rem;
  color: rgba(201,169,138,0.9);
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s, transform 0.3s;
}

.share-copied.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer share button ─────────────────────────────────────────────────── */
.footer-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-full, 50%);
  cursor: pointer;
  transition: color var(--duration-fast, 0.2s) var(--ease-out, ease-out);
  padding: 0;
}

.footer-share-btn:hover {
  color: var(--color-accent, #C9956A);
}

.footer-share-btn:focus-visible {
  outline: 2px solid var(--color-accent, #C9956A);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .share-star {
    animation: none;
  }
  .share-modal,
  .share-panel,
  .share-copied {
    transition: none;
  }
}
