/* Setup → Bot profile and its picture editor (profile.js). Built on the tokens
   both designs have; the new design's extra ones fall back to the old ones. */

.bp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.row.bp-pic { flex-wrap: wrap; }      /* the picture and its buttons on their own line below */
.bp-tools { flex: 1 0 100%; display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.bp-av { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; background: var(--raised);
         box-shadow: 0 0 0 1px var(--line-2, var(--line)); }
.bp-ban { width: 260px; max-width: 100%; aspect-ratio: 5 / 2; border-radius: 12px; overflow: hidden; flex: none; background: var(--raised);
          box-shadow: 0 0 0 1px var(--line-2, var(--line)); display: grid; place-items: center; color: var(--muted); font-size: 12.5px;
          text-align: center; padding: 0 10px; }
.bp-av img, .bp-ban img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-ban:has(img) { padding: 0; }
.bp-tag { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 7px; color: var(--muted); background: var(--raised); white-space: nowrap; }
.bp-tag.own { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.bp-note, .bp-warn { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.bp-warn { color: var(--yellow); }

/* the preview, in Discord's own colours */
.bp-pv { display: grid; gap: 12px; position: sticky; top: 20px; }
.bp-pv h4 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, var(--muted)); }
.bp-dc { background: #2b2d31; border-radius: 14px; padding: 10px; }
.bp-m { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; }
.bp-m-av { width: 32px; height: 32px; border-radius: 50%; flex: none; position: relative; background: #1e1f22; }
.bp-m-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.bp-m-av i { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 3px #2b2d31; }
.bp-m b { color: #f2f3f5; font-weight: 500; font-size: 15px; }
.bp-m small { display: block; color: #949ba4; font-size: 12px; line-height: 1.2; }
.bp-pv em { font-style: normal; font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; border-radius: 4px; padding: 1px 4px;
            margin-left: 5px; vertical-align: 2px; }
.bp-pop { background: #111214; border-radius: 12px; overflow: hidden; }
.bp-pop-ban { aspect-ratio: 5 / 2; background-size: cover; background-position: center; }
.bp-pop-body { padding: 0 16px 16px; }
.bp-pop-av { display: block; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin-top: -42px; position: relative;
             background: #111214; box-shadow: 0 0 0 6px #111214; }
.bp-pop-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-pop-name { color: #f2f3f5; font-size: 20px; font-weight: 700; margin-top: 10px; overflow-wrap: anywhere; }
.bp-pop-user { color: #b5bac1; font-size: 14px; }

/* the picture editor */
.ed-scrim { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 8, .7); }
.ed-box { width: min(900px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line-2, var(--line));
          border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); color: var(--text); }
.ed-head { padding: 18px 22px 0; display: grid; gap: 2px; }
.ed-head b { color: var(--head); font-size: 18px; }
.ed-head small { color: var(--muted); }
.ed-gif { margin: 12px 22px 0; padding: 10px 14px; border-radius: 10px; font-size: 13.5px;
          background: color-mix(in srgb, var(--yellow) 10%, transparent); border: 1px solid color-mix(in srgb, var(--yellow) 30%, transparent); }
.ed-box button.ed-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; box-shadow: none; }
.ed-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; padding: 18px 22px; }
.ed-box.banner .ed-main { grid-template-columns: 1fr; }
.ed-left { display: grid; gap: 12px; align-content: start; justify-items: center; min-width: 0; }
.ed-frame { padding: 14px; border-radius: 16px; max-width: 100%;
            background: repeating-conic-gradient(var(--deep) 0 25%, var(--raised) 0 50%) 0 0 / 16px 16px; }
.ed-stage { display: block; max-width: 100%; height: auto; cursor: grab; touch-action: none; box-shadow: 0 0 0 2px var(--line-2, var(--line)); }
.ed-stage:active { cursor: grabbing; }
.ed-stage.avatar { border-radius: 50%; aspect-ratio: 1; }
.ed-stage.banner { border-radius: 12px; aspect-ratio: 5 / 2; }
.ed-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ed-side { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ed-side h4 { margin: 8px 0 0; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, var(--muted)); }
.ed-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ed-box .ed-chip { display: grid; gap: 4px; justify-items: center; padding: 6px; border-radius: 12px; background: var(--raised);
                   font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.ed-chip canvas { width: 100%; height: auto; border-radius: 50%; display: block; }
.ed-box.banner .ed-chip canvas { border-radius: 6px; }
.ed-box .ed-chip.on { border-color: var(--accent); color: var(--head); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.ed-slider { display: grid; grid-template-columns: 82px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13px; }
.ed-tools .ed-slider { grid-template-columns: auto 150px 46px; }
.ed-slider output { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.ed-slider input { accent-color: var(--accent); width: 100%; }
.ed-line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px; align-items: center; }
.ed-line .ed-slider { grid-template-columns: auto minmax(0, 1fr) 42px; }
.ed-check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; white-space: nowrap; }
.ed-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.ed-box input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--line-2, var(--line)); border-radius: 8px; background: var(--deep); }
.ed-undo { justify-self: start; margin-top: 4px; }
.ed-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--side);
           position: sticky; bottom: 0; }

@media (max-width: 1000px) { .bp-cols { grid-template-columns: 1fr; } .bp-pv { position: static; } }
@media (max-width: 760px) {
  .ed-main { grid-template-columns: 1fr; }
  .ed-line { grid-template-columns: auto auto; }
  .ed-line .ed-slider { grid-column: 1 / -1; }
  .ed-tools .ed-slider { grid-template-columns: auto minmax(0, 1fr) 46px; width: 100%; }
}
