/* Custom Rank band + modal.
   Deliberately its own file: /assets/style.css is pinned in Cloudflare's
   edge cache for a day and query strings are excluded from the asset cache
   key, so ?v=N cannot bust it. A new path has no cache entry, so these
   rules go live immediately. The same rules also live in style.css and
   take over naturally once that entry expires or is purged. */

/* ---------- custom rank band + modal ---------- */

/* Slimmer than the Discord band above it, with real air between the two so
   they read as two separate offers rather than one stack. */
.custom-band {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.2rem;
}

.custom-band .tile {
  width: 38px;
  height: 38px;
  flex: none;
}

.custom-band .tile svg { width: 19px; height: 19px; }
.custom-band .band-text { flex: 1; min-width: 0; }
.custom-band h3 { font-size: 1.02rem; }
.custom-band .band-text p { font-size: 0.86rem; margin-top: 0.15rem; }
.custom-band .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }

@media (max-width: 620px) {
  .custom-band { flex-wrap: wrap; }
  .custom-band .band-text { flex-basis: calc(100% - 3.4rem); }
  .custom-band .btn { width: 100%; justify-content: center; }
}

.custom-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.custom-price strong { color: var(--text); font-size: 1.2rem; }

/* The one line the buyer must not miss, so it gets the blossom accent rather
   than muted plum. Not a panel: the card is already a panel. */
.custom-note {
  color: var(--c2) !important;
  font-size: 0.84rem !important;
  line-height: 1.55;
}

#custom-discord {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  /* Discord's own blurple. The field says what it wants before anyone reads the
     placeholder, and green or red take the border over once there is something
     to judge - blurple is simply the "nothing to say yet" state. */
  border: 1px solid #5765f2;
  border-radius: 10px;
  /* the wide right side is the seat for the mark sitting inside the field */
  padding: 0.65rem 2.7rem 0.65rem 0.9rem;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color var(--hover);
}

#custom-discord:focus { border-color: #5765f2; }
#custom-discord.name-good, #custom-discord.name-good:focus { border-color: rgba(74, 222, 128, 0.55); }
#custom-discord.name-bad,  #custom-discord.name-bad:focus  { border-color: rgba(255, 107, 107, 0.6); }

/* The mark rides inside the field, right-aligned, in the same blurple as the
   border - no opacity on it, which would composite it to some other colour and
   break exactly the match it is here to make. It needs none: on this near-black
   field #5765f2 lands at 4.20:1 and the browser's own placeholder grey at
   4.21:1, so the mark is already as faint as the words beside it, against 17:1
   for what gets typed. A label, not a control, so it takes no clicks and the
   whole field stays one target. */
.discord-field { position: relative; display: flex; flex: 1; min-width: 0; }

.discord-field-mark {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5765f2;
  pointer-events: none;
}

/* the cart row for a custom rank: email shown, click to change it */
.co-email-line {
  margin-top: 0.3rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.co-email-edit {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.4rem;
  color: var(--c2);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--hover);
}

.co-email-edit:hover { color: var(--text); }
