/* Ask Mira dock — the shell-level right panel.

   At >= lg it is an inline flex column in the content row; because
   #page-content-wrapper is flex:1 with minWidth:0, adding this sibling squeezes
   the page with no other rule. Below lg it becomes a fixed right-edge drawer,
   mirroring #app-sidebar (styles.css) on the other side.

   --mira-dock-w is written directly by assets/mira_dock.js during a drag so the
   resize repaints without a Dash round-trip. It is a dynamic layout value, not a
   design token — the app deliberately has no :root token sheet. */

.mira-dock {
  display: none;
  flex-direction: column;
  position: relative;
  flex: 0 0 var(--mira-dock-w, 420px);
  min-width: 0;
  background: #fff;
  border-left: 1px solid #dee2e6;
  box-sizing: border-box;
}
.mira-dock.mira-dock-open {
  display: flex;
}

.mira-dock-resizer {
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 2;
}
.mira-dock-resizer:hover {
  background: rgba(59, 91, 219, 0.25);
}

.mira-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #ececf1;
  flex: 0 0 auto;
}
.mira-dock-popout {
  display: inline-flex;
  align-items: center;
  color: #9a9aa4;
  text-decoration: none;
  padding: 0 6px 0 0;
}
.mira-dock-popout:hover {
  color: #26262c;
}
.mira-dock-title {
  font-size: 13px;
  font-weight: 600;
  color: #26262c;
  margin-right: auto;      /* push the × to the far right; pop-out + title sit left */
}
.mira-dock-close {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #9a9aa4;
  cursor: pointer;
  padding: 0 4px;
}
.mira-dock-close:hover {
  color: #26262c;
}

.mira-dock-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 0;
}

#mira-dock-backdrop {
  display: none;
}

.mira-dock-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1035;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #3b5bdb;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mira-dock-fab:hover:not(:disabled) {
  background: #2f4bc4;
}
.mira-dock-fab:disabled {
  background: #b0b0b8;
  cursor: default;
}
.mira-dock-fab-icon {
  color: #fff;
}

/* The chat renders in a narrow column here, so a few page-tuned rules relax. */
.mira-dock-body .am-landing {
  padding: 12px 0 4px;
}
.mira-dock-body .am-greeting {
  font-size: 18px;
}
.mira-dock-body .am-chips {
  flex-direction: column;
  max-width: none;
}
.mira-dock-body .am-chip {
  text-align: left;
}
.mira-dock-body .am-user {
  max-width: 92%;
}
.mira-dock-body .am-disclaimer {
  font-size: 10.5px;
}

html.mira-dock-dragging {
  cursor: col-resize;
}
html.mira-dock-dragging iframe {
  pointer-events: none;
}

/* ===================================================================== */
/* Responsive: < lg = 992px. The dock leaves the flex row and becomes a   */
/* fixed right-edge drawer. position:fixed escapes the content row's      */
/* overflow:hidden, the same reason #app-sidebar uses it (styles.css).    */
/* ===================================================================== */
@media (max-width: 991.98px) {
  .mira-dock {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    flex: none;
    z-index: 1045;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  }
  .mira-dock.mira-dock-open {
    display: flex;
    transform: translateX(0);
  }
  #mira-dock-backdrop.show {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1044;
  }
  .mira-dock-resizer {
    display: none;
  }
}
