/*
  DRRP PR191: isolated universal share/contact UI.
  Scope:
  - Copy-link-only footer share presentation.
  - Universal right-side WhatsApp/call contact rail.
  - No global background, mandala, body, hero, header, or layout rewrites.
*/

:root {
  --drrp-candle-parchment: #f8f1e2;
  --drrp-candle-burgundy: #8b2138;
  --drrp-candle-gold: #bf8c34;
}

/* Footer share: keep the user's decision focused on one Copy Link action. */
.social-share,
.drrp-share-card {
  position: relative;
  isolation: isolate;
}

.social-share > div,
.drrp-share-grid {
  max-width: 360px !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

.social-share a,
.social-share button,
.drrp-share-grid a,
.drrp-share-grid button {
  margin-inline: auto;
}

.social-share a:not(.drrp-instagram-share):not([data-drrp-copy-home-link]),
.social-share button:not([data-drrp-copy-home-link]),
.drrp-share-grid a:not(.drrp-instagram-share):not([data-drrp-copy-home-link]),
.drrp-share-grid button:not([data-drrp-copy-home-link]) {
  display: none !important;
}

.social-share .drrp-instagram-share,
.social-share [data-drrp-copy-home-link],
.drrp-share-card .drrp-copy-home-link,
.drrp-share-grid .drrp-instagram-share,
.drrp-share-grid [data-drrp-copy-home-link] {
  width: min(100%, 320px) !important;
  min-height: 56px !important;
  margin: 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(191, 140, 52, .58) !important;
  background:
    linear-gradient(135deg, rgba(139, 33, 56, .98), rgba(191, 140, 52, .98)) !important;
  color: #fff !important;
  box-shadow:
    0 18px 38px rgba(88, 49, 26, .20),
    inset 0 1px 0 rgba(255, 255, 255, .28) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  text-decoration: none !important;
}

.social-share .drrp-instagram-share::before,
.social-share [data-drrp-copy-home-link]::before,
.drrp-share-card .drrp-copy-home-link::before,
.drrp-share-grid .drrp-instagram-share::before,
.drrp-share-grid [data-drrp-copy-home-link]::before {
  content: "";
  width: 1rem;
  height: 1rem;
  margin-right: .55rem;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.59 13.41a1.996 1.996 0 0 0 2.82 0l3.59-3.59a2 2 0 0 0-2.83-2.83l-1.1 1.1a1 1 0 1 1-1.41-1.42l1.1-1.1a4 4 0 0 1 5.66 5.66l-3.59 3.59a4 4 0 0 1-5.66 0 1 1 0 1 1 1.42-1.41Zm2.82-2.82a1.996 1.996 0 0 0-2.82 0L7 14.18a2 2 0 1 0 2.83 2.83l1.1-1.1a1 1 0 1 1 1.41 1.42l-1.1 1.1a4 4 0 1 1-5.66-5.66l3.59-3.59a4 4 0 0 1 5.66 0 1 1 0 1 1-1.42 1.41Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.59 13.41a1.996 1.996 0 0 0 2.82 0l3.59-3.59a2 2 0 0 0-2.83-2.83l-1.1 1.1a1 1 0 1 1-1.41-1.42l1.1-1.1a4 4 0 0 1 5.66 5.66l-3.59 3.59a4 4 0 0 1-5.66 0 1 1 0 1 1 1.42-1.41Zm2.82-2.82a1.996 1.996 0 0 0-2.82 0L7 14.18a2 2 0 1 0 2.83 2.83l1.1-1.1a1 1 0 1 1 1.41 1.42l-1.1 1.1a4 4 0 1 1-5.66-5.66l3.59-3.59a4 4 0 0 1 5.66 0 1 1 0 1 1-1.42 1.41Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.drrp-share-status {
  margin: .8rem auto 0 !important;
  max-width: 360px;
  color: var(--drrp-candle-burgundy) !important;
  font-size: .92rem !important;
  text-align: center !important;
  font-weight: 700 !important;
}

/* Universal right-side icon-only contact rail. */
.drrp-contact-rail {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2147482000;
  display: grid;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(248, 241, 226, .94), rgba(255, 252, 244, .88));
  border: 1px solid rgba(191, 140, 52, .38);
  box-shadow:
    0 18px 42px rgba(78, 37, 24, .16),
    inset 0 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.drrp-contact-rail__link {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  outline: none;
  border: 1px solid rgba(255, 255, 255, .35);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.26), transparent 30%),
    linear-gradient(135deg, var(--drrp-candle-burgundy), var(--drrp-candle-gold));
  box-shadow:
    0 12px 24px rgba(88, 49, 26, .18),
    inset 0 1px 0 rgba(255, 255, 255, .26);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.drrp-contact-rail__link:hover,
.drrp-contact-rail__link:focus-visible {
  transform: translateX(-2px) scale(1.045);
  box-shadow:
    0 16px 30px rgba(88, 49, 26, .24),
    inset 0 1px 0 rgba(255, 255, 255, .32);
  filter: saturate(1.08);
}

.drrp-contact-rail__icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.drrp-contact-rail__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .drrp-contact-rail {
    right: max(10px, env(safe-area-inset-right));
    top: auto;
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 72px));
    transform: none;
    gap: 8px;
    padding: 7px;
  }

  .drrp-contact-rail__link {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 420px) {
  .drrp-contact-rail {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 68px));
  }

  .drrp-contact-rail__link {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drrp-contact-rail__link {
    transition: none;
  }

  .drrp-contact-rail__link:hover,
  .drrp-contact-rail__link:focus-visible {
    transform: none;
  }
}

@media print {
  .drrp-contact-rail {
    display: none !important;
  }
}
