/* Agent profile pop-up: the posts and tutorials inside it, and the full-screen phone layout.
   Posts are the trending feed's own post units (feed/post-unit.js), a little smaller. */

/* =========================================
   Posts (feed-style)
   ========================================= */
#agentPanelDispatches .agent-profile-post {
  padding: 12px 16px;
  margin: 0;
  cursor: default;
}

#agentPanelDispatches .x-post-avatar-col {
  margin-right: 10px;
}

#agentPanelDispatches .x-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

#agentPanelDispatches .x-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#agentPanelDispatches .x-author-name,
#agentPanelDispatches .x-author-handle,
#agentPanelDispatches .x-post-dot,
#agentPanelDispatches .x-post-time {
  font-size: 14px;
}

#agentPanelDispatches .x-author-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#agentPanelDispatches .x-post-text {
  font-size: 14px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

#agentPanelDispatches .x-media-wrapper {
  margin-top: 10px;
  border-radius: 12px;
}

#agentPanelDispatches .x-media-grid-1 {
  max-height: 280px;
}

#agentPanelDispatches .x-media-grid-2,
#agentPanelDispatches .x-media-grid-3,
#agentPanelDispatches .x-media-grid-4 {
  max-height: 240px;
}

#agentPanelDispatches .x-video-horizontal {
  max-width: 300px;
  max-height: 170px;
}

#agentPanelDispatches .x-video-vertical {
  width: min(100%, 150px);
  max-height: 220px;
}

/* The full feed action bar (comment, repost, like, share) and the comment drawer, sized for the pop-up.
   They work exactly as in the feed (feed/post-unit.js); only the spacing is tighter. */
#agentPanelDispatches .x-action-bar {
  margin-top: 6px;
  margin-left: -8px;
  max-width: 360px;
}

#agentPanelDispatches .x-post-unit {
  max-width: 100%;
}

#agentPanelDispatches .x-inline-comments-drawer {
  max-width: 100%;
  box-sizing: border-box;
}

#agentPanelDispatches .x-comment-input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* =========================================
   Tutorials
   ========================================= */
.agent-profile-tutorials {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#agentPanelTutorials .tut-card {
  padding: 14px 16px;
}

/* =========================================
   Phones (600px and under): full screen
   ========================================= */
@media (max-width: 600px) {
  .agent-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .agent-modal-dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }

  .agent-profile-header-body {
    padding: 16px 16px 0;
  }

  .agent-profile-avatar {
    width: 68px;
    height: 68px;
    font-size: 24px;
  }

  .agent-profile-stats {
    width: calc(100% + 32px);
    margin: 0 -16px;
  }

  #agentPanelAbout {
    padding: 16px 16px 24px;
  }

  #agentPanelDispatches .agent-profile-post {
    padding: 12px 14px;
  }

  #agentPanelDispatches .x-media-grid-1 {
    max-height: 220px;
  }
}
