/* The standing orders of the bot as folded rows (the owner, 3. 12. 2026: „schovat do lištičky rozbalovací“): the chat (public/js/chat-tasks.js
   order), the page of Fred under the agents and the page Pověření (src/views/fredDelegations.ts orderFold); the same as INTECHI CRM and SMART.
   One row: the little wizard of the agent, the title and the chips (state, how often, who gave it) on one line while they fit, the arrow. */
html.sd .ord-list {
  display: grid;
}
html.sd .ord-list > .ord-fold {
  border-top: 1px solid var(--line);
}
html.sd .ord-list > .ord-fold:first-child {
  border-top: 0;
}
html.sd .ord-fold > summary.ord-row {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
}
html.sd .ord-fold > summary.ord-row::-webkit-details-marker {
  display: none;
}
html.sd .ord-row > .agent-av {
  flex: none;
}
html.sd .ord-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
html.sd .ord-name {
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
html.sd .ord-chips {
  flex: 0 1 auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
html.sd .ord-chips .badge {
  white-space: nowrap;
}
html.sd .ord-chips .badge > .fa-solid {
  margin-right: 5px;
}
html.sd .ord-row > .fa-chevron-down {
  flex: none;
  color: var(--muted);
  transition: transform 0.18s ease;
}
html.sd .ord-fold[open] > .ord-row > .fa-chevron-down {
  transform: rotate(180deg);
}
/* the open part: on the axis of the title (under the text, not under the little wizard), without its own frame */
html.sd .ord-in.deleg {
  border: 0;
  border-radius: 0;
  padding: 2px 0 12px 38px;
}
html.sd .ord-in > details > summary .count-dot {
  margin-left: 6px;
}
/* in the chat the card of the order is the frame; the open part under the whole row */
html.sd .chat-order.ord-fold {
  padding-top: 4px;
  padding-bottom: 4px;
}
html.sd .chat-order > .ord-in {
  padding: 2px 0 8px;
}
/* the head of the orders with its count in a circle */
html.sd .bot-auto-h > .count-dot,
html.sd #delegations > h2 > .count-dot {
  margin-left: 2px;
}
@media (max-width: 640px) {
  html.sd .ord-in.deleg {
    padding-left: 0;
  }
}
/* the way it works (Samostatně, Jen hlásí, Smí zápisy dělat sám) in the size of the other lines of the open order */
html.sd .chat-order > .ord-in > .chat-order-mode {
  font-size: 0.875rem;
}
/* the time of the run of an order (the owner, 3. 12. 2026: „dej ji od 10:00“): the field and its button on one row while they fit, the
   same on the page (src/views/fredDelegations.ts orderFold) and in the panel of the chat (public/js/chat-tasks.js order) */
html.sd .deleg-time {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 6px 0 8px;
}
html.sd .deleg-time > label {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
}
html.sd .deleg-time > label > span > .fa-solid {
  margin-right: 4px;
}
html.sd .deleg-time input[type='time'] {
  min-height: 44px;
  width: 9rem;
}
html.sd .deleg-time > .btn {
  min-height: 44px;
}
html.sd .deleg-time > .chat-task-note {
  flex-basis: 100%;
  margin: 0;
}
/* a standing order for more firms on the card of the chat (public/js/fred-chat.js doCard): the firms as chips with their logo, one row while
   they fit; a firm without the right (or with the same order already) has its mark in the chip */
html.sd .fred-do-firms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
html.sd .fred-do-firms-label > .fa-solid {
  margin-right: 4px;
}
html.sd .fred-do-firms .firm-chip {
  min-height: 32px;
  gap: 6px;
}
html.sd .fred-do-firms .firm-chip.is-noright,
html.sd .fred-do-firms .firm-chip.is-dup {
  opacity: 0.85;
}
html.sd .fred-do-firms .firm-chip .badge > .fa-solid {
  margin-right: 4px;
}
