/* Static copy of the library's first Flutter frame (the loading skeleton), shown
   until `flutter-first-frame`. Laid out by app_placeholder.js; the Dart files it
   mirrors are listed in AGENTS.md. Per-brand values (logo, fonts) sit in the
   index_<brand>.html files. The colours, the shimmer timing and the heading
   style below are pinned by test/config/web_index_placeholder_test.dart. */

@font-face {
  font-family: 'ph-noto-sans-display';
  src: url('assets/assets/fonts/NotoSansDisplay-VariableFont.ttf');
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: 'ph-barlow';
  src: url('assets/assets/fonts/Barlow-Regular.ttf');
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: 'ph-barlow';
  src: url('assets/assets/fonts/Barlow-Bold.ttf');
  font-weight: 700;
  font-display: block;
}
/* The Roboto file Flutter web itself falls back to (one weight; w600 is synthesised in both). */
@font-face {
  font-family: 'ph-roboto';
  src: url('https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Me4GZLCzYlKw.woff2') format('woff2');
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: 'ph-material-icons';
  src: url('assets/fonts/MaterialIcons-Regular.otf');
  font-display: block;
}
@font-face {
  font-family: 'ph-cupertino-icons';
  src: url('assets/packages/cupertino_icons/assets/CupertinoIcons.ttf');
  font-display: block;
}

/* Colours live here once; the test pins each to its Dart token. */
#app-placeholder {
  --ph-page: #ffffff;
  --ph-ink: #1c1c1e;
  --ph-line: #e5e5ea;
  --ph-bar: #e4e5e7;
  --ph-soft: rgba(228, 229, 231, 0.5);
  --ph-base: #f5f5f5;
  --ph-highlight: rgba(255, 255, 255, 0.6);
  --ph-nav-unselected: #9e9e9e;
  --ph-disabled: rgba(28, 28, 30, 0.38);
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--ph-page);
  transition: opacity 200ms ease-out;
  font-family: var(--ph-font, sans-serif);
  color: #1f2937;
}
#app-placeholder.app-placeholder-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Wordmark: the only thing shown on routes other than the library. */
.app-placeholder-logo {
  position: absolute;
  z-index: 3;
  left: 16px;
  width: auto;
  max-width: calc(50% - 16px);
}
/* .ph-wide is set by the script from the viewport width, like Flutter does. */
.ph-wide .app-placeholder-logo {
  left: 24px;
  max-width: calc(100% - 32px);
}
.ph-plain .ph-layer { display: none; }

.ph-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ph-skeleton { z-index: 1; }
.ph-shimmer { z-index: 2; }
.ph-chrome { z-index: 3; }
.ph-box, .ph-group { position: absolute; box-sizing: border-box; }
.ph-group { overflow: hidden; }

/* Skeleton fills */
.ph-bar { background: var(--ph-bar); }
.ph-soft { background: var(--ph-soft); }
.ph-base { background: var(--ph-base); }
.ph-cover {
  background: var(--ph-page);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18), 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Text styles. Brand text is bodyMedium-based: letter spacing 0.25 and line
   height 1.43 come from the Material 3 text theme. */
.ph-text {
  position: absolute;
  white-space: nowrap;
  letter-spacing: 0.25px;
  margin: 0;
}
.ph-heading { font-size: 20px; font-weight: 700; line-height: 28.6px; }
.ph-headline { font-size: 18px; font-weight: 700; line-height: 25.74px; }
.ph-date { font-size: 15px; font-weight: 600; line-height: 18.75px; }
.ph-pill-label { font-size: 14px; font-weight: 600; }
.ph-ghost { color: transparent; background: var(--ph-bar); border-radius: 999px; }
.ph-measure {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  letter-spacing: 0.25px;
}

/* Floating glass surfaces are solid on web (no GlassScope). */
.ph-surface {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ph-page);
  box-shadow: inset 0 0 0 1px var(--ph-line), 0 1px 2px rgba(0, 0, 0, 0.0588);
  color: var(--ph-ink);
  /* Button labels carry no fontFamily in Flutter: its web default. */
  font-family: 'ph-roboto', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
}
.ph-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  min-width: 0;
  white-space: nowrap;
}
.ph-item-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Flutter asks for w600 from a 400-only Roboto; Skia fakes bold by stroking
     the glyphs (about size/26.7 at 15 px) without changing advances. */
  -webkit-text-stroke: 0.56px currentColor;
}
.ph-icon-button {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ph-disabled);
}
.ph-divider { flex: none; width: 1px; height: 24px; margin: 0 4px; background: var(--ph-line); }

.ph-icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  font-size: 24px;
  line-height: 24px;
  text-align: center;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  font-family: 'ph-material-icons';
}
.ph-apple .ph-icon { font-family: 'ph-cupertino-icons'; }

/* Phone bottom navigation (Material BottomNavigationBar, fixed). */
.ph-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ph-page);
  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
    0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
.ph-nav-tile {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ph-nav-unselected);
}
.ph-nav-label {
  position: relative;
  font-size: 14px;
  line-height: 20.02px;
  letter-spacing: 0.25px;
  white-space: nowrap;
  transform-origin: 50% 100%;
}
.ph-nav-label.ph-unselected { transform: scale(0.857143); }

/* One shimmer wave across all skeletons, like SkeletonShimmer: a band sweeps
   during the first 55 % of the cycle, then rests. Geometry comes from JS. */
.ph-band {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--ph-highlight), rgba(255, 255, 255, 0));
  animation: ph-sweep 2400ms linear infinite;
  will-change: transform;
}
@keyframes ph-sweep {
  0% { opacity: 1; transform: translateX(var(--ph-x0)) skewX(-7.125deg); }
  55% { opacity: 1; transform: translateX(var(--ph-x1)) skewX(-7.125deg); }
  55.01%, 100% { opacity: 0; transform: translateX(var(--ph-x1)) skewX(-7.125deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ph-shimmer { display: none; }
}
