/* Public demo only: the case card on the right of every portal page, like the EHR's guide. */
body:has(#demo-case) {
  --case: 300px;
  padding-right: var(--case);
}
body:has(#demo-case.collapsed) {
  --case: 30px;
}
body:has(#demo-case) .rx-chat {
  right: calc(var(--case) + 12px);
}
#demo-case {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  box-sizing: border-box;
  overflow: auto;
  z-index: 9;
  padding: 16px 18px 18px;
  background: #f6f7f8;
  border-left: 1px solid #d5dadd;
  color: #1d2327;
  font: 13.5px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
#demo-case h2 {
  margin: 0 0 8px;
  font-size: 16px;
}
#demo-case h3 {
  margin: 16px 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b656b;
}
#demo-case p {
  margin: 0;
  line-height: 1.45;
}
#demo-case ul,
#demo-case ol {
  margin: 0;
  padding-left: 18px;
}
#demo-case li {
  margin: 0 0 5px;
}
#demo-case a {
  color: #0b5e74;
  font-weight: 600;
}
#demo-case .foot {
  margin-top: 16px;
  color: #5b656b;
  font-size: 12.5px;
}
#demo-case-hide,
#demo-case-show {
  margin: 0;
  font: 600 12.5px system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #0b5e74;
  cursor: pointer;
}
#demo-case-hide {
  float: right;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid #d5dadd;
  border-radius: 4px;
}
#demo-case-show {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  z-index: 9;
  padding: 0;
  background: #f6f7f8;
  border: 0;
  border-left: 1px solid #d5dadd;
  border-radius: 0;
  writing-mode: vertical-rl;
}
#demo-case-show:hover {
  background: #e9eef0 !important;
}
#demo-case.collapsed {
  display: none;
}
#demo-case.collapsed + #demo-case-show {
  display: block;
}
@media (max-width: 900px) {
  body:has(#demo-case) {
    padding-right: 0;
    padding-bottom: 45vh;
  }
  body:has(#demo-case.collapsed) {
    padding-bottom: 0;
  }
  body:has(#demo-case) .rx-chat {
    right: 12px;
    bottom: calc(45vh + 12px);
  }
  #demo-case {
    top: auto;
    left: 0;
    width: auto;
    height: 45vh;
    border-left: 0;
    border-top: 1px solid #d5dadd;
  }
  #demo-case-show {
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    bottom: 12px;
    right: 12px;
    padding: 8px 14px;
    border: 1px solid #d5dadd;
    border-radius: 18px;
    writing-mode: horizontal-tb;
  }
}
