/* ============================================================
   Zallixor — blue-request.css
   The blue badge request sheet (js/blue-request.js).

   Uses the app's own tokens with a fallback after each one, so the
   sheet renders correctly in the main app and in both chat builds
   even though their token sets differ. Load after style.css/ui.css.
   ============================================================ */

.br-overlay {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, .55);
}
@media (min-width: 700px) {
  .br-overlay { place-items: center; }
}

.br-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  background: var(--card, #14161d);
  color: var(--text, #eef1f6);
  box-shadow: 0 -10px 50px rgba(0, 0, 0, .5);
}
@media (min-width: 700px) {
  .br-sheet { border-radius: 20px; }
}

.br-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .1));
}
.br-head h2 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.br-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  background: rgba(255, 255, 255, .07);
  color: var(--text, #eef1f6);
}
.br-close svg { width: 16px; height: 16px; }

.br-body {
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  -webkit-overflow-scrolling: touch;
}

.br-intro {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #9aa3b2);
}

/* ── Numbered steps ── */

.br-step {
  display: flex;
  gap: 12px;
  margin: 20px 0 10px;
}
.br-step-n {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1a7fe0;               /* the blue tier's own colour */
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.br-step h3 {
  margin: 2px 0 4px;
  font-size: 14.5px;
  font-weight: 650;
}
.br-step p { margin: 0; line-height: 1.55; }

/* ── The code ── */

.br-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(26, 127, 224, .55);
  background: rgba(26, 127, 224, .08);
}
.br-code {
  flex: 1 1 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  /* Long-press to select on a phone, so it can be copied by hand if
     the clipboard API is unavailable. */
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}
.br-copy {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: #1a7fe0;
  color: #fff;
}

/* ── Fields ── */

.br-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.br-field .field-input {
  width: 100%;
  box-sizing: border-box;
}
.br-field textarea.field-input {
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.br-proof {
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  background: rgba(255, 255, 255, .025);
}
.br-proof-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #9aa3b2);
  margin-bottom: 8px;
}

/* ── Errors ── */

.br-errors:empty { display: none; }
.br-errors {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border-left: 3px solid #e5484d;
  background: rgba(229, 72, 77, .1);
  font-size: 13px;
  line-height: 1.55;
}
.br-err-title { font-weight: 650; margin-bottom: 4px; }
.br-errors ul { margin: 4px 0 0; padding-left: 18px; }

/* ── Submit ── */

.br-submit {
  width: 100%;
  margin-top: 8px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  padding: 13px;
  border-radius: 12px;
  background: #1a7fe0;
  color: #fff;
}
.br-submit:disabled { opacity: .6; cursor: default; }

.br-foot {
  margin: 14px 0 0;
  line-height: 1.55;
}

/* ── Status screens ── */

.br-status {
  text-align: center;
  padding: 26px 10px;
}
.br-status-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(26, 127, 224, .14);
  color: #1a7fe0;
}
.br-status-icon svg { width: 24px; height: 24px; }
.br-status h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.br-status p { margin: 0 0 14px; line-height: 1.6; }
.br-status .br-code-box { text-align: left; }
.br-status .br-submit { max-width: 260px; margin: 0 auto; }
