/* Loading as grey outlines, not a spinner in the middle.
   My Hair's first load, the salon list and the Salons map open straight away
   in the shape they will have: grey blocks where the content will sit, with
   one soft sheen passing across them until it arrives. */
:root {
  --rl-skel-base: #efedf2;
  --rl-skel-shine: #f8f7fa;
  --rl-skel-line: #ebe8ef;
}
@keyframes rl-skel-sheen { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.rl-skeleton-page i,
.rl-skeleton-salon i,
body .me-account-pending-heading i,
body .me-account-pending-grid > span > i {
  display: block;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--rl-skel-base) 30%, var(--rl-skel-shine) 50%, var(--rl-skel-base) 70%) 0 0 / 250% 100%;
  animation: rl-skel-sheen 1.6s ease-in-out infinite;
}

/* My Hair first load: the page opens at once, as outlines. */
body.customer-mode .customer-hydration-shell > .customer-hydration-main {
  place-items: stretch !important;
  align-content: start;
  padding: 24px clamp(16px, 3vw, 32px) calc(24px + env(safe-area-inset-bottom)) !important;
}
.customer-hydration-stage.is-skeleton {
  display: block;
  justify-items: stretch;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  text-align: left;
  animation: none;
}
.rl-skeleton-page { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
.rl-skeleton-rail { display: grid; align-content: start; gap: 14px; width: 220px; padding: 18px; border: 1px solid var(--rl-skel-line); border-radius: 20px; }
.rl-skeleton-rail i { height: 14px; }
.rl-skeleton-rail i:nth-child(odd) { width: 78%; }
.rl-skeleton-rail i:first-child { width: 44px; height: 44px; margin-bottom: 8px; border-radius: 50%; }
.rl-skeleton-body { display: grid; align-content: start; gap: 22px; grid-column: -2 / -1; }
.rl-skeleton-heading { display: grid; gap: 10px; }
.rl-skeleton-heading i:nth-child(1) { width: 90px; height: 10px; }
.rl-skeleton-heading i:nth-child(2) { width: min(320px, 70%); height: 26px; border-radius: 10px; }
.rl-skeleton-heading i:nth-child(3) { width: min(420px, 86%); height: 12px; }
.rl-skeleton-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.rl-skeleton-cards > span,
.rl-skeleton-wide > span { display: grid; align-content: end; gap: 10px; min-height: 140px; padding: 18px; border: 1px solid var(--rl-skel-line); border-radius: 18px; background: #fff; }
.rl-skeleton-cards > span > i:first-child { width: 42px; height: 42px; margin-bottom: auto; border-radius: 12px; }
.rl-skeleton-cards > span > i:nth-child(2) { width: 72%; height: 12px; }
.rl-skeleton-cards > span > i:nth-child(3) { width: 46%; height: 9px; }
.rl-skeleton-wide > span { min-height: 200px; align-content: start; }
.rl-skeleton-wide > span > i:first-child { width: 36%; height: 14px; }
.rl-skeleton-wide > span > i:last-child { width: 58%; height: 10px; }
@media (max-width: 760px) {
  .rl-skeleton-rail { display: none; }
  .rl-skeleton-page { grid-template-columns: minmax(0, 1fr); }
  .rl-skeleton-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Salon list: grey rows in the shape of salon cards. */
body .salon-results-loading.is-skeleton {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  text-align: left;
}
.rl-skeleton-salon { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--rl-skel-line); border-radius: 18px; background: #fff; }
.rl-skeleton-salon i.is-photo { height: 96px; border-radius: 12px; }
.rl-skeleton-salon > span { display: grid; align-content: center; gap: 10px; }
.rl-skeleton-salon > span > i:nth-child(1) { width: 62%; height: 14px; }
.rl-skeleton-salon > span > i:nth-child(2) { width: 84%; height: 10px; }
.rl-skeleton-salon > span > i:nth-child(3) { width: 40%; height: 10px; }

/* Salons map: a quiet sheen over the map's own grey, no icon or words in
   the middle. The words come back only when the map is slow and offers
   "Show map now". */
body .directory-map-loading {
  background: linear-gradient(100deg, #f1f0f4 30%, #f8f7fa 50%, #f1f0f4 70%) 0 0 / 250% 100%;
  animation: rl-skel-sheen 1.8s ease-in-out infinite;
}
body .directory-map-loading:not(.can-skip) > * {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}
body .directory-map-loading .directory-map-loading-icon { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rl-skeleton-page i,
  .rl-skeleton-salon i,
  body .me-account-pending-heading i,
  body .me-account-pending-grid > span > i,
  body .directory-map-loading { animation: none; }
}
