/*
 * Placement for the Strava availability notice.
 *
 * The notice's looks - the card, the gold badge, the tone colours and the
 * "Get my free analysis" CTA on its action - come from profile-notice-style.js,
 * which injects them as a base layer so the same prompt is identical here and
 * inside the Garmin and Apple panels. This file only says where the notice sits
 * and how it moves, so nothing here should set a colour.
 */

.running-data-notice {
  margin: -2rem 0 2rem;
}

.running-data-notice[hidden] {
  display: none !important;
}

/* Docked into the Strava panel's heading, under the action row. */
#stravaProfileControls .running-data-notice--inline {
  order: 2;
  align-self: stretch;
  width: 100%;
  margin: 0;
  max-height: 84px;
  padding: 8px 10px;
  gap: 8px;
  border-radius: 9px;
  overflow: hidden;
  transition: opacity 280ms ease, transform 280ms ease, max-height 320ms ease,
    padding 320ms ease, border-width 320ms ease;
  opacity: 1;
  transform: translateY(0);
}

#stravaProfileControls .running-data-notice--inline.is-leaving {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  transform: translateY(-4px);
}

#stravaProfileControls .sp-heading-main:has(.running-data-notice--inline) .sp-heading-copy {
  order: 3;
  max-height: 56px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  transition: opacity 280ms ease, transform 280ms ease, max-height 320ms ease;
}

#stravaProfileControls .sp-heading-main:has(.running-data-notice--inline) .sp-heading-copy.is-waiting-for-notice {
  max-height: 0;
  opacity: 0;
  transform: translateY(4px);
}

#stravaProfileControls .sp-heading-main:has(.running-data-notice--inline) .sp-outcome-slot {
  order: 4;
}

/* The docked copy is tighter than the standalone card. */
#stravaProfileControls .running-data-notice--inline .notice-card-badge svg {
  width: 17px;
  height: 17px;
}

#stravaProfileControls .running-data-notice--inline .notice-card-title {
  margin-bottom: 1px;
  font-size: 0.78rem;
}

#stravaProfileControls .running-data-notice--inline .notice-card-body {
  font-size: 0.72rem;
  line-height: 1.35;
}

#stravaProfileControls .running-data-notice--inline .notice-card-action {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.7rem;
}

@media (prefers-reduced-motion: reduce) {
  #stravaProfileControls .running-data-notice--inline,
  #stravaProfileControls .sp-heading-main:has(.running-data-notice--inline) .sp-heading-copy {
    transition: none;
  }
}

@media (max-width: 640px) {
  .running-data-notice {
    margin-top: -1.4rem;
  }
}
