/* Help AI slide-over + Outlook messaging — Mistawasis gold / maroon / charcoal */

.bps-help-tab {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 1085;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--gold, #e2a318);
  color: #1a1204;
  border: 0;
  border-radius: 0 8px 8px 0;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .78rem;
  padding: 1.15rem .55rem;
  box-shadow: -4px 8px 18px rgba(26, 16, 16, .18);
  cursor: pointer;
}
.bps-help-tab:hover,
.bps-help-tab[aria-expanded="true"] {
  background: #f8c020;
}
.bps-help-scrim {
  position: fixed;
  inset: 0;
  background: rgba(26, 16, 16, .45);
  z-index: 1086;
}
.bps-help-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 75vw;
  max-width: 75vw;
  height: 100vh;
  z-index: 1087;
  background: #fffaf3;
  color: var(--ink, #1a1010);
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 40px rgba(26, 16, 16, .28);
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.22, 1, .36, 1);
}
.bps-help-panel.is-open {
  transform: translateX(0);
}
.bps-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.15rem;
  background: #2b2b33 url("/static/img/mistawasis-header-bg.png") center / auto 100% repeat-x;
  color: #fff;
  border-bottom: 4px solid var(--gold, #e2a318);
}
.bps-help-kicker {
  margin: 0;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold, #e2a318);
  font-weight: 800;
}
.bps-help-head h2 {
  margin: .1rem 0 0;
  font-size: 1.35rem;
  color: #fff;
  font-family: "Cormorant Garamond", Georgia, serif;
}
.bps-help-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.bps-help-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bps-help-chat,
.bps-help-glossary {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.bps-help-chat {
  border-right: 1px solid var(--line, #e0d4c4);
}
.bps-help-id {
  padding: .85rem 1rem 0;
}
.bps-help-card {
  background: #fff;
  border: 1px solid var(--line, #e0d4c4);
  border-top: 3px solid var(--gold, #e2a318);
  border-radius: 4px;
  padding: .85rem .95rem;
}
.bps-help-card h3 {
  font-size: 1rem;
  margin: 0 0 .35rem;
}
.bps-help-card p {
  margin: 0 0 .65rem;
  color: #5c5148;
  font-size: .88rem;
}
.bps-help-card label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  margin: .35rem 0 .15rem;
}
.bps-help-card input {
  width: 100%;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 6px;
  padding: .4rem .55rem;
  margin-bottom: .35rem;
}
.bps-help-note {
  font-size: .8rem;
  color: #6a5d54;
  margin-top: .4rem;
}
.bps-help-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--maroon, #8a181a);
}
.bps-help-log {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.bps-help-bubble {
  max-width: 92%;
  padding: .65rem .8rem;
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.bps-help-bubble.user {
  align-self: flex-end;
  background: var(--maroon, #8a181a);
  color: #fff;
}
.bps-help-bubble.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line, #e0d4c4);
}
.bps-help-bubble.system {
  align-self: center;
  background: rgba(226, 163, 24, .12);
  border: 1px solid rgba(226, 163, 24, .35);
  font-size: .82rem;
}
.bps-help-sources {
  margin-top: .45rem;
  padding: 0;
  list-style: none;
  font-size: .75rem;
}
.bps-help-sources li {
  color: #6a5d54;
}
.bps-help-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .55rem;
  padding: .75rem;
  border-top: 1px solid var(--line, #e0d4c4);
  background: #fff;
}
.bps-help-form textarea {
  width: 100%;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 8px;
  padding: .55rem .7rem;
  resize: none;
}
.bps-help-gloss-head {
  padding: .85rem 1rem .4rem;
  border-bottom: 1px solid var(--line, #e0d4c4);
}
.bps-help-gloss-head h3 {
  font-size: 1.05rem;
  margin: 0 0 .45rem;
}
.bps-help-gloss-head input {
  width: 100%;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 8px;
  padding: .4rem .6rem;
}
.bps-help-gloss-list {
  overflow: auto;
  padding: .5rem;
}
.bps-help-gloss-item {
  display: block;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 6px;
  padding: .65rem .75rem;
  margin-bottom: .45rem;
  cursor: pointer;
  color: inherit;
}
.bps-help-gloss-item:hover {
  border-color: var(--gold, #e2a318);
}
.bps-help-gloss-item b {
  display: block;
  font-size: .92rem;
}
.bps-help-gloss-item span {
  display: block;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--maroon, #8a181a);
  font-weight: 800;
  margin-bottom: .2rem;
}
.bps-help-gloss-item p {
  margin: .2rem 0 0;
  font-size: .8rem;
  color: #6a5d54;
}

.civic-ask {
  margin: 1.15rem 0 0;
  display: flex;
  gap: .5rem;
  max-width: 34rem;
}
.civic-ask input {
  flex: 1;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 2px;
  padding: .7rem .85rem;
  background: #fff;
}
.civic-ask-out {
  margin-top: 1rem;
  background: #fffaf3;
  border: 1px solid var(--line, #e0d4c4);
  border-top: 4px solid var(--gold, #e2a318);
  border-radius: 4px;
  padding: 1rem 1.1rem;
}
.civic-ask-out[hidden] { display: none !important; }
.civic-ask-out h2 {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--maroon, #8a181a);
  font-weight: 800;
  margin: 0 0 .5rem;
}
.civic-ask-out p { margin: 0 0 .7rem; }
.civic-ask-out a {
  display: block;
  font-size: .9rem;
  margin-top: .25rem;
}

/* Outlook-style messaging */
.bps-content:has(.ol-shell) {
  padding: 0;
}
.ol-shell {
  display: grid;
  grid-template-columns: 220px 320px 1fr;
  min-height: calc(100vh - 58px);
  background: #fff;
}
.ol-nav {
  background: #f3efe6;
  border-right: 1px solid var(--line, #e0d4c4);
  padding: .85rem .55rem;
}
.ol-folders a {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: .45rem;
  align-items: center;
  padding: .45rem .55rem;
  color: var(--ink, #1a1010);
  text-decoration: none;
  border-radius: 4px;
  font-size: .9rem;
}
.ol-folders a.active,
.ol-folders a:hover {
  background: rgba(138, 24, 26, .1);
  color: var(--maroon, #8a181a);
}
.ol-folders em {
  font-style: normal;
  font-size: .72rem;
  color: #6a5d54;
}
.ol-search {
  margin: .75rem .4rem 0;
}
.ol-search input {
  width: 100%;
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 4px;
  padding: .35rem .5rem;
  font-size: .85rem;
}
.ol-list {
  border-right: 1px solid var(--line, #e0d4c4);
  overflow: auto;
  background: #fbf8f2;
}
.ol-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .5rem;
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--line, #e0d4c4);
  text-decoration: none;
  color: inherit;
}
.ol-item strong { font-size: .92rem; }
.ol-item span { font-size: .75rem; color: #6a5d54; }
.ol-item em {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: .75rem;
  color: #8a7b70;
}
.ol-item.unread strong { color: var(--maroon, #8a181a); }
.ol-item.active { background: #fff; box-shadow: inset 3px 0 0 var(--gold, #e2a318); }
.ol-empty, .ol-empty-pane {
  padding: 2rem 1rem;
  text-align: center;
  color: #6a5d54;
}
.ol-read {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}
.ol-read-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line, #e0d4c4);
}
.ol-read-head h2 {
  font-size: 1.35rem;
  margin: 0;
}
.ol-read-head select { max-width: 160px; }
.ol-thread {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.ol-msg {
  border: 1px solid var(--line, #e0d4c4);
  border-radius: 6px;
  padding: .7rem .85rem;
  background: #fffaf3;
}
.ol-msg--assistant { border-left: 3px solid var(--gold, #e2a318); }
.ol-msg--staff { border-left: 3px solid var(--maroon, #8a181a); }
.ol-msg--visitor { border-left: 3px solid #2b2b33; }
.ol-msg--system { background: #f3efe6; color: #5c5148; }
.ol-msg header {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  margin-bottom: .35rem;
}
.ol-msg time { color: #8a7b70; }
.ol-msg-body { white-space: pre-wrap; font-size: .92rem; line-height: 1.45; }
.ol-compose {
  border-top: 1px solid var(--line, #e0d4c4);
  padding: .85rem 1.2rem 1.1rem;
  background: #fbf8f2;
}
.ol-compose-actions {
  display: flex;
  gap: .5rem;
  margin-top: .55rem;
}

@media (max-width: 991px) {
  .bps-help-panel,
  .bps-help-panel { width: 100vw; max-width: 100vw; }
  .bps-help-split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .ol-shell { grid-template-columns: 1fr; }
  .ol-nav, .ol-list { border-right: 0; border-bottom: 1px solid var(--line, #e0d4c4); }
}
