/* Troy landing: the "Available on iMessage" note that sits with every Text Troy button.
   Markup (index.html): .badge-imessage > .badge-line ("Available on", the Messages icon, the word "iMessage")
   and .badge-soon (the quieter second line with two or three tiny one-color icons).
   A quiet availability note, not a button: no background, no pill, no border. */

.badge-imessage {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  max-width: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
/* Next to a button in a row (the hero's button and QR code), it takes its own line under them. */
.hero-cta { flex-wrap: wrap; }
.hero-cta > .badge-imessage { flex: 0 0 100%; margin-top: 0; }

.badge-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.badge-line :is(svg, img) {
  flex: none;
  width: 21px;
  height: 21px;
  border-radius: 5px;
}
/* The word "iMessage" is set the way Apple sets it: the system font, medium weight. */
.badge-line :is(b, strong, .badge-name, .badge-word, span:last-child) {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.badge-line :is(svg, img) + * { margin-left: -1px; }

.badge-soon {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--stone);
  opacity: 0.8;
}
.badge-soon :is(svg, img) {
  flex: none;
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* On the painting. The hero's text is ink on a paper haze (page.css), so the note is ink there with the same haze.
   The night footer's text is white on a dark patch, so the note is white there. */
#hero .badge-imessage { text-shadow: 0 0 10px rgba(var(--paper-rgb), 0.9), 0 0 2px rgba(var(--paper-rgb), 0.7); }
#hero .badge-soon { color: var(--ink); opacity: 0.66; }
#footer .badge-imessage {
  color: var(--white);
  text-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.55), 0 0 14px rgba(var(--ink-rgb), 0.6);
}
#footer .badge-soon { color: var(--paper); opacity: 0.72; }

@media (max-width: 767px) {
  .badge-imessage { margin-top: 12px; }
  .badge-line { font-size: 13px; }
  .badge-line :is(svg, img) { width: 20px; height: 20px; }
  .badge-soon { font-size: 12px; max-width: 30ch; }
}

/* On Apple devices the second line is noise: they can text Troy right now. */
.is-apple .badge-soon { display: none; }

/* Not on an Apple device: the button becomes a status, not an action. */
a[data-sms].is-soon { background: transparent; color: inherit; border: 1px solid currentColor; opacity: 0.85; cursor: default; box-shadow: none; pointer-events: none; }
.not-apple .badge-soon { opacity: 1; }

/* On the night footer the "Android soon" button would be ink on a dark sky: it takes the footer's white instead. */
#footer a[data-sms].is-soon { color: var(--white); opacity: 0.9; }
/* Phones: the quieter second line stays one line, with its icons beside the words, not stranded above them. */
@media (max-width: 599px) {
  .badge-soon { flex-wrap: nowrap; white-space: nowrap; font-size: 12px; }
}

/* On laptops that can't text Troy themselves, the QR and its caption share the QR's white tile: the iPhone way in. */
.qr-card { display: inline-flex; align-items: center; }
.qr-cap { display: none; }
@media (min-width: 768px) {
  .not-apple .qr-card {
    gap: 10px;
    padding: 0 14px 0 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .not-apple .qr-card #qr { border: 0; }
  .not-apple .qr-cap {
    display: block;
    font-size: 12.5px;
    line-height: 1.35;
    text-align: left;
    font-weight: 500;
    color: var(--ink);
  }
  .not-apple .qr-card:has(#qr[hidden]) { display: none; }
}

/* After the hackathon: the second line says Troy ran on iMessage for the event and is switched off now. Shown to everyone. */
.badge-note {
  max-width: 42ch;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--stone);
  opacity: 0.85;
}
#hero .badge-note { color: var(--ink); opacity: 0.85; }
#footer .badge-note { color: var(--paper); opacity: 0.8; }
@media (max-width: 767px) { .badge-note { font-size: 12px; } }
