/*
 * WayzAway R1E R1
 *
 * #3 Keep loading layer below the real header.
 * #5 Keep account drawer above loading masks.
 * #4 Make gallery X use the real toolbar-button box.
 *
 * Passed #1 video and #2 tablet Wall are untouched.
 */

/* ==========================================================
   PRIVATE ROUTE LOADING
   ========================================================== */

html.wz-private-route-loading::before {
  top:
    var(
      --wz-r1e-header-bottom,
      64px
    )
    !important;

  z-index:
    1002
    !important;
}

html.wz-private-route-loading::after {
  z-index:
    1003
    !important;
}


/*
 * The later loading masks also historically use very high
 * z-index values and/or a fixed 64px header boundary.
 *
 * Keep all route-loading masks below the real header and
 * below an open account drawer.
 */

#wz-initial-loading-settle-mask-r2,
#wz-favourites-flash-guard-r1-mask,
#wz-private-assembly-guard-r1-mask {
  top:
    var(
      --wz-r1e-header-bottom,
      64px
    )
    !important;

  bottom:
    0
    !important;

  height:
    auto
    !important;

  z-index:
    1002
    !important;
}


/* ==========================================================
   ACCOUNT DRAWER DURING LOADING
   ========================================================== */

html.wz-private-route-loading
.v-navigation-drawer__scrim {
  z-index:
    1005
    !important;
}

html.wz-private-route-loading
.v-navigation-drawer--temporary.v-navigation-drawer--active.wz-account-drawer {
  z-index:
    1006
    !important;
}


/* ==========================================================
   GALLERY X
   ========================================================== */

/*
 * CR12 draws a separate tiny grey ::before badge and ::after
 * X. Disable those. R1E styles the REAL close button from the
 * neighbouring Zoom Out button's computed appearance.
 */

.wz-media-viewer-image-controls
.wz-cr12-gallery-close::before,

.wz-media-viewer-image-controls
.wz-cr12-gallery-close::after {
  display:
    none
    !important;

  content:
    none
    !important;
}

.wz-media-viewer-image-controls
.wz-cr12-gallery-close {
  position:
    static
    !important;

  inset:
    auto
    !important;

  top:
    auto
    !important;

  right:
    auto
    !important;

  bottom:
    auto
    !important;

  left:
    auto
    !important;

  transform:
    none
    !important;

  flex:
    0 0 auto
    !important;

  display:
    inline-flex
    !important;

  align-items:
    center
    !important;

  justify-content:
    center
    !important;

  cursor:
    pointer
    !important;
}
