/* .116: reproduced modal/header conflicts only; .115 remains the design baseline. */
/* H-01/H-02: size these cards against the padded overlay, not the viewport.
   Other modal families retain their existing .115/.116 rules. */
body.packero-v3826115 #veloraModal:has(> .hp-help-center-card-v382675),
body.packero-v3826115 #veloraModal:has(.hp-edit-profile-v331) {
  padding: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.packero-v3826115 #veloraModal > .hp-help-center-card-v382675,
body.packero-v3826115 #veloraModal > .hp-modal-card:has(.hp-edit-profile-v331) {
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 24px) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
body.packero-v3826115 #veloraModal > .hp-help-center-card-v382675 {
  width: min(1080px, 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body.packero-v3826115 #veloraModal > .hp-help-center-card-v382675 > #modalBody {
  min-height: 0 !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}
body.packero-v3826115 #veloraModal > .hp-modal-card:has(.hp-edit-profile-v331) {
  width: min(820px, 100%) !important;
  height: min(900px, calc(100dvh - 24px)) !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body.packero-v3826115 #veloraModal > .hp-modal-card:has(.hp-edit-profile-v331) > #modalBody {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
/* The profile cover is positioned; keep the close control above that cover. */
body.packero-v3826115 #veloraModal > .hp-modal-card:has(.hp-edit-profile-v331) > .modal-x {
  z-index: 20 !important;
}
/* Management has a higher stacking layer than modals; suspend only its floating
   trigger while these two cards are open, then restore it without changing access. */
body.packero-v3826115:has(#veloraModal:not(.hidden) > .hp-help-center-card-v382675) #staffManagementBtn,
body.packero-v3826115:has(#veloraModal:not(.hidden) .hp-edit-profile-v331) #staffManagementBtn {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.packero-v3826115:has(#veloraModal:not(.hidden)) :is(
  #feedbackQuickRailBtn, .hp-install-nudge-v3804, #packeroUpdatesTeaser, #packeroPwaUpdateV3819
) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Authenticated shortcuts exceed the legacy one-row budget at 360–430px.
   Wrap inside their own grid cell so none can cover the Menu hit target. */
@media (max-width: 480px) {
  body.packero-v3826115 .hp-header {
    height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  body.packero-v3826115 .hp-header .hp-actions {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }
}

/* Legacy full-screen cards inherited the overlay's 20px padding.
   Use the available container width, not 100vw (which includes the scrollbar). */
body.packero-v3826115 #veloraModal > .hp-community-settings-card-v3826114 {
  padding: 0 !important;
}
body.packero-v3826115 #veloraModal > :is(
  .hp-community-settings-card-v3826114, .hp-community-member-manager-card-v3826113
) > #modalBody {
  max-height: min(calc(90dvh - 2px), 898px) !important;
}
@media (max-width: 820px) {
  body.packero-v3826115 #veloraModal:has(> .hp-auth-modal-card-v369) {
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.packero-v3826115 #veloraModal > .hp-auth-modal-card-v369 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 760px) {
  body.packero-v3826115 #veloraModal:has(> .hp-community-settings-card-v3826114) {
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.packero-v3826115 #veloraModal > .hp-community-settings-card-v3826114 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  body.packero-v3826115 #veloraModal > .hp-community-settings-card-v3826114 > #modalBody {
    height: 100% !important;
    max-height: 100% !important;
  }
}
@media (max-width: 720px) {
  body.packero-v3826115 #veloraModal:has(> .hp-community-member-manager-card-v3826113) {
    padding: 0 !important;
    overflow: hidden !important;
  }
  body.packero-v3826115 #veloraModal > .hp-community-member-manager-card-v3826113 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  body.packero-v3826115 #veloraModal > .hp-community-member-manager-card-v3826113 > #modalBody {
    height: 100% !important;
    max-height: 100% !important;
  }
}
