.ha-share-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.site-nav .ha-share-trigger,
.topnav .ha-share-trigger {
  padding: 0;
  color: var(--muted, #6f6a61);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.topnav .ha-share-trigger {
  font-size: .72rem;
}

.site-nav .ha-share-trigger:hover,
.site-nav .ha-share-trigger:focus-visible,
.topnav .ha-share-trigger:hover,
.topnav .ha-share-trigger:focus-visible {
  color: var(--red, #c72d38);
}

.ha-share-trigger:focus-visible,
.ha-share-close:focus-visible,
.ha-share-option:focus-visible {
  outline: 3px solid rgba(194, 75, 47, .28);
  outline-offset: 3px;
}

.ha-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 40, 58, .58);
  backdrop-filter: blur(7px);
}

.ha-share-overlay[hidden] {
  display: none;
}

.ha-share-dialog {
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 44px));
  overflow-y: auto;
  padding: clamp(22px, 5vw, 32px);
  border: 1px solid #d8cab7;
  border-radius: 24px;
  background: #fffaf2;
  box-shadow: 0 28px 90px rgba(23, 40, 58, .32);
  color: #17283a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ha-share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ha-share-head p {
  margin: 0 0 7px;
  color: #c24b2f;
  font: 800 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ha-share-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.ha-share-close {
  appearance: none;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #d8cab7;
  border-radius: 50%;
  background: #fffdf8;
  color: #435367;
  font: 500 1.35rem/1 sans-serif;
  cursor: pointer;
}

.ha-share-page-title {
  margin: 19px 0 0;
  color: #6f6a61;
  font-size: .86rem;
  line-height: 1.55;
}

.ha-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.ha-share-option {
  appearance: none;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid #d8cab7;
  border-radius: 13px;
  background: #fffdf8;
  color: #17283a;
  font: 800 .82rem/1.25 Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ha-share-option:hover {
  border-color: #c24b2f;
  background: #fff4e7;
  transform: translateY(-1px);
}

.ha-share-badge {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #17283a;
  color: #fff;
  font-size: .75rem;
  letter-spacing: -.02em;
}

.ha-share-option[data-service="whatsapp"] .ha-share-badge { background: #197447; }
.ha-share-option[data-service="facebook"] .ha-share-badge { background: #315eaa; }
.ha-share-option[data-service="linkedin"] .ha-share-badge { background: #176a99; }
.ha-share-option[data-service="x"] .ha-share-badge { background: #17202a; }
.ha-share-option[data-service="copy"] .ha-share-badge { background: #c24b2f; }

.ha-share-option--wide {
  grid-column: 1 / -1;
}

.ha-share-note,
.ha-share-status {
  margin: 16px 0 0;
  color: #6f6a61;
  font-size: .75rem;
  line-height: 1.55;
}

.ha-share-status {
  min-height: 1.2em;
  margin-top: 9px;
  color: #247453;
  font-weight: 800;
}

body.ha-share-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .topnav .ha-share-trigger {
    font-size: .64rem;
  }
}

@media (max-width: 620px) {
  .site-nav .ha-share-trigger {
    font-size: .68rem;
  }

  .ha-share-overlay {
    align-items: end;
    padding: 0;
  }

  .ha-share-dialog {
    width: 100%;
    max-height: min(82vh, 720px);
    padding: 24px 18px max(22px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 410px) {
  .ha-share-grid {
    grid-template-columns: 1fr;
  }

  .ha-share-option--wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-share-option {
    transition: none;
  }
}
