/* Bank & Dice canonical Cubiri surfaces.
   Settings source: design-system.css + party.css + party-5sr.css.
   Rules/Explanation source: canonical game-rule-card component in app.css.
   Do not approximate these patterns. Reuse the canonical geometry and values. */

body.bank-and-dice-active .bank-dice-settings.cubiri-card {
  width: min(calc(100% - 28px), 720px);
  margin-inline: auto;
  box-sizing: border-box;
  padding: var(--cubiri-card-padding);
  gap: 1rem;
}

body.bank-and-dice-active .bank-dice-settings h2 {
  margin: 0 0 2px;
  font-size: .68rem;
  line-height: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: inherit;
  opacity: .58;
}

body.bank-and-dice-active .bank-dice-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .6rem;
}

body.bank-and-dice-active .bank-dice-choice-row .cubiri-option {
  position: relative;
  min-width: 0;
  min-height: var(--cubiri-control-min-h);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--cubiri-radius-control);
  padding: 8px 12px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  isolation: isolate;
}

body.bank-and-dice-active .bank-dice-choice-row .cubiri-option.is-active,
body.bank-and-dice-active .bank-dice-choice-row .cubiri-option[aria-pressed="true"] {
  border-color: transparent;
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  box-shadow:
    0 0 10px color-mix(in srgb, var(--cubiri-brand-purple) 24%, transparent),
    0 0 14px color-mix(in srgb, var(--cubiri-brand-pink) 18%, transparent),
    0 0 18px color-mix(in srgb, var(--cubiri-brand-orange) 12%, transparent);
}

body.bank-and-dice-active .bank-dice-name-list {
  gap: .5rem;
  padding-top: 0;
}

body.bank-and-dice-active .bank-dice-name-list input,
body.bank-and-dice-active .bank-dice-settings label input {
  min-height: var(--cubiri-control-min-h);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--cubiri-radius-control);
  padding: 8px 12px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  color: inherit;
  font: inherit;
}

body.bank-and-dice-active .bank-dice-settings label {
  gap: .6rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  font-size: .68rem;
  line-height: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: inherit;
  opacity: .58;
}

body.bank-and-dice-active .bank-dice-settings label input {
  margin-top: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  font-weight: 400;
  opacity: 1;
}

body.bank-and-dice-active .bank-dice-settings > h2:not(:first-child) {
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

body.bank-and-dice-active .bank-dice-reset.cubiri-action-destructive {
  min-height: var(--cubiri-control-min-h);
  border-radius: var(--cubiri-radius-control);
  padding: 10px 14px;
  margin-top: 0;
  font: inherit;
  font-weight: 750;
}

/* BANK & DICE HOW TO USE + EXPLANATION
   Canonical source is the generic game-rule-card component in app.css.
   These selectors only provide the same content-container width/padding used by
   the generic game tabs. Card geometry, colors, chevrons and open state are
   intentionally owned by app.css, exactly like Truth or Dare Rules. */
body.bank-and-dice-active .bank-dice-rules,
body.bank-and-dice-active .bank-dice-explanation.bank-dice-canonical-info {
  width: min(calc(100% - 16px), 720px);
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
  padding: clamp(8px, 1.8vw, 12px);
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  line-height: normal;
}

/* Neutralize the legacy one-card Explanation wrapper. The child cards now own
   their own canonical borders/backgrounds instead of sitting inside one shell. */
body.bank-and-dice-active .bank-dice-explanation.bank-dice-canonical-info {
  --rule-accent: initial;
}

/* Legacy details fallback, only visible before bank-and-dice-info.js normalizes
   the workspace. Keep it unobtrusive; the live canonical view uses game-rule-card. */
body.bank-and-dice-active .bank-dice-rules details {
  margin: 0 0 clamp(6px, 1.4vw, 9px);
}

body.bank-and-dice-active .bank-dice-trademark {
  margin: 4px clamp(13px, 3vw, 17px) 0 !important;
  padding: 0 0 clamp(12px, 2.8vw, 16px);
  border: 0;
  font-size: .78rem !important;
  line-height: 1.45;
  opacity: .55 !important;
}

/* Editor interaction contract: every non-primary editor control gets the same
   purple rollover/focus treatment already used by the player-transfer buttons. */
body.bank-and-dice-active .bank-dice-keypad button,
body.bank-and-dice-active .bank-dice-ops button,
body.bank-and-dice-active .bank-dice-quick-amounts button,
body.bank-and-dice-active .bank-dice-transfer {
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body.bank-and-dice-active .bank-dice-keypad button:hover,
body.bank-and-dice-active .bank-dice-keypad button:focus-visible,
body.bank-and-dice-active .bank-dice-ops button:hover,
body.bank-and-dice-active .bank-dice-ops button:focus-visible,
body.bank-and-dice-active .bank-dice-quick-amounts button:hover,
body.bank-and-dice-active .bank-dice-quick-amounts button:focus-visible,
body.bank-and-dice-active .bank-dice-transfer:hover,
body.bank-and-dice-active .bank-dice-transfer:focus-visible {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px color-mix(in srgb, #a855f7 18%, transparent);
}
