/* Embedded product demo. Panel values follow redmine_ai_employee/ai_chat_panel.css.
   Everything is scoped to .bunny-demo; the FAB is never fixed to the page. */
.bunny-demo {
    --demo-accent: #d0634b;
    --demo-ink: #1f2733;
    --demo-muted: #6b7688;
    --demo-border: #e6eaf0;
    width: 100%;
    scroll-margin-top: 110px;
    min-width: 0;
    color: var(--demo-ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', sans-serif;
    text-align: start;
}
.bunny-demo *, .bunny-demo *::before, .bunny-demo *::after { box-sizing: border-box; }
.bunny-demo button { font: inherit; cursor: pointer; }
.bunny-demo button:focus-visible { outline: 3px solid var(--demo-accent); outline-offset: 3px; }
.bunny-demo-intro { margin-bottom: 19px; }
.bunny-demo-intro > small { color: var(--demo-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.bunny-demo-intro > h2 { margin: 7px 0 8px; color: #202238; font-size: clamp(20px, 1.5vw, 25px); line-height: 1.35; letter-spacing: -.025em; }
.bunny-demo-intro > p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--demo-muted); }
.bunny-demo-window { overflow: hidden; border: 1px solid #d7dce5; border-radius: 14px; background: #fff; box-shadow: 0 22px 65px -22px rgba(28, 32, 73, .24), 0 2px 6px rgba(28, 32, 73, .04); }
.bunny-demo-chrome { height: 36px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #f8f9fb; border-bottom: 1px solid var(--demo-border); color: #8a94a6; font-size: 10px; }
.bunny-demo-chrome > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bunny-demo-chrome .fa-lock { margin-right: 5px; font-size: 9px; }
.bunny-demo-window-dots { display: flex; gap: 5px; }
.bunny-demo-window-dots i { width: 7px; height: 7px; background: #d5d9e1; border-radius: 50%; }
.bunny-demo-stage { height: 495px; position: relative; overflow: hidden; isolation: isolate; background: #fff; }
.bunny-demo-redmine { position: absolute; inset: 0; color: #4a5260; }
.bunny-demo-redmine-top { background: #628db6; color: #fff; height: 45px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; }
.bunny-demo-redmine-top strong { font-size: 17px; font-weight: 600; }
.bunny-demo-redmine-top i { font-size: 12px; }
.bunny-demo-redmine-project { padding: 20px 18px 15px; font-size: 18px; font-weight: 600; }
.bunny-demo-redmine-nav { display: flex; gap: 18px; padding: 0 18px; border-bottom: 1px solid #d4dbe3; font-size: 11px; }
.bunny-demo-redmine-nav span { padding-bottom: 10px; white-space: nowrap; }
.bunny-demo-redmine-nav .is-active { color: #365e83; font-weight: 600; border-bottom: 2px solid #628db6; }
.bunny-demo-workspace { padding: 18px; }
.bunny-demo-workspace h3 { color: #505b68; margin: 0 0 20px; font-size: 15px; }
.bunny-demo-table-head, .bunny-demo-issue-row { display: grid; grid-template-columns: 35px 1fr 55px; gap: 10px; align-items: center; padding: 11px 9px; font-size: 10px; border-bottom: 1px solid #e7ebef; }
.bunny-demo-table-head { background: #f3f5f7; color: #77808b; }
.bunny-demo-issue-row { display: none; }
.bunny-demo-issue-row strong { font-weight: 500; color: #4675a0; }
.bunny-demo-issue-row em { font-style: normal; color: #697684; }
.bunny-demo-empty { padding: 48px 15px; color: #a1aab8; text-align: center; }
.bunny-demo-empty > i { font-size: 28px; display: block; margin-bottom: 13px; }
.bunny-demo-empty > span { font-size: 12px; }
.bunny-demo-skeleton { height: 8px; width: 70%; margin: 23px auto -12px; background: #f0f2f5; border-radius: 5px; }
.bunny-demo-skeleton:last-child { width: 50%; }
.bunny-demo-workspace-note { display: none; margin-top: 20px; font-size: 11px; color: #338a68; }
.bunny-demo-panel { position: absolute; inset: 0 0 0 auto; width: min(400px, 78%); z-index: 2; background: #eef1f6; box-shadow: -8px 0 30px rgba(15, 23, 42, .15); display: flex; flex-direction: column; transform: translateX(0); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.bunny-demo-panel-header { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--demo-border); flex-shrink: 0; }
.bunny-demo-menu { font-size: 15px; color: #6b7688; width: 22px; flex-shrink: 0; text-align: center; }
.bunny-demo-avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--demo-accent); overflow: hidden; flex-shrink: 0; }
.bunny-demo-avatar img { width: 82%; height: 82%; object-fit: contain; }
.bunny-demo-panel-title { flex: 1; min-width: 0; }
.bunny-demo-panel-title strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.bunny-demo-panel-title small { display: block; color: #8a94a6; font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bunny-demo-panel-actions { font-size: 18px; color: #6b7688; display: flex; align-items: center; gap: 12px; }
.bunny-demo-close { width: 22px; height: 28px; padding: 0; margin: 0; border: 0; background: transparent; color: #6b7688; font-size: 24px !important; line-height: 1; }
.bunny-demo-messages { flex: 1; min-height: 0; padding: 15px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ccd3df transparent; overscroll-behavior: contain; }
.bunny-demo-welcome { text-align: center; padding: 52px 14px; }
.bunny-demo-welcome .bunny-demo-avatar { width: 64px; height: 64px; margin: 0 auto 15px; }
.bunny-demo-welcome > strong { display: block; font-size: 16px; font-weight: 600; }
.bunny-demo-welcome > p { margin: 10px auto; font-size: 13px; line-height: 1.6; color: #8a94a6; }
.bunny-demo-conversation { display: flex; flex-direction: column; gap: 12px; }
.bunny-demo-bubble { padding: 9px 13px; border-radius: 16px; font-size: 13px; line-height: 1.55; word-break: break-word; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.bunny-demo-bubble p { margin: 0; font: inherit; color: inherit; }
.bunny-demo-bubble.is-user { align-self: flex-end; max-width: 85%; background: var(--demo-accent); color: #fff; border-bottom-right-radius: 5px; }
.bunny-demo-bubble.is-assistant { align-self: flex-start; max-width: 96%; background: #fff; color: var(--demo-ink); border: 1px solid var(--demo-border); border-bottom-left-radius: 5px; }
.bunny-demo-file { display: flex; gap: 6px; align-items: center; width: fit-content; padding: 5px 8px; margin-top: 8px; border-radius: 7px; font-size: 11px; background: rgba(255,255,255,.15); }
.bunny-demo-thinking { display: none; align-items: center; gap: 5px; align-self: flex-start; padding: 12px 14px; border-radius: 16px; border-bottom-left-radius: 5px; background: #fff; }
.bunny-demo-thinking span { width: 7px; height: 7px; border-radius: 50%; background: #9aa4b5; animation: bunny-demo-bounce 1.2s ease-in-out infinite; }
.bunny-demo-thinking span:nth-child(2) { animation-delay: .15s; }
.bunny-demo-thinking span:nth-child(3) { animation-delay: .3s; }
.bunny-demo-response { display: flex; flex-direction: column; gap: 12px; }
.bunny-demo-tools { display: flex; flex-direction: column; gap: 8px; }
.bunny-demo-tool { background: #f4f6fb; border: 1px solid #dbe2f0; padding: 9px 11px; border-radius: 12px; max-width: 96%; }
.bunny-demo-tool > div { display: flex; gap: 6px; align-items: center; }
.bunny-demo-tool i { font-size: 10px; color: #778397; }
.bunny-demo-tool code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 11px 'SFMono-Regular', Consolas, monospace; color: #3b4657; background: transparent; padding: 0; }
.bunny-demo-tool > div > span { background: #dcfce7; color: #166534; padding: 2px 7px; border-radius: 999px; font-size: 9px; white-space: nowrap; }
.bunny-demo-tool > p { font-size: 11px; color: #6b7688; margin: 6px 0 0; line-height: 1.5; }
.bunny-demo-result > strong { display: block; font-weight: 600; margin-bottom: 5px; }
.bunny-demo-review { display: flex; gap: 6px; align-items: center; padding-top: 10px; margin-top: 10px; border-top: 1px solid #edf0f4; color: #33816b; font-size: 11px; font-weight: 600; }
.bunny-demo-composer { border-top: 1px solid var(--demo-border); background: #fff; padding: 10px 12px 12px; flex-shrink: 0; }
.bunny-demo-input-wrap { display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #dde3ec; border-radius: 14px; padding: 6px 6px 6px 10px; background: #fff; }
.bunny-demo-input-wrap > i { font-size: 16px; color: #8a94a6; width: 23px; flex-shrink: 0; }
.bunny-demo-input-wrap > div { flex: 1; min-width: 0; font-size: 12px; line-height: 1.4; max-height: 100px; overflow: hidden; }
.bunny-demo-placeholder { white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; color: #9aa4b5; }
.bunny-demo-typing { display: none; }
.bunny-demo-typing::after { content: ''; display: inline-block; height: 12px; width: 1px; margin-left: 2px; background: var(--demo-accent); vertical-align: middle; animation: bunny-demo-caret .8s step-end infinite; }
.bunny-demo-send { display: flex; justify-content: center; align-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--demo-accent); color: #fff; flex-shrink: 0; font-size: 14px; }
.bunny-demo-composer > small { display: block; color: #8a94a6; font-size: 9px; margin-top: 8px; text-align: center; line-height: 1.4; }
.bunny-demo-composer > small > i { margin-right: 3px; }
.bunny-demo-fab { position: absolute; right: 18px; bottom: 18px; z-index: 3; padding: 0; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--demo-accent); box-shadow: 0 6px 18px rgba(15,23,42,.28); display: flex; align-items: center; justify-content: center; transition: transform .2s, opacity .2s; }
.bunny-demo-fab img { width: 86%; height: 86%; object-fit: contain; }
.bunny-demo-pointer { display: none; position: absolute; right: 28px; bottom: 34px; z-index: 4; color: #253045; filter: drop-shadow(0 1px 0 #fff) drop-shadow(1px 0 0 #fff); font-size: 22px; pointer-events: none; }
.bunny-demo-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 1px; }
.bunny-demo-example { display: inline-flex; gap: 6px; align-items: center; font-size: 10px; color: #8a94a6; }
.bunny-demo-example > span { width: 5px; height: 5px; background: var(--demo-accent); border-radius: 50%; flex-shrink: 0; }
.bunny-demo-controls > div { display: flex; gap: 12px; }
.bunny-demo-controls button { display: inline-flex; gap: 5px; align-items: center; padding: 4px 0; background: transparent; border: 0; color: #6b7688; font-size: 11px; }
.bunny-demo-controls button > i { font-size: 9px; }
.bunny-demo-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.bunny-demo-steps button { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; padding: 9px 0 0; border: 0; border-top: 2px solid #dfe2ec; background: transparent; color: #8a94a6; font-size: 11px; font-weight: 500; text-align: start; line-height: 1.5; transition: color .2s, border-color .2s; }
.bunny-demo-steps button > span { font-size: 9px; letter-spacing: .05em; }
.bunny-demo-steps button[aria-current="step"] { border-color: var(--demo-accent); color: #a34733; }
.bunny-demo-caption { position: relative; margin: 12px 0 0; min-height: 38px; font-size: 12px; line-height: 1.6; color: #6b7688; }
.bunny-demo-caption > span { display: none; }
.bunny-demo[data-stage="0"] [data-demo-caption="0"], .bunny-demo[data-stage="1"] [data-demo-caption="1"], .bunny-demo[data-stage="2"] [data-demo-caption="2"], .bunny-demo[data-stage="3"] [data-demo-caption="3"] { display: block; }
.bunny-demo .bunny-demo-fab { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.8); }
.bunny-demo .bunny-demo-welcome { display: none; }
.bunny-demo[data-stage="0"] .bunny-demo-fab { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); animation: bunny-demo-fab-pulse 2s ease-in-out infinite; }
.bunny-demo[data-stage="0"] .bunny-demo-panel { transform: translateX(105%); }
.bunny-demo[data-stage="0"] .bunny-demo-pointer { display: block; animation: bunny-demo-pointer 2.2s ease-in-out infinite; }
.bunny-demo[data-stage="0"] .bunny-demo-conversation, .bunny-demo[data-stage="1"] .bunny-demo-conversation { display: none; }
.bunny-demo[data-stage="1"] .bunny-demo-welcome { display: block; }
.bunny-demo[data-stage="1"] .bunny-demo-placeholder { display: none; }
.bunny-demo[data-stage="1"] .bunny-demo-typing { display: inline; }
.bunny-demo[data-stage="1"] .bunny-demo-input-wrap { border-color: var(--demo-accent); }
.bunny-demo[data-stage="2"] .bunny-demo-result { display: none; }
/* Keep the bubble's geometry stable until the assistant actually starts replying. */
.bunny-demo[data-stage="2"][data-response-ready="false"] .bunny-demo-thinking { display: flex; }
.bunny-demo[data-stage="2"] .bunny-demo-response { animation: bunny-demo-reveal .45s 1.4s both; }
.bunny-demo[data-stage="2"] .bunny-demo-tool { animation: bunny-demo-reveal .45s calc(1.4s + var(--tool-delay)) both; }
.bunny-demo[data-stage="2"] .bunny-demo-issue-row, .bunny-demo[data-stage="3"] .bunny-demo-issue-row { display: grid; }
.bunny-demo[data-stage="2"] .bunny-demo-issue-row { animation: bunny-demo-reveal .4s var(--row-delay) both; }
.bunny-demo[data-stage="2"] .bunny-demo-empty, .bunny-demo[data-stage="3"] .bunny-demo-empty { display: none; }
.bunny-demo[data-stage="3"] .bunny-demo-workspace-note { display: block; }
.bunny-demo[data-stage="3"] .bunny-demo-result { animation: bunny-demo-reveal .45s both; }
.bunny-demo[data-motion-paused="true"] *, .bunny-demo[data-motion-paused="true"] *::after { animation-play-state: paused !important; }
@keyframes bunny-demo-reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bunny-demo-bounce { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes bunny-demo-caret { 50% { opacity: 0; } }
@keyframes bunny-demo-fab-pulse { 50% { box-shadow: 0 0 0 7px rgba(208,99,75,.1), 0 6px 18px rgba(15,23,42,.28); } }
@keyframes bunny-demo-pointer { 0%,20% { transform: translate(10px,14px); opacity: 0; } 45%,80% { transform: translate(0,0); opacity: 1; } 100% { transform: translate(0,0); opacity: 0; } }
@media (max-width: 1100px) and (min-width: 641px) {
    .bunny-demo-panel { width: 65%; max-width: 450px; }
}
@media (max-width: 640px) {
    .bunny-demo-intro > h2 { font-size: 21px; }
    .bunny-demo-panel { width: 100%; }
    .bunny-demo-stage { height: 490px; }
    .bunny-demo-chrome { font-size: 9px; gap: 10px; }
    .bunny-demo-panel-header { gap: 6px; }
    .bunny-demo-bubble { font-size: 13px; }
    .bunny-demo-panel-title strong { font-size: 15px; }
    .bunny-demo-steps { gap: 6px; }
    .bunny-demo-steps button { font-size: 10px; }
    .bunny-demo-controls > div { gap: 10px; }
    .bunny-demo-example { font-size: 9px; }
    .bunny-demo-caption { min-height: 40px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .bunny-demo *, .bunny-demo *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
