/* BTCgold OTC application form. Uses the tokens from ../styles.css. Fonts are served from this site (no Google Fonts here). */

@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("fonts/InterTight-400.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("fonts/InterTight-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800 900; font-display: swap; src: url("fonts/InterTight-800.woff2") format("woff2"); }

[hidden] { display: none !important; }
.otc { padding: 40px 0 72px; max-width: 860px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; letter-spacing: 0; }

.otc-intro h1 { margin-top: 18px; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.otc-lead { margin-top: 14px; color: var(--ink-2); font-size: 18px; max-width: 720px; }
.otc-lead a, .otc-alert a, .otc-footer a, .otc-hint a { color: var(--gold); }

.otc-steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.otc-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.otc-steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-fill); color: var(--gold-ink); font-weight: 800; font-size: 14px; }
.otc-steps b { color: var(--ink); font-weight: 700; }

.otc-note { margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid rgba(242, 195, 91, .25); background: rgba(242, 195, 91, .06); color: var(--ink-2); font-size: 15px; }
.otc-note .ico { color: var(--gold); margin-top: 2px; }
.otc-note b { color: var(--ink); }

.otc-alert { margin: 24px 0 0; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid #7a2e22; background: rgba(214, 69, 48, .12); color: #ffd9d1; font-size: 15px; }
.otc-alert:focus { outline: 2px solid #e0705e; outline-offset: 2px; }
.otc-alert ul { margin: 6px 0 0; padding-left: 20px; }
.otc-alert a { color: #ffd9d1; }

form#otcForm { margin-top: 28px; display: grid; gap: 18px; }

.otc-card { margin: 0; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.otc-card legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.otc-card legend + * { clear: both; }
.otc-card .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--gold); font-size: 15px; font-weight: 800; }

.otc-hint { margin-top: 8px; color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-top: 16px; }
.span-2 { grid-column: 1 / -1; }
.grid-note { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .opt { color: var(--ink-3); font-weight: 500; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--surface); color: var(--ink); }
.field input::placeholder { color: #6f6553; }
.field input:focus, .field select:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(242, 195, 91, .18); }
.field input[readonly] { color: var(--ink-3); }
.field input[type="date"] { color-scheme: dark; }
.field input.mono { font-size: 16px; }
.field [aria-invalid="true"] { border-color: #c4523f; }
.field-error { margin-top: 2px; color: #ff9f8c; font-size: 14px; }

.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.input-prefix input { padding-left: 30px; }

.wallet-ok, .amount-preview { margin-top: 2px; color: #9fdc9a; font-size: 14px; overflow-wrap: anywhere; }
.wallet-ok:empty, .amount-preview:empty { display: none; }

.privacy { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); }
.privacy h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.privacy p { margin-top: 6px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

.check-inline { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.check-inline input { accent-color: var(--gold); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }

.choice { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.pill:has(input:checked) { border-color: var(--gold-2); color: var(--ink); background: rgba(242, 195, 91, .08); }
.pill input, .decl input { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; flex: none; }

.decl { display: grid; gap: 10px; margin-top: 14px; }
.decl label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.decl label:has(input:checked) { border-color: rgba(242, 195, 91, .35); color: var(--ink); }
.decl label.invalid { border-color: #c4523f; }
.decl input { margin-top: 3px; }
.decl b { color: var(--ink); }

.sig-wrap { position: relative; margin-top: 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-2); background: var(--bg-2); overflow: hidden; }
.sig-wrap.invalid { border-color: #c4523f; border-style: solid; }
.sig-wrap:focus { outline: 2px solid var(--gold); outline-offset: 3px; }
.sig-wrap.off { opacity: .45; }
.sig-wrap.off .sig-pad { cursor: not-allowed; }
.sig-pad { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sig-line { position: absolute; left: 24px; right: 24px; bottom: 40px; height: 1px; background: var(--line-2); pointer-events: none; }
.sig-clear { position: absolute; top: 10px; right: 10px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.sig-clear:hover { color: var(--ink); border-color: var(--gold-3); }

.otc-submit { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.otc-submit .btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.otc-done { margin-top: 28px; text-align: left; }
.otc-done:focus { outline: none; }
.done-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-fill); color: var(--gold-ink); }
.done-icon .ico { width: 28px; height: 28px; stroke-width: 2.4; }
.otc-done h2 { margin-top: 16px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.otc-done > p { margin-top: 10px; color: var(--ink-2); overflow-wrap: anywhere; }
.done-steps { margin: 16px 0 0; padding-left: 22px; color: var(--ink-2); display: grid; gap: 6px; }
.done-steps b { color: var(--ink); overflow-wrap: anywhere; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.otc-footer { padding: 32px 0 40px; }
.otc-footer .mono { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .otc { padding-top: 28px; }
  .otc-steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .otc-card { padding: 18px 16px; border-radius: 18px; }
  .otc-card legend { font-size: 18px; }
  .done-actions .btn { width: 100%; }
  .otc-submit .btn { width: 100%; }
}

/* Sending step */
.send-box { margin-top: 18px; padding: 18px; border-radius: var(--radius-sm); border: 1px solid rgba(242, 195, 91, .25); background: rgba(242, 195, 91, .05); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ts-widget { min-height: 65px; }
.send-status { font-size: 15px; color: #9fdc9a; }
.send-status:empty { display: none; }
.send-status.error { color: #ff9f8c; }
.otc-submit .btn[disabled], #sendBtn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.manual { margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: 15px; }
.manual summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.manual p { margin-top: 10px; }
.manual .btn { margin-top: 12px; }
@media (max-width: 700px) { #sendBtn { width: 100%; } }

/* Date of birth: day / month / year lists */
.dob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.15fr); gap: 8px; }
.dob select { padding-left: 10px; padding-right: 26px; font-size: 15px; background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; }
