/* Demo additions on top of Atlas Web's own app.css (copied unchanged).
   Only what the demo adds: its label, the toast, the closing card, and
   hiding the free-text composer, since the demo plays prepared tasks only. */

/* The label «Demo mit Beispieldaten»: under the brand in the sidebar, in the
   top bar on a phone. */
.demo-flag {
  margin: 0;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--signal-text) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--signal-text) 12%, transparent);
  color: var(--signal-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 960px) {
  header.top .demo-flag {
    align-self: center;
    margin-inline: auto 0.5rem;
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
  }
}

/* No free text in the demo: the composer under a task stays hidden, the
   question card above it is the only way to answer. */
#send-form { display: none !important; }
.reply-dock.demo-dock-empty { display: none !important; }
#detail .tabs { display: none !important; }

/* Sample tasks on the empty panel use Atlas's own «Beispiele» chips. */
.demo-examples {
  width: 100%;
  margin: 0.25rem 0 0.75rem;
}
.demo-examples .home-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.demo-examples .chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-on-tint);
}
#empty-task-input[readonly] { cursor: default; }
#btn-empty-start:disabled { opacity: 0.55; cursor: not-allowed; }

/* Closing card after a finished task. */
.demo-end {
  align-self: stretch;
  margin: 0.75rem 0 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}
.demo-end-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.demo-end-text {
  margin: 0 0 0.8rem;
  color: var(--ink);
  font-size: var(--fs-small, 0.9rem);
}
.demo-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.demo-end-actions .btn { text-decoration: none; }

/* Toast for the parts of Atlas the demo does not show. */
.demo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1000;
  width: max-content;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.35);
}
@media (max-width: 760px) {
  .demo-toast { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
}
.demo-toast.hidden { display: none; }

/* Phone: the brand keeps its size, the label wraps onto two lines. Below
   340px the wordmark gets a little smaller so all three fit. */
@media (max-width: 440px) {
  header.top .brand { flex-shrink: 0; }
  header.top .demo-flag {
    white-space: normal;
    text-align: center;
    max-width: 7.4rem;
    font-size: 0.68rem;
    line-height: 1.15;
    border-radius: 10px;
    padding: 0.22rem 0.5rem;
  }
}
@media (max-width: 340px) {
  header.top .brand svg { width: 116px; height: auto; }
}

/* «mit angebundenem Lager / Lieferanten»: a step that needs that system
   connected to Atlas says so on its own line. */
.chat-activity:has(.demo-connected) {
  flex-wrap: wrap;
  row-gap: 0.2rem;
}
.chat-activity .demo-connected {
  flex: 0 0 auto;
  padding: 0.05rem 0.5rem;
  font-family: var(--font-body);
  border: 1px dashed color-mix(in srgb, var(--signal-text) 55%, transparent);
  border-radius: 999px;
  color: var(--signal-text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Which of the two approvals this question is. */
.demo-approval {
  margin: 0.15rem 0 0.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ask);
}
.demo-approval.hidden { display: none; }

/* Between the two approvals: the customer's reply arrives later, and the
   person passes it on with one click. */
.demo-next {
  align-self: stretch;
  margin: 0.75rem 0 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--signal) 8%, var(--surface));
}
.demo-next-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.demo-next-text {
  margin: 0 0 0.8rem;
  color: var(--ink);
  font-size: var(--fs-small, 0.9rem);
}

/* Table headers in answers keep their words whole on a phone («Menge», not
   «Men ge»); the cells may still wrap. */
.chat-body th {
  overflow-wrap: normal;
  word-break: normal;
}
.chat-body td {
  hyphens: auto;
}
