/* ═══════════════════════════════════════════════════════
   Gift QR — printable tag, shared by every tool that ends in
   a gift (Clip Flip, Poster Framer, …).
   Tokens reuse the host app's css/app.css :root; this file only
   adds what those don't already define, plus the .gq-* component.
   ═══════════════════════════════════════════════════════ */

:root {
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Modifier for hosts that tack the tag onto the end of an existing
   panel rather than giving it a panel of its own. */
.gift-tag--divided { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.gift-tag-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.gift-tag-head h3 { font-family: var(--font-head); font-size: .88rem; font-weight: 700; letter-spacing: -.01em; }

.gq-toggle {
  display: flex; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: 100px; padding: 3px;
}
.gq-toggle-btn {
  flex: 1; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: .74rem; font-weight: 500;
  color: var(--text-sub); padding: .45rem .55rem; border-radius: 100px;
  white-space: nowrap; transition: background .2s, color .2s;
}
.gq-toggle-btn span { opacity: .7; font-size: .92em; }
.gq-toggle-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--bg); font-weight: 600;
}
.gq-toggle-btn.active span { opacity: .85; }

.gq-field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.gq-field > span:first-child { font-size: .74rem; color: var(--text-sub); }
.gq-input-wrap {
  display: flex; align-items: center;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .1rem .7rem;
  transition: border-color .2s;
}
.gq-input-wrap:focus-within { border-color: var(--border-gold); }
/* The fixed half of the address. Reads as one continuous URL with the input
   next to it, but is dimmed and unselectable so it never looks editable. */
.gq-prefix {
  flex: none; color: var(--text-muted);
  font-family: var(--font-mono); font-size: .86rem;
  white-space: nowrap; user-select: none; cursor: text;
}
.gq-input-wrap input {
  flex: 1; min-width: 0;
  border: none; background: transparent; color: var(--text);
  font-family: var(--font-mono); font-size: .86rem; padding: .55rem 0;
  outline: none;
}
.gq-input-wrap input::placeholder { color: var(--text-muted); opacity: .6; }
.gq-slug-note { font-size: .68rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Narrow phones: the prefix and the name have to share one line. */
@media (max-width: 400px) {
  .gq-prefix, .gq-input-wrap input { font-size: .78rem; }
  .gq-input-wrap { padding-inline: .55rem; }
}

.gq-card {
  width: 100%; max-width: 260px; margin: 0 auto;
  background: #FBF8F1;
  border-radius: 16px;
  padding: 5px;
  background-image:
    linear-gradient(#FBF8F1, #FBF8F1),
    linear-gradient(135deg, var(--gold), var(--purple-vivid));
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.2);
}
.gq-card-inner {
  border: 1.5px dashed rgba(74,29,150,.28);
  border-radius: 12px;
  padding: 1.35rem 1.1rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  text-align: center;
}
.gq-card-brand { display: flex; flex-direction: column; gap: .12rem; }
.gq-card-logo { font-family: var(--font-head); font-weight: 800; font-size: .92rem; letter-spacing: -.02em; color: #1E1433; }
.gq-card-logo em { font-style: normal; color: var(--gold); }
.gq-card-tagline { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: #8A7DA8; }

.gq-card-qr {
  width: 140px; height: 140px; padding: 8px;
  background: #fff; border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(30,20,51,.08);
  display: flex; align-items: center; justify-content: center;
}
.gq-card-qr svg { width: 100%; height: 100%; display: block; }

.gq-card-caption { font-size: .76rem; font-weight: 600; color: #1E1433; }
.gq-card-url { font-family: var(--font-mono); font-size: .68rem; color: #6D28D9; word-break: break-all; }

.gq-card-tear {
  display: flex; align-items: center; gap: .35rem;
  color: #A99CC7; font-size: .58rem; letter-spacing: .04em;
  text-transform: uppercase; margin-top: .15rem;
}

.gq-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.gq-actions .btn { flex: 1; margin-top: 0; font-size: .74rem; padding: .65rem .5rem; }
.gq-lock-pill {
  font-family: var(--font-head); font-size: .58rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  background: rgba(245,158,11,.14); color: var(--gold-light);
  border: 1px solid var(--border-gold); border-radius: 100px;
  padding: .12rem .4rem; margin-left: .35rem;
}

.gq-plus-note { margin-top: .6rem; font-size: .68rem; color: var(--text-muted); line-height: 1.5; text-align: center; }
.gq-plus-note strong { color: var(--gold-light); font-weight: 600; }

/* ─── PRINT: only the card, none of the app chrome ─────
   Written against any host: everything in <body> goes except the
   print area, so a tool adding new top-level chrome can't leak a
   stray panel onto the printed tag. */
.gift-print-area { display: none; }
@media print {
  body.printing-gift-tag {
    background: #fff !important;
  }
  body.printing-gift-tag::before,
  body.printing-gift-tag > *:not(.gift-print-area) {
    display: none !important;
  }
  body.printing-gift-tag .gift-print-area {
    display: block !important;
    padding: 2rem;
  }
}
