/* Static native note and open chat: shared framing, no playback. */
:root {
  --expanded-chat-height: calc(100vh - 232px);
  --chat-height: 58px;
  --chat-visibility: hidden;
  --chat-opacity: 0;
}

:root[data-chat-open="true"] {
  --chat-height: var(--expanded-chat-height);
  --chat-visibility: visible;
  --chat-opacity: 1;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

*,
*::before,
*::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
  caret-color: transparent !important;
}

[data-note-editor] {
  --note-bottom-dock-height: var(--chat-height);
  height: 100%;
}

[data-note-header] {
  padding: 24px 24px 0;
}

[data-note-header] textarea {
  field-sizing: content;
  height: auto !important;
  min-height: 36px;
}

[data-note-body] {
  overflow: hidden;
  scrollbar-gutter: auto;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent);
}

[data-note-body] > div {
  padding-inline: 24px;
}

[data-note-dock] {
  position: absolute;
  inset-inline: 0;
  bottom: 16px;
}

[data-chat-panel] {
  height: var(--chat-height);
  min-height: 58px;
}

[data-chat-history],
[data-chat-close] {
  visibility: var(--chat-visibility);
  opacity: var(--chat-opacity);
}

[data-chat-scroll] {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden !important;
  padding-top: 36px;
}

[data-chat-messages] {
  flex-shrink: 0;
}

/* Hover-only actions have no interaction in the inert demo. */
[data-chat-message-id] > .opacity-0 {
  display: none;
}

@media (max-width: 600px) {
  :root {
    --expanded-chat-height: calc(100vh - 192px);
  }
}

@media (max-width: 380px) {
  [data-note-header],
  [data-note-body] > div {
    padding-inline: 16px;
  }

  .note-editor-control-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 320px) {
  :root {
    --expanded-chat-height: calc(100vh - 208px);
  }
}
