/* Shared Album/Media geometry, after legacy module and mobile overrides. */
/* Content-driven footers: no reserved blank caption rows. */
:is(#album-media-layout#album-media-content, body) .profile-page--media
:is(.media-post-card__body, .media-album-card__body) {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 10px 14px !important;
  gap: 4px !important;
}
:is(#album-media-layout#album-media-content, body) .profile-page--media
:is(.media-post-card__caption, .media-post-card__meta, .media-album-card__meta) {
  font-weight: 400 !important;
}
:is(#album-media-layout#album-media-content, body)
:is(.detail-page-shell--media, .detail-page-shell--album) :is(.blog-post-header, .detail-uploader-row) {
  height: auto !important;
  min-height: 0 !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  gap: 8px !important;
}
:is(#album-media-layout#album-media-content, body)
:is(.detail-page-shell--media, .detail-page-shell--album) .detail-media-card__uploader {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
:is(#album-media-layout#album-media-content, body)
:is(.detail-page-shell--media, .detail-page-shell--album) .blog-post-uploader-type {
  margin-top: 2px !important;
}
.media-move-modal__actions {
  flex-direction: row !important;
  justify-content: center !important;
}
:root:not(#square-corner-policy-1):not(#square-corner-policy-2):not(#square-corner-policy-3):not(#square-corner-policy-4)
:is(.album-create-form .album-media-action-card, .media-move-modal__input, .media-move-modal__select) {
  border-radius: var(--ui-radius-control, 14px) !important;
}
@media (max-width: 759px) {
  :is(#album-media-layout#album-media-content, body) .profile-page--media
  :is(.media-post-card__body, .media-album-card__body) {
    flex: 0 0 auto !important;
  }
}

:is(#album-media-layout#album-media-titles, body) :is(.album-page-title, .media-detail-album-title, .album-page-title__link) {
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #111827 !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  overflow: visible !important;
  text-overflow: clip !important;
  text-decoration: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
:is(#album-media-layout#album-media-titles, body) :is(.album-page-header__copy, .album-page-title-row, .media-detail-album-title-row, .media-detail-album-title-row .profile-section-title-row) {
  min-width: 0 !important;
  overflow: visible !important;
  height: auto !important;
}
:is(#album-media-layout#album-media-navigation, body)
:is(.detail-page-shell--media, .detail-page-shell--album, .detail-page-shell--athletic-card-media)
[data-ms-media-navigation][data-ms-media-navigation-mode="detail"] {
  display: grid !important;
  grid-template-columns: max-content max-content max-content !important;
  justify-content: center !important;
  align-items: center !important;
  column-gap: 32px !important;
  margin: 0 !important;
  padding: 2px 12px !important;
  border: 0 !important;
  background: #fff !important;
}
/* Keep adjacent media and information panels connected, preserving inner gutters. */
:is(#album-media-layout#album-media-content, body) .detail-page-shell--media {
  row-gap: 0 !important;
}
:is(#album-media-layout#album-media-content, body) .detail-page-shell--media
:is(.article-post-card--media-detail, .article-post-card--media-interaction, .media-detail-media-frame, .food-journal-detail-media-stage, .media-caption-block) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
}

/* Media/Album cards grow with their content, not a reserved footer footprint. */
:is(#album-media-layout#album-media-content, body) .profile-page--media
:is(.media-post-card, .media-album-card) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
}
