/* Heroes Church / My Heroes — Welcome Inbox Mobile Layout Fix.
   This hotfix deliberately touches ONLY the Welcome Inbox toolbar and its
   More Actions disclosure, not forms, status, data, or event registrations. */

/* The old mobile style had `height: 100%` on <summary>. When a <details>
   element expanded, the summary grew to match the entire panel content,
   producing the very tall brown button seen in the October 31 screenshot. */
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more {
  position: relative !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  overflow: visible !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 13px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  color: #fff !important;
  background: #242a30 !important;
  border: 1px solid #58616d !important;
  border-radius: 11px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  list-style: none !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary::-webkit-details-marker {
  display: none !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary span {
  flex: 0 0 auto !important;
  line-height: 1 !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more[open] > summary {
  background: #30211e !important;
  border-color: #e46b45 !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary:focus-visible {
  outline: 2px solid #f4a17e !important;
  outline-offset: 3px !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > .heroes-welcome-more-panel {
  box-sizing: border-box !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 8px 0 0 !important;
  padding: 12px !important;
  background: #11161b !important;
  border: 1px solid #46505a !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more:not([open]) > .heroes-welcome-more-panel {
  display: none !important;
}
#igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more[open] > .heroes-welcome-more-panel {
  display: grid !important;
  gap: 12px !important;
}
#igd-core-app .heroes-welcome-more-panel .heroes-welcome-action-grid {
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
}
#igd-core-app .heroes-welcome-more-panel :is(a, button, select) {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 760px) {
  #igd-core-app .heroes-welcome-list {
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 12px !important;
  }
  #igd-core-app .heroes-welcome-row {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 15px !important;
  }
  /* Two neat rows: Details + Invite, then Claim + More Actions. */
  #igd-core-app .heroes-welcome-toolbar {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 9px !important;
    align-items: start !important;
    justify-items: stretch !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }
  #igd-core-app .heroes-welcome-toolbar > button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    padding: 6px 8px !important;
    border-radius: 11px !important;
  }
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more {
    display: block !important;
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more[open] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more[open] > summary {
    max-width: 100% !important;
  }
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > .heroes-welcome-more-panel {
    grid-column: 1 / -1 !important;
  }
  #igd-core-app .heroes-welcome-action-grid > :is(button, a) {
    flex: 1 1 120px !important;
    min-height: 42px !important;
  }
  /* The fixed bottom navigation must not cover the last card's controls. */
  #igd-core-app .heroes-welcome-list {
    padding-bottom: max(100px, calc(env(safe-area-inset-bottom, 0px) + 90px)) !important;
  }
}
@media (max-width: 360px) {
  #igd-core-app .heroes-welcome-toolbar {
    gap: 7px !important;
  }
  #igd-core-app .heroes-welcome-toolbar > button,
  #igd-core-app .heroes-welcome-toolbar > details.heroes-welcome-more > summary {
    font-size: 11px !important;
  }
}
