/* J-Bot Android Remote Control: one quiet command rail, one contextual sheet. */

.jbot-remote-rail,
.jbot-remote-backdrop,
.jbot-room-subtitle,
.jbot-work-more {
  display: none;
}

body.jbot-android-app:not(.twilight-mini-mode) {
  --jbot-mobile-nav-h: calc(58px + env(safe-area-inset-bottom));
}

/* Local-only apkpreview mode is a visual harness, not an authenticated app. */
body.jbot-apk-preview #auth-gate {
  display: none !important;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-rail {
  display: grid;
  gap: 7px;
  margin: 0 0 7px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  padding: 5px 7px 5px 8px;
  border: 1px solid rgba(118, 163, 187, .2);
  border-radius: 9px;
  background: rgba(10, 17, 23, .9);
  color: #e9f4f8;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger:focus-visible {
  outline: 2px solid rgba(50, 210, 234, .72);
  outline-offset: 2px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sprite {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(92, 240, 255, .18);
  border-radius: 11px;
  background: radial-gradient(circle at 50% 35%, rgba(34, 211, 238, .12), rgba(5, 12, 18, .82) 68%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025), 0 0 12px rgba(34, 211, 238, .05);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sprite svg {
  width: 31px;
  height: 31px;
  overflow: visible;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-eye,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-smile,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-antenna-tip {
  transition: fill 140ms ease, stroke 140ms ease, opacity 140ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-answer="pixel"][data-state="idle"] .jbot-remote-antenna-tip {
  fill: #b7a3f8;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="listening"] .jbot-remote-sprite {
  border-color: rgba(183, 163, 248, .56);
  box-shadow: 0 0 0 3px rgba(183, 163, 248, .08), 0 0 18px rgba(183, 163, 248, .14);
  animation: jbot-remote-listen 880ms ease-in-out infinite alternate;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="working"] .jbot-remote-sprite {
  border-color: rgba(92, 240, 255, .5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .08), 0 0 18px rgba(34, 211, 238, .14);
  animation: jbot-remote-work 1150ms ease-in-out infinite;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="working"] .jbot-remote-eye-left {
  animation: jbot-remote-eye-think-left 950ms ease-in-out infinite alternate;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="working"] .jbot-remote-eye-right {
  animation: jbot-remote-eye-think-right 950ms ease-in-out infinite alternate;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="review"] {
  border-color: rgba(240, 182, 77, .36);
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="review"] .jbot-remote-sprite {
  border-color: rgba(240, 182, 77, .62);
  box-shadow: 0 0 0 3px rgba(240, 182, 77, .08), 0 0 18px rgba(240, 182, 77, .12);
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="review"] .jbot-remote-eye,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="review"] .jbot-remote-antenna-tip {
  fill: #f0b64d;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="review"] .jbot-remote-smile {
  stroke: #f0b64d;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="complete"] .jbot-remote-sprite {
  border-color: rgba(74, 222, 128, .58);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .08), 0 0 18px rgba(74, 222, 128, .12);
  transform: translateY(-1px);
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="complete"] .jbot-remote-eye,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="complete"] .jbot-remote-antenna-tip {
  fill: #4ade80;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state="complete"] .jbot-remote-smile {
  stroke: #4ade80;
}

@keyframes jbot-remote-listen {
  from { transform: scale(.97); }
  to { transform: scale(1.03); }
}

@keyframes jbot-remote-work {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}

@keyframes jbot-remote-eye-think-left {
  from { transform: translateY(-1px); }
  to { transform: translateY(1px); }
}

