/* Adapted from the supplied ShinyButton for the static website. */



@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-percent {
  syntax: "<percentage>";
  initial-value: 5%;
  inherits: false;
}

@property --gradient-shine {
  syntax: "<color>";
  initial-value: white;
  inherits: false;
}

.shiny-cta {
  --shiny-cta-bg: #000000;
  --shiny-cta-bg-subtle: #1a1818;
  --shiny-cta-fg: #ffffff;
  --shiny-cta-highlight: blue;
  --shiny-cta-highlight-subtle: #8484ff;
  --animation: gradient-angle linear infinite;
  --duration: 3s;
  --shadow-size: 2px;
  --transition: 800ms cubic-bezier(0.25, 1, 0.5, 1);
  
  isolation: isolate;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline-offset: 4px;
  padding: 1.25rem 2.5rem;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1.2;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 360px;
  color: var(--shiny-cta-fg);
  --shiny-background: linear-gradient(var(--shiny-cta-bg), var(--shiny-cta-bg)) padding-box,
    conic-gradient(
      from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
      transparent,
      var(--shiny-cta-highlight) var(--gradient-percent),
      var(--gradient-shine) calc(var(--gradient-percent) * 2),
      var(--shiny-cta-highlight) calc(var(--gradient-percent) * 3),
      transparent calc(var(--gradient-percent) * 4)
    ) border-box;
  background: var(--shiny-background);
  box-shadow: inset 0 0 0 1px var(--shiny-cta-bg-subtle);
  transition: var(--transition);
  transition-property: --gradient-angle-offset, --gradient-percent, --gradient-shine;
}

.shiny-cta::before,
.shiny-cta::after,
.shiny-cta .shiny_label::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  translate: -50% -50%;
  z-index: -1;
}

.shiny-cta:active {
  translate: 0 1px;
}

/* Dots pattern */
.shiny-cta::before {
  --size: calc(100% - var(--shadow-size) * 3);
  --position: 2px;
  --space: calc(var(--position) * 2);
  width: var(--size);
  height: var(--size);
  background: radial-gradient(
    circle at var(--position) var(--position),
    white calc(var(--position) / 4),
    transparent 0
  ) padding-box;
  background-size: var(--space) var(--space);
  background-repeat: space;
  mask-image: conic-gradient(
    from calc(var(--gradient-angle) + 45deg),
    black,
    transparent 10% 90%,
    black
  );
  border-radius: inherit;
  opacity: 0.4;
  z-index: -1;
}

/* Inner shimmer */
.shiny-cta::after {
  --animation: shimmer linear infinite;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(
    -50deg,
    transparent,
    var(--shiny-cta-highlight),
    transparent
  );
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.6;
}

.shiny-cta .shiny_label {
  z-index: 1;
}

.shiny-cta .shiny_label::before { content: none; }

/* Animate */
.shiny-cta,
.shiny-cta::before,
.shiny-cta::after {
  animation: var(--animation) var(--duration),
    var(--animation) calc(var(--duration) / 0.4) reverse paused;
  animation-composition: add;
}

.shiny-cta:is(:hover, :focus-visible) {
  --gradient-percent: 20%;
  --gradient-angle-offset: 95deg;
  --gradient-shine: var(--shiny-cta-highlight-subtle);
}

.shiny-cta:is(:hover, :focus-visible),
.shiny-cta:is(:hover, :focus-visible)::before,
.shiny-cta:is(:hover, :focus-visible)::after {
  animation-play-state: running;
}


@keyframes gradient-angle {
  to {
    --gradient-angle: 360deg;
  }
}

@keyframes shimmer {
  to {
    rotate: 360deg;
  }
}

@keyframes breathe {
  from, to {
    scale: 1;
  }
  50% {
    scale: 1.2;
  }
}
      
/* Match existing control sizes and retain visible keyboard focus. */
.shiny-cta { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 44px; padding: .85rem 1.4rem; font-size: .95rem; text-decoration: none; text-shadow: none; }
.shiny-cta .shiny_label { position: relative; }
.shiny-cta:focus-visible { outline: 3px solid var(--color_amber); outline-offset: 4px; }
.shiny-cta:disabled { opacity: .65; cursor: not-allowed; animation-play-state: paused; }
.ambient_enabled .button.shiny-cta { color: var(--shiny-cta-fg); }
#feedback_form .button.shiny-cta { border: 1px solid transparent; }
.navigation_panel #main_navigation a.shiny-cta { border: 1px solid transparent; border-radius: .75rem; margin-block: .2rem; }
.shiny-cta .menu_icon, .shiny-cta .navigation_number, .shiny-cta .navigation_arrow { position: relative; z-index: 1; }
html[data-motion="off"] .shiny-cta, html[data-motion="off"] .shiny-cta::before, html[data-motion="off"] .shiny-cta::after, html[data-motion="off"] .shiny-cta .shiny_label::before { animation: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .shiny-cta, .shiny-cta::before, .shiny-cta::after, .shiny-cta .shiny_label::before { animation: none; transition: none; }
}

/* Gallery controls share Explore's effect, including dynamically created openers. */
.gallery_filters button.shiny-cta {
  background: var(--shiny-background);
  color: var(--shiny-cta-fg);
  border: 1px solid transparent;
  font-size: .9rem;
  padding: .8rem 1.1rem;
}
.gallery_filters button.shiny-cta[aria-pressed="true"] {
  border-color: #b4e4ed99;
}
.gallery_filters button.shiny-cta .shiny_label { font-weight: 700; }
.album_open_button.shiny-cta, .game_actions .button.shiny-cta { border: 1px solid transparent; }

/* Album navigation and counters use the same illuminated rim as Explore. */
:is(#album_dialog, #photo_dialog) .shiny-cta {
  background: var(--shiny-background);
  color: #fff8ee;
  border: 1px solid transparent;
  border-radius: 72px;
  box-shadow: inset 0 0 0 1px var(--shiny-cta-bg-subtle);
}
.carousel_controls button.shiny-cta { width: 46px; height: 46px; padding: 0; }
:is(.carousel_count, .photo_count).shiny-cta {
  margin: 0; padding: .65rem 1rem; min-height: 46px;
  font-size: .9rem; font-variant-numeric: tabular-nums; cursor: default;
}
:is(.carousel_count, .photo_count).shiny-cta:active { translate: none; }

/* Button labels do not acquire a selection or tap highlight. */
.shiny-cta { user-select: none; -webkit-tap-highlight-color: transparent; }
