/* Addons: the list's name cell and tile, the add sheet, the panel's stacks, the reference list and the page an Addon draws. Every class here starts with ad-. */

.ad-tile { min-width: 24px; height: 24px; padding: 0 3px; border-radius: 6px; background: var(--accbg); border: 1px solid var(--accln); display: inline-grid; place-items: center; font: 700 10px var(--mono); color: var(--acct); flex: none; }
.ad-tile-big { min-width: 36px; height: 36px; font-size: 13px; border-radius: 8px; }
.ad-tile-picture { padding: 0; overflow: hidden; background: var(--pn2); }
.ad-tile-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-score { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.ad-score-warn:empty, .ad-score-words:empty { display: none; }
.ad-place { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; margin-top: 2px; font-size: 11px; color: var(--dim); }
.ad-place .mono { overflow-wrap: anywhere; }
.ad-score-warn { flex-basis: 100%; }
.ad-band .ad-score-warn { color: var(--tx); }

.ad-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ad-strip { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-strip:empty { display: none; }
.ad-row > .ad-strip { margin-top: 10px; }
.ad-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accln); background: var(--accbg); color: var(--tx); font-size: 12.5px; overflow-wrap: anywhere; }
.ad-link { color: var(--tx); text-decoration: none; }
.ad-link:hover { background: var(--hov); }

.ad-add { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-add .dm-acts .input { flex: 1 1 220px; }
.ad-result:empty, .ad-add .note:empty, .ad-add .dm-acts:empty { display: none; }
.ad-result .kv { grid-template-columns: 92px minmax(0, 1fr); }

.ad-built { margin: 14px 20px 0; }
.ad-built .box-item { align-items: center; }
.ad-built-slot { padding-left: 48px; }
.ad-ref { margin: 14px 20px 24px; }
.ad-ref .box-item { align-items: flex-start; }
.ad-ref-kind { flex: 0 0 150px; font-size: 12px; font-weight: 600; }
.ad-ref-words { flex: 1; min-width: 0; color: var(--dim); font-size: 12.5px; }
.ad-ref .chip { flex: none; }

.ad-band { border-color: var(--accln); background: var(--accbg); }
.ad-band .band-line b { font-size: 13px; }
.ad-band .note { flex: 1 1 260px; min-width: 0; }
.ad-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding-bottom: 20px; }
.ad-page > .sect-head, .ad-page > .ad-text, .ad-page > .ad-facts, .ad-page > .ad-state, .ad-page > .ad-actions, .ad-page > .note, .ad-page > .ad-read { margin-left: 20px; margin-right: 20px; }
.ad-cell { min-width: 0; overflow-wrap: anywhere; }
.ad-text { margin: 0; max-width: 78ch; overflow-wrap: anywhere; }
.ad-facts { max-width: 640px; }
.ad-state { margin: 0; }
/* A state line wraps whole in any width: the status word keeps its dot at the first line and breaks at spaces, and inside a word only when the word alone is wider than the line. */
.ad-state .status { align-items: flex-start; white-space: normal; min-width: 0; }
.ad-state .status i { margin-top: calc((1lh - 8px) / 2); }
.ad-state .status-word { min-width: 0; overflow-wrap: anywhere; }
.ad-read { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

@media (max-width: 599px) {
  .ad-built { margin-left: 16px; margin-right: 16px; }
  .ad-built-slot { padding-left: 14px; }
  .ad-ref { margin-left: 16px; margin-right: 16px; }
  .ad-ref .box-item { flex-wrap: wrap; }
  .ad-ref-kind { flex-basis: 100%; }
  .ad-page > .sect-head, .ad-page > .ad-text, .ad-page > .ad-facts, .ad-page > .ad-state, .ad-page > .ad-actions, .ad-page > .note, .ad-page > .ad-read { margin-left: 16px; margin-right: 16px; }
}
.ad-score-warn, .ad-score-warn .status { white-space: normal; min-width: 0; }
.ad-score-warn .status { align-items: flex-start; }
.ad-unproven-warn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ad-unproven-warn .note { margin: 0; }
.ad-unproven { display: inline-flex; min-width: 0; }
.ad-open { display: inline-flex; align-items: center; gap: 6px; }

/* The blocks an Addon's page draws beyond the first six: in a page, in a Block's panel group and in an entry under Settings. They reuse the kit's elements, so this is only the stack they sit in. */
.ad-embed, .ad-group, .ad-choice, .ad-value { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ad-embed > .note:empty, .ad-group > .note:empty, .ad-answer:empty { display: none; }
.ad-embed .ad-text, .ad-group .ad-text { max-width: none; }
.ad-value { margin: 0; }
.ad-switch { min-width: 0; }
.ad-switch .box-item { align-items: flex-start; }
.ad-answer { min-width: 0; }
.ad-answer .note { margin: 0; }
.ad-form .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-form .acts:empty { display: none; }
/* A form's preview line wraps whole, a long path the person typed included. */
.ad-form .ad-preview { overflow-wrap: anywhere; }
.ad-score-line { display: inline-flex; min-width: 0; }
.ad-clock { min-width: 0; }
.ad-card { min-width: 0; }
.ad-card .node-actions { flex-wrap: wrap; }
.ad-open { color: var(--acct); overflow-wrap: anywhere; }

/* Settings, "From <Addon>": the Addon's tile and name on one line above the box of its entries. */
.ad-settings[hidden] { display: none; }
.ad-settings-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.settings .ad-settings-head .sect-head { margin: 0; }

/* An Addon's card in the sidebar's foot has words on its buttons and no icon, so in the icon rail its question and its buttons stay out until the sidebar is opened. */
@media (max-width: 899px) {
  .side:not(.open) .ad-card .ad-strip, .side:not(.open) .ad-card .node-actions { display: none; }
}