@keyframes jbot-remote-eye-think-right {
  from { transform: translateY(1px); }
  to { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state] .jbot-remote-sprite,
  body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-trigger[data-state] .jbot-remote-eye {
    animation: none;
  }
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-copy strong,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-copy strong {
  font: 650 12px/1.1 "IBM Plex Sans", "Segoe UI", sans-serif;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-copy em {
  color: #7f939e;
  font: 500 10px/1.1 "IBM Plex Sans", "Segoe UI", sans-serif;
  font-style: normal;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-tune {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(118, 163, 187, .16);
  color: #8ea4af;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-tune svg,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-live {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-live.is-visible {
  display: grid;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-live > button {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  font: 650 12px/1 "IBM Plex Sans", "Segoe UI", sans-serif;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-live > button:only-of-type,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-live > .device-ai-action {
  grid-column: 1 / -1;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-live .device-ai-action {
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid rgba(50, 210, 234, .2);
  border-radius: 8px;
  background: rgba(8, 22, 29, .82);
}

body.jbot-android-app:not(.twilight-mini-mode) .local-voice-action.is-remote-owned,
body.jbot-android-app:not(.twilight-mini-mode) .edge-chat-action.is-remote-owned {
  display: none !important;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-backdrop:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  align-items: end;
  background: rgba(2, 6, 9, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sheet {
  width: min(100%, 560px);
  max-height: min(78dvh, 660px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgba(118, 163, 187, .22);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #0a1218;
  box-shadow: 0 -20px 54px rgba(0, 0, 0, .48);
  color: #edf7fb;
  animation: jbot-remote-rise 160ms ease-out;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sheet > header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sheet > header span {
  color: #6f8795;
  font: 600 10px/1.2 "JetBrains Mono", monospace;
  text-transform: uppercase;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-sheet h2 {
  margin: 3px 0 0;
  font: 650 21px/1.1 "IBM Plex Sans", "Segoe UI", sans-serif;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border: 1px solid rgba(118, 163, 187, .2);
  border-radius: 11px;
  background: #101b23;
  color: #c7d6de;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-section {
  display: grid;
  gap: 11px;
  padding: 16px 0;
  border-top: 1px solid rgba(118, 163, 187, .16);
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-section-head {
  display: grid;
  gap: 4px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-section-head strong {
  font-size: 14px;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-section-head span,
body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-foot {
  color: #8498a4;
  font-size: 12px;
  line-height: 1.45;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-answer-slot,
body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-voice-slot {
  display: grid;
  gap: 10px;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-answer-slot label,
body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-voice-slot label {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(118, 163, 187, .18);
  border-radius: 9px;
  background: #0e1921;
  color: #dce9ef;
  font: 600 12px/1.2 "IBM Plex Sans", "Segoe UI", sans-serif;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-answer-slot select,
body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-voice-slot select {
  min-height: 34px;
  max-width: 160px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(50, 210, 234, .28);
  border-radius: 7px;
  background: #08131a;
  color: #9cebf5;
  font: inherit;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-voice-slot input {
  width: 20px;
  height: 20px;
  margin-left: auto;
  accent-color: #32d2ea;
}

body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-answer-slot .edge-chat-status,
body.jbot-android-app:not(.twilight-mini-mode) #jbot-remote-voice-slot .local-voice-status {
  min-height: 18px;
  padding: 0 2px;
  overflow: visible;
  color: #7f939f;
  font-size: 11px;
  white-space: normal;
}

body.jbot-android-app:not(.twilight-mini-mode) .jbot-remote-foot {
  margin: 2px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(74, 222, 128, .16);
  border-radius: 9px;
  background: rgba(74, 222, 128, .045);
}

@keyframes jbot-remote-rise {
  from { transform: translateY(18px); opacity: .72; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 767px) {
  body.jbot-apk-preview.pro-operator-enabled:has(#auth-gate) #operator-mobile-nav {
    display: grid !important;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .topbar {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #sidebar-toggle,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #topbar-model-chip,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #context-health-chip {
    display: none !important;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-mobile-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-mobile-nav [data-operator-destination="knowledge"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-mobile-nav [data-operator-destination="settings"] {
    display: none !important;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .chat-panel.operator-panel {
    padding: max(12px, env(safe-area-inset-top)) 14px 22px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-panel .chat-panel-header {
    min-height: 72px;
    align-items: flex-start;
    gap: 10px;
    margin: -12px -14px 0;
    padding: max(14px, env(safe-area-inset-top)) 14px 12px;
    border-bottom: 1px solid rgba(118, 163, 187, .16);
    background: rgba(7, 16, 24, .97);
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-panel .chat-panel-header h2 {
    margin-top: 1px;
    font-size: 24px;
    line-height: 1.05;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-panel .menu-eyebrow {
    display: none;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .jbot-room-subtitle {
    display: block;
    margin: 5px 0 0;
    color: #7f939f;
    font-size: 11px;
    line-height: 1.3;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .chat-panel-header-actions {
    gap: 7px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .chat-panel-header-actions [data-operator-refresh] {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .chat-panel-header-actions [data-operator-refresh]::before {
    content: "↻";
    color: #9fb1ba;
    font-size: 19px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .chat-panel-close,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #operator-ops-new-toggle {
    min-width: 42px;
    min-height: 42px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #operator-ops-new-toggle > span:last-child {
    display: none;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-filter-row {
    position: sticky;
    top: 72px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 0 -2px 14px;
    padding: 10px 2px;
    background: var(--operator-bg);
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-filter-row button {
    min-width: 0;
    min-height: 40px;
    padding: 0 6px;
    border-radius: 8px;
    white-space: nowrap;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="chats"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="dev"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="vault"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="builds"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="missions"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="artifacts"],
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row [data-work-filter="policies"] {
    display: none;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) #panel-recent-work .operator-filter-row.is-expanded [data-work-filter] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .jbot-work-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-next-action {
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 11px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-list,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-review-view {
    display: grid;
    gap: 10px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-list-item,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-review-row,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-nano-review,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-grouped-review {
    border-radius: 11px;
  }

  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-row-action,
  body.jbot-android-app.pro-chatroom.pro-operator-enabled:not(.twilight-mini-mode) .operator-primary-action {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jbot-android-app .jbot-remote-sheet {
    animation: none;
  }
}
