/* Only Cloud Center's own stylesheets belong here. Roboto and the MathWorks
   search/searchrefine/offcanvas clientlibs used to be imported below; the AEM shell
   loads all of them itself from www.mathworks.com, so a local copy was a second,
   older version of the same rules competing on source order. */
/* The SPA's page stylesheets, ported by tools/csssync and scoped so that none of
   their rules can reach the AEM header or footer. First, so that mwcloud's own sheets
   below win a tie on source order -- though the scope is an id, so a ported rule still
   outranks an unscoped rule of otherwise equal specificity. Its own @import list is
   generated: go run ./tools/csssync. */
@import url("spa_cloud_center_all.css");

/* The same SPA rules for the pages the SPA no longer has. csssync reads that tree as
   read-only upstream, so when the migration deleted the SPA's /about, credential and
   AWS-role views it deleted their rules too, and a regenerated port matches this repo's
   replacements for them zero times. Hand-maintained, and here rather than at the end
   because these rules are the ones styles.css overrides on source order. */
@import url("spa_orphans.css");

@import url("styles.css");

/* The in-app navigation bar, which used to be two blocks inside styles.css. After styles.css, which is where those
   blocks effectively sat relative to each other; every rule in it is scoped to
   .app-navbar, so the later position can only win ties it previously lost. */
@import url("app_navbar.css");

@import url("styles_sm+xs.css") only screen and (max-width: 991px);

/* Bootstrap draws a <select>'s drop-down arrow as a background image rather than a
   glyph -- .form-select sets `background-position: right 0.75rem center` with a 16x12
   image -- so the only thing keeping an option's text out from under the arrow is the
   2.25rem of right padding .form-select reserves for it. styles.css:365 restates the
   padding of every select under .cloud-body wholesale as `5px 10px`, which drops that
   reservation to 10px while leaving the arrow exactly where it was. The page's root
   font-size is 14px, so the arrow occupies 10.5px to 26.5px in from the right edge with
   10px of padding in front of it: a long option, or a facet count like "(12)", paints
   under the arrow. Reported on the create page's facets.

   The reservation is restored here rather than by narrowing styles.css:365, because that
   rule is right for the bare selects it was written for -- the ones the ported SPA pages
   render, which draw no arrow of their own -- and because only the padding is wrong: the
   font-size beside it is deliberate. Specificity is (0,2,1) against that rule's (0,1,1),
   so this wins wherever both apply regardless of which sheet the cascade reaches first,
   and it reaches no select that has not opted into Bootstrap's arrow. */
.cloud-body select.form-select {
  padding-right: 2.25rem;
}

/* Section-level loading overlay - for grids/containers */
.section-loading-overlay {
  position: relative;
}

.section-loading-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: all;
}

.section-loading-overlay::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  margin-left: -1.25rem;
  border: 0.25rem solid #e9ecef;
  border-top-color: #0076a8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
