/* Aano AI mobile composer inline fix
   Goal: make mobile composer look like the compact single-row pill
   shown in the target screenshot. Desktop remains unchanged. */

@media (max-width: 768px) {

  .composer-wrap{
    width: calc(100% - 16px) !important;
    max-width: none !important;
    margin: 0 8px calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    padding: 0 !important;
    position: sticky !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
    background: transparent !important;
  }

  #chatForm.composer{
    display: grid !important;
    grid-template-columns: 28px minmax(0,1fr) 34px 34px !important;
    grid-template-areas: "plus input voice send" !important;
    align-items: center !important;
    gap: 10px !important;

    width: 100% !important;
    min-height: 52px !important;
    padding: 10px 12px !important;
    border-radius: 24px !important;
    border: 1px solid #dbe4f0 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(21, 40, 79, 0.08) !important;
    overflow: hidden !important;
  }

  /* flatten bottom toolbar into the same grid row */
  #chatForm.composer .composer-bottom{
    display: contents !important;
  }

  /* hide desktop-only / extra items on mobile */
  #chatForm.composer .inline-model-selector,
  #chatForm.composer #speakAnswer,
  #chatForm.composer #removeFile,
  #chatForm.composer #usage,
  #chatForm.composer #stop,
  .footnote{
    display: none !important;
  }

  /* plus button */
  #chatForm.composer .file-button{
    grid-area: plus !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #2f69c9 !important;
    box-shadow: none !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }

  #chatForm.composer .file-button span{
    display: inline-block !important;
    transform: translateY(-1px) !important;
  }

  /* input */
  #chatForm.composer #prompt{
    grid-area: input !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    resize: none !important;
    overflow: auto !important;

    min-height: 24px !important;
    height: 24px !important;
    max-height: 96px !important;

    font-size: 16px !important;
    line-height: 24px !important;
    color: #1e355d !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  #chatForm.composer #prompt::placeholder{
    color: #6f7f98 !important;
    opacity: 1 !important;
  }

  /* voice */
  #chatForm.composer #voiceInput{
    grid-area: voice !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid #d8e0eb !important;
    background: #ffffff !important;
    color: #1e355d !important;
    box-shadow: none !important;
    flex: none !important;
  }

  /* send */
  #chatForm.composer #send{
    grid-area: send !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 0 !important;
    background: #2f73e0 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    flex: none !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  /* expanded typing still allowed */
  #chatForm.composer.aano-expanded #prompt{
    height: auto !important;
    min-height: 24px !important;
    max-height: 96px !important;
  }

  /* avoid giant empty area around the bar */
  .composer-area,
  .composer-shell,
  .composer-host{
    min-height: 0 !important;
  }
}
/* Phase 8.1 — compact mobile options alignment */
@media (max-width: 768px) {
  #chatForm.composer {
    grid-template-columns: 26px minmax(0,1fr) 30px 30px 30px !important;
    grid-template-areas: "plus input options voice send" !important;
    gap: 5px !important;
    padding: 7px 9px !important;
    min-height: 48px !important;
  }

  #chatForm .composer-bottom {
    display: contents !important;
  }

  #chatForm .aano-phase8-options-button,
  #chatForm .aano-mobile-options-button,
  #chatForm .aano-gemini-compact-trigger {
    grid-area: options !important;
    align-self: center !important;
    justify-self: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #chatForm .file-button { grid-area: plus !important; }
  #chatForm #prompt { grid-area: input !important; }
  #chatForm #voiceInput { grid-area: voice !important; }
  #chatForm #send { grid-area: send !important; }
}