
/* AP Synapse Mobile Message Alignment V4 */
/* Only mobile chat and Share-dialog controls. */

@media screen and (max-width: 767px) {

  #chatWindow .message.ai
  .message-body > .ap-response-actions {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: flex-start !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 6px 0 0 !important;
    padding: 3px !important;
    gap: 5px !important;
    border-radius: 11px !important;
    box-shadow: none !important;
  }

  #chatWindow .message.ai
  .message-body > .ap-response-actions > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    padding: 4px !important;
    margin: 0 !important;
    border-radius: 9px !important;
  }

  #chatWindow .message.ai
  .message-body > .ap-response-actions
  .ap-action-label {
    display: none !important;
  }

  /* Actual Share conversation close button */
  #apShareV2Backdrop .ap-share-panel > header >
  button.ap-share-close[data-action="close"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    font: 400 25px/1 Arial, sans-serif !important;
    color: #e8d3a2 !important;
    -webkit-text-fill-color: #e8d3a2 !important;
    text-shadow: none !important;
  }

  #apShareV2Backdrop .ap-share-panel > header >
  button.ap-share-close[data-action="close"]::before,
  #apShareV2Backdrop .ap-share-panel > header >
  button.ap-share-close[data-action="close"]::after {
    content: none !important;
    display: none !important;
  }
}


/* AP SYNAPSE COMPACT MESSAGE CONTROLS V5 */
/* Mobile chat actions only. */

@media screen and (max-width: 767px) {

  #chatWindow .message.user .ap-user-message-actions,
  #chatWindow .user-message .ap-user-message-actions,
  #chatWindow .message.ai .message-body > .ap-response-actions {
    gap: 4px !important;
    padding: 2px !important;
    margin-top: 4px !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
  }

  #chatWindow .message.user .ap-user-message-actions > button,
  #chatWindow .user-message .ap-user-message-actions > button,
  #chatWindow .message.ai .message-body > .ap-response-actions > button {
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    padding: 5px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(185,150,82,.22) !important;
    background: rgba(255,255,255,.025) !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: .88 !important;
  }

  #chatWindow .ap-user-message-actions > button svg,
  #chatWindow .ap-response-actions > button svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
  }

  #chatWindow .ap-user-message-actions > button:hover,
  #chatWindow .ap-response-actions > button:hover,
  #chatWindow .ap-user-message-actions > button:focus-visible,
  #chatWindow .ap-response-actions > button:focus-visible {
    background: rgba(185,150,82,.10) !important;
    border-color: rgba(185,150,82,.48) !important;
    opacity: 1 !important;
  }
}
