/* Launcher tab on the right edge, at mid-height. No Bootstrap or Dore class
   pins an element to a viewport edge. z-index sits between the top bar (1030)
   and a modal backdrop (1040): an open modal dims and blocks the chat with
   the rest of the page. */
.copilot-tab {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1035;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem 0 0 0.5rem;
}

/* Once a conversation exists the tab returns as a handle: outlined, on the
   theme's surface color so it reads in the light and the dark sheet. */
.copilot-tab.btn-outline-primary {
    background-color: var(--foreground-color);
}

/* Marks the handle: a conversation is waiting behind it. */
.copilot-tab-dot {
    position: absolute;
    top: -0.3rem;
    left: -0.3rem;
    width: 0.7rem;
    height: 0.7rem;
    background-color: var(--theme-color-1);
}

/* Floating chat window between the top bar and the screen bottom, so its
   height follows the viewport. It stacks one below the top bar (1030): the
   bar's menus cannot rise above it, and they must open over the chat. A
   modal backdrop (1040) still dims the window. */
.copilot-window {
    position: fixed;
    top: calc(var(--navbar-h) + 12px);
    right: 24px;
    bottom: 24px;
    z-index: 1029;
    width: 480px;
}

.copilot-frame {
    flex: 1 1 auto;
    min-height: 0;
}

/* Below Bootstrap's md stop the window takes the whole viewport, above the
   top bar and the kanban floating buttons (1040). A d-* utility hides or
   shows; it cannot change geometry. */
@media (max-width: 767.98px) {
    .copilot-window {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        border-radius: 0;
        z-index: 1041;
    }
}
