/* The /send, /r and /s pages (api/templates/api/), on top of site.css and its colours. */

.send-hero { padding: clamp(124px, 15vh, 160px) 0 96px; border-radius: 0 0 48px 48px; background: linear-gradient(180deg, #FFDDBE 0%, #FFF1E7 60%, var(--paper) 100%); }
.send-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.send-copy h1 { margin-top: 14px; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.02; font-weight: 800; letter-spacing: -.045em; }
.send-lede { margin-top: 16px; max-width: 560px; font-size: 1.1875rem; color: var(--ink-soft); }

.send-steps { margin-top: 32px; display: grid; gap: 14px; }
.send-steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.0625rem; }
.send-steps b { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .9375rem; }
.send-steps span { padding-top: 3px; }

.send-facts { margin-top: 32px; display: grid; gap: 12px; max-width: 560px; padding: 20px 22px; border-radius: 22px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--line); }
.send-facts li { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; line-height: 1.5; color: var(--ink-soft); }
.send-facts .icon { margin-top: 2px; color: var(--green-deep); }

.send-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); text-align: center; }
.send-card [hidden] { display: none !important; }
.send-qr { width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; border-radius: 16px; background: var(--paper-2); transition: opacity .3s, filter .3s; }
.send-qr svg { width: 100%; height: 100%; border-radius: 16px; }
.send-qr.is-used { opacity: .12; filter: blur(3px); }
.send-code-label { margin-top: 20px; font-size: .875rem; font-weight: 600; color: var(--ink-mute); }
.send-code { margin-top: 4px; font: 700 clamp(1.5rem, 3vw, 2rem)/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; user-select: all; }
.send-state { margin-top: 22px; padding-top: 22px; min-height: 128px; border-top: 1px solid var(--line); }
.send-status { font-size: 1.125rem; font-weight: 700; overflow-wrap: anywhere; }
.send-detail { margin-top: 4px; font-size: .9375rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.send-card.is-error .send-status { color: var(--danger); }
.send-card.is-done .send-status { color: var(--green-deep); }
.send-bar { max-width: 320px; height: 8px; margin: 16px auto 0; overflow: hidden; border-radius: 99px; background: var(--paper-3); }
.send-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--saffron); transition: width .2s linear; }
.send-bar.is-busy i { width: 35%; animation: send-busy 1.4s var(--ease) infinite; }
@keyframes send-busy { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.send-timer { margin-top: 10px; font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--ink-mute); }
.send-files { margin: 18px auto 0; max-width: 420px; display: grid; gap: 8px; text-align: left; }
.send-files li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--paper-2); }
.send-files li > span { flex: 1; min-width: 0; display: grid; }
.send-files b { font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-files small { font-size: .8125rem; color: var(--ink-mute); }
.send-files img { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.send-files li:not(.is-here) { opacity: .6; }
.send-files .btn:disabled { opacity: .5; cursor: default; }

.open-form { display: grid; gap: 12px; justify-items: center; padding-bottom: 6px; }
.open-form[hidden] { display: none; }
.open-form .send-code-label { margin-top: 0; }
.open-pin { width: min(100%, 260px); padding: 12px 16px; border: 0; border-radius: 16px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); text-align: center; font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; color: var(--ink); }
.open-pin:focus { outline: 3px solid var(--saffron); outline-offset: 2px; }
.page-send .send-card[data-open] .send-state { min-height: 96px; }

.send-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.send-actions:empty { display: none; }

.scan-cta { margin-top: 28px; }

/* /r: the code box comes right after the heading on a phone, and the facts after it. */
.send-grid.is-open { grid-template-areas: "copy card" "facts card"; row-gap: 0; }
.send-grid.is-open > .send-copy { grid-area: copy; align-self: end; }
.send-grid.is-open > .send-card { grid-area: card; }
.send-grid.is-open > .send-facts { grid-area: facts; align-self: start; }

@media (max-width: 900px) {
  .send-grid { grid-template-columns: 1fr; }
  .send-grid.is-open { grid-template-areas: "copy" "card" "facts"; row-gap: 28px; }
  .send-grid.is-open > .send-facts { margin-top: 0; }
  .send-hero { border-radius: 0 0 32px 32px; }
}
