/* HighFelt share modal — minimal, white, tiktoksans */

.hf-share {
  --hf-share-font: "tiktoksans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hf-share-ink: #120b14;
  --hf-share-muted: #6b6570;
  --hf-share-border: #ededed;
  --hf-share-radius: 16px;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--hf-share-font);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.hf-share.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.hf-share__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 11, 20, 0.36);
  cursor: pointer;
}

.hf-share__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 22px 22px 18px;
  background: #fff;
  color: var(--hf-share-ink);
  border-radius: var(--hf-share-radius);
  box-shadow: 0 16px 48px rgba(18, 11, 20, 0.12);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}

.hf-share.is-open .hf-share__dialog {
  transform: translateY(0) scale(1);
}

.hf-share__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hf-share__title {
  margin: 0;
  font-family: var(--hf-share-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--hf-share-ink);
}

.hf-share__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px -6px -6px 0;
  padding: 0;
  color: var(--hf-share-ink);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hf-share__close:hover,
.hf-share__close:focus-visible {
  background: #f5f5f5;
  outline: none;
}

.hf-share__close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hf-share__actions {
  display: grid;
  gap: 8px;
}

.hf-share__action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-family: var(--hf-share-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--hf-share-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--hf-share-border);
  border-radius: 12px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hf-share__action:hover,
.hf-share__action:focus-visible {
  background: #fafafa;
  border-color: #dcdcdc;
  outline: none;
}

.hf-share__action-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--hf-share-ink);
}

.hf-share__action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hf-share__action-label {
  flex: 1;
  text-align: left;
}

.hf-share__action.is-copied .hf-share__action-label {
  color: #0a7a4a;
}

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

/* Keep existing Ease share button readable with Highfelt type */
.post-template .gh-button-share {
  font-family: var(--hf-share-font, "tiktoksans", sans-serif);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
}

@media (max-width: 480px) {
  .hf-share {
    align-items: flex-end;
    padding: 0;
  }

  .hf-share__dialog {
    width: 100%;
    border-radius: var(--hf-share-radius) var(--hf-share-radius) 0 0;
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .hf-share.is-open .hf-share__dialog {
    transform: translateY(0);
  }

  .hf-share:not(.is-open) .hf-share__dialog {
    transform: translateY(12px);
  }
}
