.demo-launch,
.demo-panel,
.demo-story,
.demo-cue,
.demo-takeover {
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}
.demo-launch {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 10000;
  border: 0;
  border-radius: 20px;
  padding: 10px 15px;
  background: #074f57;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px #0003;
  cursor: pointer;
}
.demo-panel {
  position: fixed;
  z-index: 10001;
  bottom: 60px;
  right: 12px;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 84px);
  overflow: auto;
  padding: 22px;
  background: #fff;
  border: 1px solid #d9e2e2;
  box-shadow: 0 10px 50px #0003;
  border-radius: 14px;
  color: #17383b;
  font-size: 14px;
  line-height: 1.5;
}
.demo-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-panel h2,
.demo-takeover h2 {
  font-size: 23px;
  margin: 3px 0 12px;
  color: #074f57;
}
.demo-eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #608080;
  display: block;
  font-weight: bold;
}
.demo-panel button,
.demo-story button,
.demo-takeover button {
  padding: 9px 11px;
  border: 1px solid #bdd0d0;
  border-radius: 7px;
  background: #fff;
  color: #074f57;
  font-size: 13px;
  cursor: pointer;
}
.demo-panel button:disabled,
.demo-story button:disabled {
  opacity: 0.4;
}
.demo-panel .demo-primary,
.demo-takeover .demo-primary {
  background: #074f57;
  color: #fff;
  border-color: #074f57;
  min-height: 43px;
}
.demo-panel > button.demo-primary {
  width: 100%;
  margin: 12px 0;
}
.demo-panel label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin: 9px 0;
}
.demo-panel select {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid #bdd0d0;
  border-radius: 6px;
  color: #17383b;
  background: white;
  font-size: 13px;
}
.demo-row {
  display: flex;
  gap: 12px;
}
.demo-row label {
  flex: 1;
  min-width: 0;
}
.demo-panel details {
  border-top: 1px solid #e5eded;
  padding: 12px 0;
}
.demo-panel summary {
  font-weight: bold;
  cursor: pointer;
}
.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.demo-panel dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  margin: 12px 0;
}
.demo-panel dd {
  margin: 0;
  text-align: right;
}
.demo-panel .demo-small {
  font-size: 11px;
  color: #5d7476;
}
.demo-error {
  color: #a03226;
  background: #fff0ec;
  padding: 10px;
  border-radius: 6px;
}
.demo-story {
  position: fixed;
  bottom: 62px;
  left: 12px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #ffffffed;
  box-shadow: 0 8px 35px #0003;
  border: 1px solid #d9e2e2;
  padding: 16px;
  border-radius: 12px;
  color: #17383b;
  backdrop-filter: blur(8px);
}
.demo-story strong {
  display: block;
  font-size: 17px;
  margin: 5px 0;
}
.demo-story p {
  font-size: 13px;
  line-height: 1.4;
  margin: 5px 0 12px;
}
.demo-story > div {
  display: flex;
  gap: 6px;
}
.demo-story button {
  font-size: 12px;
  padding: 7px 9px;
}
.demo-cue {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10010;
  background: #074f57;
  color: white;
  padding: 12px 18px;
  max-width: calc(100vw - 32px);
  border-radius: 8px;
  box-shadow: 0 5px 20px #0002;
  font-size: 14px;
  pointer-events: none;
}
.demo-takeover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: #14383b80;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  padding: 22px;
  backdrop-filter: blur(3px);
}
.demo-takeover {
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  background: white;
  padding: 26px;
  border-radius: 16px;
  width: 370px;
  max-width: 100%;
  box-shadow: 0 12px 60px #0004;
  color: #17383b;
}
.demo-takeover p {
  font-size: 15px;
  line-height: 1.5;
}
.demo-takeover button {
  display: block;
  width: 100%;
  margin-top: 10px;
}
.demo-highlight {
  outline: 3px solid #d7a544 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #f3d57955 !important;
}
@media (prefers-reduced-motion: reduce) {
  .demo-highlight {
    scroll-behavior: auto !important;
  }
}

/* Native bottom bar is semantically hidden; fixed descendants escape Ionic transforms in browsers. */
bottom-bar .bottom-bar-wrapper.hidden {
  visibility: hidden;
  pointer-events: none;
}
.demo-loop input {
  width: auto !important;
  margin-right: 8px;
}

.demo-document {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: white;
  display: flex;
  flex-direction: column;
}
.demo-document header {
  padding: 12px 18px;
  background: #074f57;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 16px Arial;
}
.demo-document button {
  border: 1px solid #fff8;
  background: transparent;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
}
.demo-document iframe {
  border: 0;
  flex: 1;
  width: 100%;
}

/* Presenter controls have a separate dock outside the app viewport. */
.demo-embedded .demo-launch { display: none; }
.demo-embedded .demo-panel { bottom: 12px; max-height: calc(100dvh - 24px); }
.demo-embedded .demo-story { bottom: 12px; }
.demo-story > div { flex-wrap: wrap; }
.demo-panel-header > button { flex-shrink: 0; min-width: 40px; min-height: 40px; }

/* Native webviews use overlay scrollbars. Desktop gutters otherwise consume
   width twice inside nested Ionic panes and clip viewport-sized content. */
html, body, body * { scrollbar-width: none; }
body *::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; }

/* Keep both locale-formatted times on their own line within a calendar row. */
.calendar-overview .inner-calendar-item .time { flex: 0 0 21vw; white-space: nowrap; }
.calendar-overview .inner-calendar-item .border { flex: 0 0 6.66vw; }
.calendar-overview .inner-calendar-item checklist-title { flex: 1 1 0; width: auto; min-width: 0; }
.dashboard__loading-status { bottom: 8px; }
