/* Rack kits on the drawing (FR-64): the prompt bar over the bottom of the
   drawing (rackKitPrompt.js), the "Rack kit" row in a racked unit's
   Properties, and the Quote's "Rack kit for…" line. Colours are the app's
   tokens (styles.css), so both themes follow. */

.rack-kit-prompt {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 9px 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px var(--shadow-dialog);
  font-size: 12.5px;
}
.rack-kit-prompt[hidden] { display: none; }
.rack-kit-body { min-width: 0; flex: 1 1 320px; }
.rack-kit-words { overflow-wrap: anywhere; }
.rack-kit-words .items-disc-badge { margin-left: 6px; }
.rack-kit-required { color: var(--warn-fg); }
.rack-kit-details { color: var(--text-dim); }
.rack-kit-note-text { color: var(--text-dim); font-size: 11.5px; margin-top: 2px; }
.rack-kit-choices { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; }
.rack-kit-choice { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.rack-kit-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rack-kit-buttons button { white-space: nowrap; }
.rack-kit-close { min-width: 28px; padding-left: 6px; padding-right: 6px; }

.rack-kit-row .hint { margin: 2px 0 4px; font-size: 11.5px; }
.rack-kit-row button { width: 100%; margin-top: 3px; }

.rack-kit-buttons .rack-kit-add { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.rack-kit-buttons .rack-kit-add:hover { background: var(--accent-hover); }

/* The rack drawing's "w/ AX-RK1" on a unit whose kit is on the quote. */
.rack-kit-note { fill: var(--text-dim); font-size: 9px; pointer-events: none; user-select: none; }

/* The Quote's "Rack kit for 3 AX-DSP-400" under a kit's model number. */
.quote-kit-for { display: block; color: var(--text-dim); font-size: 11px; font-weight: normal; margin-top: 1px; }

/* Account > Your account: the models never asked about, with Ask again;
   Admin > Price list: the team's required rack kits setting. */
.account-never-ask { list-style: none; margin: 4px 0; padding: 0; }
.account-never-ask li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 3px 0; }
.account-never-ask li button { margin-left: auto; }
.required-kits-setting { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.required-kits-setting select { width: auto; max-width: 100%; flex: none; }
.account-never-ask .hint { color: var(--text-dim); }

/* On a phone the drawing can be a sliver beside the open side panels, so
   the bar sits over the bottom of the screen instead, just above the status
   bar, as wide as the screen, its words above its buttons. */
@media (max-width: 700px) {
  .rack-kit-prompt {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    max-height: 60vh;
    overflow-y: auto;
    z-index: 60;
  }
  .rack-kit-body { flex-basis: 100%; }
  /* Admin's setting: its select under its words, no wider than the page. */
  .required-kits-setting { flex-wrap: wrap; margin-left: 0; max-width: 100%; }
  .required-kits-setting select { flex: 1 1 auto; min-width: 0; }
}

@media print {
  .rack-kit-prompt { display: none !important; }
}
