/* orb css */
#orb-launcher { position: fixed; right: 22px; bottom: 24px; width: 62px; height: 62px; border: 1px solid #bfa66d; border-radius: 50%; padding: 5px; background: linear-gradient(145deg,#eee2c6,#967341); box-shadow: 0 5px 20px #152c4355; z-index: 45; cursor: pointer; }
#orb-launcher[hidden], .orb-unread[hidden] { display: none; }
.orb-sphere { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 32% 26%,#f5fbff 0%,#a6d3ea 10%,#5189b5 29%,#254d79 56%,#152b4c 78%); box-shadow: inset -3px -4px 7px #10233d88,inset 2px 2px 5px #fff9; }
.orb-unread { position: absolute; right: -4px; top: -5px; border: 2px solid #faf7ee; border-radius: 20px; padding: 2px 6px; min-width: 23px; background: #943d32; color: white; font: 700 12px/1.3 system-ui,sans-serif; }
#orb-banners { position: fixed; top: max(10px,env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(620px,calc(100% - 20px)); display: grid; gap: 8px; z-index: 100; pointer-events: none; }
.orb-banner { display: block; width: 100%; min-height: 78px; border: 1px solid #b9cad8; border-radius: 17px; padding: 19px 22px; background: #f8fbff; color: #173b60; box-shadow: 0 7px 26px #142c4540; font: 650 21px/1.35 system-ui,sans-serif; text-align: left; overflow-wrap: anywhere; cursor: pointer; pointer-events: auto; animation: orb-banner-in .26s ease-out; }
#orb-banners.orb-banner-exit { animation: orb-banner-out .25s ease-in forwards; }
@keyframes orb-banner-in { from { opacity: 0; transform: translateY(-110%); } to { opacity: 1; transform: translateY(0); } }
@keyframes orb-banner-out { to { opacity: 0; transform: translate(-50%,-120%); } }
#orb-dialog { position: fixed; inset: auto 22px 98px auto; margin: 0; padding: 0; width: min(410px,calc(100vw - 28px)); height: min(600px,calc(100dvh - 130px)); max-height: none; max-width: none; border: 1px solid #b3a78e; border-radius: 20px; background: #fcfaf5; color: #223a50; box-shadow: 0 18px 70px #122e4550; overflow: hidden; }
#orb-dialog::backdrop { background: #13273828; }
.orb-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; background: #203f63; color: #fff9ed; }
.orb-header strong { display: block; font-size: 20px; }
.orb-header small { display: block; margin-top: 2px; font: 13px system-ui,sans-serif; color: #d4e0eb; }
.orb-header button { border: 0; border-radius: 50%; width: 40px; height: 40px; background: #ffffff15; color: white; font: 28px/1 system-ui,sans-serif; cursor: pointer; }
#orb-chat-body { display: flex; flex-direction: column; min-height: 0; height: calc(100% - 81px); }
.orb-timeline { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; overscroll-behavior: contain; font-family: system-ui,sans-serif; }
.orb-empty { text-align: center; color: #7b827f; padding: 24px 8px; font-size: 15px; line-height: 1.8; }
.orb-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 20px; color: #7d827d; font-size: 11px; white-space: nowrap; }
.orb-divider::before,.orb-divider::after { content: ''; height: 1px; flex: 1; background: #dddcd4; }
.orb-message { display: flex; flex-direction: column; max-width: 88%; margin-bottom: 17px; width: fit-content; }
.orb-right { margin-left: auto; align-items: flex-end; }
.orb-left { margin-right: auto; align-items: flex-start; }
.orb-message > small { color: #687987; font-size: 11px; margin: 0 5px 4px; }
.orb-bubble { border: 0; border-radius: 15px; padding: 11px 14px; color: white; background: #285b86; font: 16px/1.5 system-ui,sans-serif; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.orb-right .orb-bubble { border-top-right-radius: 4px; }
.orb-left .orb-bubble { border-top-left-radius: 4px; background: #e9e4d9; color: #273d50; }
.orb-notification .orb-bubble { background: #e8eff6; border: 1px solid #cbd9e6; color: #244664; cursor: pointer; }
.orb-message time { color: #87918f; font-size: 10px; margin: 4px 5px 0; }
.orb-new .orb-bubble { box-shadow: 0 0 0 2px #b6c8d9; }
.orb-composer { padding: 12px; border-top: 1px solid #e2ddd1; background: #f4f0e7; flex-shrink: 0; }
.orb-order-label { display: flex; align-items: center; gap: 10px; font: 12px system-ui,sans-serif; color: #667584; margin-bottom: 9px; }
.orb-order-label select { min-width: 0; flex: 1; width: 0; padding: 6px 9px; font: 13px system-ui,sans-serif; border: 1px solid #d7d5cb; border-radius: 8px; background: #fffdf8; }
.orb-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.orb-compose-row textarea { resize: none; flex: 1; min-width: 0; width: 0; min-height: 45px; max-height: 120px; padding: 11px 12px; border: 1px solid #d4d6d3; border-radius: 16px; background: white; font: 16px/1.4 system-ui,sans-serif; color: #203f63; }
.orb-compose-row button { flex-shrink: 0; width: 45px; height: 45px; border: 0; border-radius: 50%; background: #203f63; color: white; font: 25px system-ui,sans-serif; cursor: pointer; }
.orb-send-error { color: #963e32; margin: 7px 0 0; font: 13px system-ui,sans-serif; }
.forge-messenger { display: flex; min-height: 470px; height: min(680px,75dvh); overflow: hidden; }
#forge-messages { padding: 0; overflow: hidden; }
.forge-threads { flex: 0 0 225px; border-right: 1px solid #ddd5c6; padding: 10px; overflow-y: auto; }
.forge-threads button { display: block; width: 100%; padding: 13px; border: 0; border-radius: 10px; background: transparent; text-align: left; margin-bottom: 7px; color: #203f63; cursor: pointer; }
.forge-threads button[aria-pressed="true"] { background: #e6edf4; }
.forge-threads small { display: block; margin-top: 4px; font-size: 12px; }
.forge-unread { display: inline-block; border-radius: 12px; padding: 1px 6px; color: white; background: #963e32; font-size: 12px; }
.forge-conversation { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.forge-conversation-title { padding: 15px; border-bottom: 1px solid #ddd5c6; }
.orb-order-highlight { outline: 3px solid #6a96ba; outline-offset: 4px; }
#orb-layer :focus-visible, #forge-messages :focus-visible { outline: 3px solid #b18a49; outline-offset: 3px; }
@media(max-width: 760px) {
  #orb-launcher { right: 16px; bottom: calc(var(--mobile-nav-height,72px) + 16px + env(safe-area-inset-bottom)); width: 58px; height: 58px; }
  #orb-dialog { inset: auto 10px max(10px,env(safe-area-inset-bottom)) 10px; width: calc(100% - 20px); height: min(650px,calc(100dvh - 32px - env(safe-area-inset-top))); border-radius: 20px; }
  .orb-banner { font-size: 21px; padding: 19px 18px; min-height: 84px; }
  .forge-messenger { flex-direction: column; height: min(720px,85dvh); }
  .forge-threads { display: flex; flex: 0 0 auto; max-height: 110px; border-right: 0; border-bottom: 1px solid #ddd5c6; gap: 7px; }
  .forge-threads button { flex: 0 0 170px; margin: 0; }
  .forge-conversation { min-height: 0; }
}
@media(prefers-reduced-motion: reduce) { .orb-banner, #orb-banners.orb-banner-exit { animation-duration: .01ms; } }
