/* Gym Sharing Pack local layout only.
   Master /styles.css owns the visual language. */

.gsp-head {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.gsp-hero {
  padding: 18px 0 34px;
}



.gsp-head h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.gsp-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.gsp-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

.status {
  min-height: 1.5rem;
}

.gsp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.gsp-tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.share-tool-option {
  display: grid;
  gap: 22px;
  cursor: pointer;
}

.share-tool-option h3 {
  margin: 18px 0 14px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.share-tool-option p {
  margin: 0;
  max-width: 30ch;
  line-height: 1.6;
  color: var(--muted);
}

.share-tool-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: var(--silver);
  font-weight: 900;
}

.tool-checkbox {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--silver);
}

.share-tool-select-button {
  width: 100%;
}

.gsp-target-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.gsp-target-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.gsp-target-top h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}



.gsp-qr-image {
  display: none !important;
}

#selectedTargetDescription {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.6;
}

.panel > h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.panel > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.textarea {
  width: 100%;
  min-height: 210px;
  margin: 0 0 18px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  resize: vertical;
}

.full-width {
  width: 100%;
}

.gsp-print-surface {
  display: grid;
  gap: 16px;
  align-content: start;
}

.gsp-print-surface h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.gsp-print-surface p {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.6;
}

.gsp-poster-qr {
  display: block;
  width: 160px;
  max-width: 100%;
  aspect-ratio: 1;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.gsp-poster-footer {
  font-weight: 900;
  color: var(--text);
}

.panel .btn + .btn,
.panel .btn + a.btn,
.panel a.btn + .btn,
.panel a.btn + a.btn {
  margin-top: 12px;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.share-modal.open {
  display: flex;
}

.share-modal-panel {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.share-modal-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-copy,
.modal-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal-note {
  margin-top: 14px;
  font-size: 0.92rem;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

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

.share-link-btn,
.share-action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.share-link-btn.primary,
.share-action-btn.primary {
  background: linear-gradient(180deg, var(--silver) 0%, var(--silver-dark) 100%);
  color: #101317;
}

.touch-only {
  display: none;
}

.desktop-only {
  display: inline-flex;
}

@media (hover: none), (pointer: coarse) {
  .touch-only {
    display: inline-flex;
  }

  .desktop-only {
    display: none;
  }
}

@media (max-width: 980px) {
  .gsp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .gsp-hero {
    padding: 10px 0 28px;
  }

  .gsp-head h1 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .gsp-head h2,
  .panel > h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .gsp-poster-qr {
    width: 146px;
  }

  .textarea {
    min-height: 180px;
  }

  .share-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: white !important;
  }

  body * {
    visibility: hidden !important;
  }

  #printPoster,
  #printPoster * {
    visibility: visible !important;
  }

  #printPoster {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 170mm !important;
    height: 250mm !important;
    max-width: 170mm !important;
    max-height: 250mm !important;
    margin: 0 !important;
    padding: 14mm !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
    color: black !important;
    border: 4px solid black !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  #printPoster h2,
  #printPoster p,
  #printPoster .gsp-poster-footer {
    color: black !important;
    text-align: center !important;
  }

  #printPoster h2 {
    font-size: 34pt !important;
    margin: 0 0 8mm !important;
    line-height: 1 !important;
  }

  #printPoster p {
    font-size: 14pt !important;
    margin: 0 0 10mm !important;
    max-width: 120mm !important;
  }

  #printPoster .gsp-poster-qr {
    width: 90mm !important;
    height: 90mm !important;
    margin: 0 0 10mm !important;
  }

  .site-header,
  .btn,
  .status,
  .share-modal {
    display: none !important;
  }
}
/* v53: chips aligned to Gym Referral Admin badge style */
.gsp-kicker,
.status-pill,
.share-tool-option .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  min-height: 32px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: none;
}

.gsp-kicker::before,
.status-pill::before,
.share-tool-option .tag.live::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #8fe39b;
  box-shadow: 0 0 0 4px rgba(143, 227, 155, 0.12);
}

.status-pill {
  color: #9ff0aa;
  border-color: rgba(143, 227, 155, 0.22);
  background: rgba(143, 227, 155, 0.08);
}

.share-tool-option .tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.share-tool-option .tag.live {
  color: #9ff0aa;
  border-color: rgba(143, 227, 155, 0.22);
  background: rgba(143, 227, 155, 0.08);
}