/* Conversation occupies the phone; secondary controls retain their original
   accessible menus. Desktop and the other workshops keep their own layouts. */
#chat-settings-tools > .notification-task {
  margin: 0 0 16px; padding: 14px; border: 1px solid var(--ui-divider);
  border-radius: 12px; color: var(--ui-text); font-size: 14px;
}
@media (max-width:760px),(max-height:500px) and (pointer:coarse){
  body[data-chat-mobile] > .phone {
    position: fixed; inset-inline: 0; top: var(--chat-visible-top,0px);
    height: var(--chat-visible-height,100dvh); min-height: 0; max-width: none;
  }
  body[data-chat-mobile] #appTopbar.common-header { --top: 56px; }
  body[data-chat-mobile] #appTopbar .common-header-inner { padding-inline: 12px; gap: 6px; }
  body[data-chat-mobile] #appTopbar .common-brand-copy { font-size: 19px; color: var(--ui-text); }
  body[data-chat-mobile] #appTopbar .common-brand-copy small,
  body[data-chat-mobile] #appTopbar #workspacePayer,
  body[data-chat-mobile] #appTopbar #pillBalanceTnd,
  body[data-chat-mobile] #appTopbar .common-credit > svg { display: none; }
  body[data-chat-mobile] #appTopbar .common-brand-symbol { height: 32px; width: 23px; flex-basis: 23px; }
  body[data-chat-mobile] #appTopbar .common-credit { min-width: 0; padding: 8px 6px; }
  body[data-chat-mobile] #appTopbar :is(.notification-bell,.common-menu-toggle) { border-color: transparent; background: transparent; }
  body[data-chat-mobile] > .phone > main { padding: 0 !important; overflow: hidden; background: var(--ui-bg); }
  body[data-chat-mobile] #s-chat { height: 100%; }
  body[data-chat-mobile] #s-chat .chat-main {
    border: 0; border-radius: 0; padding: 4px 12px 8px; box-shadow: none;
  }
  body[data-chat-mobile] #s-chat .chat-main-head {
    display: grid; grid-template-columns: 44px minmax(0,1fr) 44px 44px;
    align-items: center; gap: 2px; margin: 0; min-height: 48px; flex: none;
  }
  body[data-chat-mobile] #s-chat .chat-main-head > .chat-main-title { display: none; }
  body[data-chat-mobile] #s-chat .chat-main-head :is(#toggleChatHistory,#newChat,#chatMoreButton) {
    width: 44px; min-width: 44px; height: 44px; min-height: 44px;
    border: 0; border-radius: 10px; padding: 0; background: transparent;
  }
  body[data-chat-mobile] #s-chat .chat-main-head > .chat-model-card {
    display: block; min-width: 0; padding: 0 !important; margin: 0 !important; border: 0;
  }
  body[data-chat-mobile] #s-chat .chat-model-card .provider-picker-trigger {
    width: 100%; min-width: 0; min-height: 44px; gap: 5px; padding: 5px;
  }
  body[data-chat-mobile] #s-chat .chat-model-card .provider-picker-copy { min-width: 0; }
  body[data-chat-mobile] #s-chat .chat-model-card .provider-picker-copy strong { font-size: 14px; }
  body[data-chat-mobile] #s-chat .chat-model-card .provider-picker-logo { display: none; }
  body[data-chat-mobile] #s-chat .chat-model-card .provider-picker-chevron { width: 16px; flex: none; }
  #chatMoreDialog .chat-mobile-action {
    display: flex; align-items: center; width: 100%; max-width: none; min-height: 48px;
    padding: 10px 12px; margin: 0; font: inherit; text-align: start;
    border: 0; border-radius: 10px; background: transparent; color: var(--ui-text);
  }
  #chatMoreDialog .chat-mobile-action:hover { background: var(--ui-surface-raised); }
  body[data-chat-mobile] #s-chat #chatLog { padding: 16px 2px; scrollbar-gutter: auto; }
  body[data-chat-mobile] #s-chat #chatLog > .empty { padding: 12px; gap: 14px; overflow: auto; }
  body[data-chat-mobile] #s-chat .cx-empty-title { font-size: 25px; line-height: 1.2; margin: 0; }
  body[data-chat-mobile] #s-chat #chatLog > .empty > .hint { display: none; }
  body[data-chat-mobile] #s-chat .cx-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }
  body[data-chat-mobile] #s-chat .cx-starters button { min-height: 44px; font-size: 12px !important; padding: 8px 12px; }
  body[data-chat-mobile] #s-chat .cx-starters button:last-child { display: none; }
  body[data-chat-mobile] #s-chat .chat-main > .chat-composer {
    padding: 6px 8px !important; border-radius: 24px; border: 1px solid var(--ui-control-border);
    box-shadow: none; flex: none;
  }
  html[data-ui] body[data-chat-mobile] #s-chat #chatInput {
    min-height: 44px; max-height: min(120px,25dvh); padding: 10px 12px; line-height: 1.5;
  }
  body[data-chat-mobile] #s-chat .chat-compose-toolbar { gap: 8px; margin: 0; padding: 0; }
  body[data-chat-mobile] #s-chat .chat-compose-tools { gap: 8px; }
  html[data-ui] body[data-chat-mobile] #s-chat #chatWebToggle {
    display: inline-grid; place-items: center; width: 44px; min-width: 44px; max-width: 44px;
    height: 44px; padding: 0; border: 0; font-size: 0 !important; background: transparent;
    color: var(--ui-text-muted); border-radius: 50%; flex: 0 0 44px;
  }
  html[data-ui] body[data-chat-mobile] #s-chat #chatWebToggle[aria-pressed=true] {
    background: var(--brand-soft); color: var(--ui-link);
  }
  body[data-chat-mobile] #chatWebToggle::before {
    content: ''; display: block; width: 21px; height: 21px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  body[data-chat-mobile] #s-chat .chat-compose-send { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; }
  body[data-chat-mobile] #s-chat .chat-attach-list { max-height: 96px; overflow-y: auto; overscroll-behavior: contain; }
  body[data-chat-mobile] #s-chat .cx-composer-foot { font-size: 12px; color: var(--ui-text-muted); padding-top: 0; }
  body[data-chat-mobile] #s-chat .cx-composer-foot > span { display: none; }
  body[data-chat-mobile] #s-chat .cx-composer-foot button { font-size: 12px !important; min-height: 44px; padding-inline: 12px; }
  body[data-chat-mobile] #s-chat #chatMsg:not(:empty) { max-height: 96px; overflow: auto; font-size: 13px; }
  /* While typing, temporarily free the application chrome. The workshop bar
     returns to the bottom as soon as the keyboard closes; never move it up. */
  body[data-chat-keyboard] #appTopbar.common-header,
  body[data-chat-keyboard] #tabbar { display: none !important; }
  body[data-chat-keyboard] #s-chat .cx-composer-foot { display: none; }
  body[data-chat-keyboard] #s-chat .chat-main { padding-bottom: max(8px,env(safe-area-inset-bottom)); }
}
