/**
 * Global Weather Pro - getting started notice
 *
 * Same card as the review prompt (css/review-notice.css). The left panel shows
 * the weather at the saved location over the matching condition animation, so
 * a new user sees the artwork the header widget uses before placing it.
 * Buttons follow the admin colour scheme through --wp-admin-theme-color.
 * Selectors are scoped to the notice's id so core admin link and paragraph
 * styles cannot override them.
 */

.notice.gwpro-onboarding-notice {
  --gwpro-ob-accent: var(--wp-admin-theme-color, #3858e9);
  --gwpro-ob-accent-dark: var(--wp-admin-theme-color-darker-10, #2145e6);
  --gwpro-ob-surface: #ffffff;
  --gwpro-ob-text: #1e1e1e;
  --gwpro-ob-muted: #50575e;
  --gwpro-ob-border: rgba(0, 0, 0, 0.1);
  --gwpro-ob-star: #f0b849;
  --gwpro-ob-sky: #0a6596; /* sky blue, 6.3:1 on white */
  --gwpro-ob-done: #007017; /* core success green, 6.3:1 with white */

  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 34%) 1fr;
  align-items: stretch;
  margin: 16px 20px 16px 2px;
  padding: 0;
  overflow: hidden;
  background: var(--gwpro-ob-surface);
  color: var(--gwpro-ob-text);
  border: 1px solid var(--gwpro-ob-border);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px -12px rgba(16, 24, 40, 0.18);
  animation: gwpro-ob-enter 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---------- Media panel: animation + weather ---------- */

#gwpro-onboarding-notice .gwpro-ob__media {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 220px;
  margin: 0;
  padding: 24px 24px 22px;
  color: #ffffff;
  /* Layers, bottom to top: this background (the still condition image over
     a sky-coloured fallback), the looping video, the scrim (::after), then
     the weather. isolation keeps the negative z-index layers inside the panel. */
  isolation: isolate;
  overflow: hidden;
  background:
    var(--gwpro-ob-still, none) center / cover no-repeat,
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(160deg, #6ec3ff 0%, #3b82f6 55%, #6d4ee8 100%);
}

#gwpro-onboarding-notice .gwpro-ob__video {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Legacy animated WebP, used only when a condition has no video or still.
   These are small (about 100 x 100), so the image keeps its own size and sits
   centred between the badge and the readout instead of being stretched
   across the panel like the video. It is in the normal flow, above the scrim. */
#gwpro-onboarding-notice .gwpro-ob__icon {
  order: 1;
  align-self: center;
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 4px 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

#gwpro-onboarding-notice .gwpro-ob__readout,
#gwpro-onboarding-notice .gwpro-ob__caption {
  order: 2;
}

#gwpro-onboarding-notice .gwpro-ob__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.15) 0%, rgba(10, 14, 30, 0.35) 40%, rgba(10, 14, 30, 0.82) 100%);
  pointer-events: none;
}

/* Pause / play for the animation (WCAG 2.2.2). Added by the notice script
   only once the animation is playing. */
#gwpro-onboarding-notice .gwpro-ob__motion {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(10, 14, 30, 0.55);
  color: #ffffff;
  cursor: pointer;
}

#gwpro-onboarding-notice .gwpro-ob__motion:hover {
  background: rgba(10, 14, 30, 0.8);
}

#gwpro-onboarding-notice .gwpro-ob__motion:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

#gwpro-onboarding-notice .gwpro-ob__motion svg {
  display: block;
}

#gwpro-onboarding-notice .gwpro-ob__motion .gwpro-icon-play,
#gwpro-onboarding-notice .gwpro-ob__motion[aria-pressed="true"] .gwpro-icon-pause {
  display: none;
}

#gwpro-onboarding-notice .gwpro-ob__motion[aria-pressed="true"] .gwpro-icon-play {
  display: block;
}

#gwpro-onboarding-notice .gwpro-ob__badge {
  align-self: flex-start;
  max-width: calc(100% - 40px); /* clear of the pause button */
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 30, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  overflow-wrap: anywhere;
}

/* Always at the bottom, over the darkest part of the scrim, even when the
   badge above it is left out. */
#gwpro-onboarding-notice .gwpro-ob__readout,
#gwpro-onboarding-notice .gwpro-ob__caption {
  margin-top: auto;
}

#gwpro-onboarding-notice .gwpro-ob__readout p {
  margin: 0;
  padding: 0;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#gwpro-onboarding-notice .gwpro-ob__temp {
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

#gwpro-onboarding-notice .gwpro-ob__temp-alt {
  margin-left: 6px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.85;
}

#gwpro-onboarding-notice .gwpro-ob__condition {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

#gwpro-onboarding-notice .gwpro-ob__caption {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ---------- Copy ---------- */

#gwpro-onboarding-notice .gwpro-ob__content {
  align-self: center;
  padding: 22px 56px 22px 28px;
}

#gwpro-onboarding-notice .gwpro-ob__eyebrow {
  margin: 0 0 4px;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gwpro-ob-sky);
}

#gwpro-onboarding-notice .gwpro-ob__title {
  margin: 0 0 6px;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gwpro-ob-text);
}

#gwpro-onboarding-notice .gwpro-ob__text {
  margin: 0 0 16px;
  padding: 0;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gwpro-ob-muted);
}

/* ---------- Buttons ---------- */

#gwpro-onboarding-notice .gwpro-ob__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

#gwpro-onboarding-notice .gwpro-ob__btn,
#gwpro-onboarding-notice .gwpro-ob__btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#gwpro-onboarding-notice .gwpro-ob__btn:focus,
#gwpro-onboarding-notice .gwpro-ob__close:focus {
  outline: none;
}

#gwpro-onboarding-notice .gwpro-ob__btn:focus-visible,
#gwpro-onboarding-notice .gwpro-ob__close:focus-visible {
  outline: 2px solid transparent; /* shows in Windows High Contrast mode */
  box-shadow:
    0 0 0 1px #ffffff,
    0 0 0 3px var(--gwpro-ob-accent);
}

#gwpro-onboarding-notice .gwpro-ob__btn--primary {
  background: var(--gwpro-ob-accent);
  color: #ffffff;
}

#gwpro-onboarding-notice .gwpro-ob__btn--primary:hover,
#gwpro-onboarding-notice .gwpro-ob__btn--primary:active {
  background: var(--gwpro-ob-accent-dark);
  color: #ffffff;
}

#gwpro-onboarding-notice .gwpro-ob__btn--secondary {
  background: transparent;
  color: var(--gwpro-ob-accent);
  box-shadow: inset 0 0 0 1px var(--gwpro-ob-accent);
}

#gwpro-onboarding-notice .gwpro-ob__btn--secondary:hover {
  background: rgba(56, 88, 233, 0.06);
  color: var(--gwpro-ob-accent-dark);
  box-shadow: inset 0 0 0 1px var(--gwpro-ob-accent-dark);
}

#gwpro-onboarding-notice .gwpro-ob__btn--tertiary {
  padding: 0 8px;
  background: transparent;
  color: var(--gwpro-ob-muted);
}

#gwpro-onboarding-notice .gwpro-ob__btn--tertiary:hover {
  color: var(--gwpro-ob-text);
  text-decoration: underline;
}

#gwpro-onboarding-notice .gwpro-ob__stars {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--gwpro-ob-star);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
}

/* ---------- Close ---------- */

#gwpro-onboarding-notice .gwpro-ob__close,
#gwpro-onboarding-notice .gwpro-ob__close:visited {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: var(--gwpro-ob-muted);
  text-decoration: none;
}

#gwpro-onboarding-notice .gwpro-ob__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--gwpro-ob-text);
}

/* ---------- Motion ---------- */

@keyframes gwpro-ob-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@keyframes gwpro-ob-leave {
  to { opacity: 0; transform: translateY(-6px); }
}

.notice.gwpro-onboarding-notice.is-leaving {
  animation: gwpro-ob-leave 0.25s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .notice.gwpro-onboarding-notice,
  .notice.gwpro-onboarding-notice.is-leaving,
  #gwpro-onboarding-notice .gwpro-ob__btn {
    animation: none;
    transition: none;
  }

  /* No video: the still condition image behind it shows instead. The
     notice script also never starts the video in this case. (A legacy
     animated WebP is frozen by the script rather than hidden, since there
     is no still behind it.) */
  #gwpro-onboarding-notice video.gwpro-ob__video {
    display: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 782px) {
  .notice.gwpro-onboarding-notice {
    grid-template-columns: 1fr;
    margin-right: 10px;
  }

  #gwpro-onboarding-notice .gwpro-ob__media {
    min-height: 200px;
    padding: 20px 56px 18px 18px;
  }

  /* The notice's close button sits over this corner on small screens. */
  #gwpro-onboarding-notice .gwpro-ob__motion {
    right: 56px;
  }

  #gwpro-onboarding-notice .gwpro-ob__content {
    padding: 16px 16px 20px;
  }

  #gwpro-onboarding-notice .gwpro-ob__close,
  #gwpro-onboarding-notice .gwpro-ob__close:visited {
    color: #ffffff;
    background: rgba(10, 14, 30, 0.45);
  }

  #gwpro-onboarding-notice .gwpro-ob__close:hover {
    background: rgba(10, 14, 30, 0.7);
    color: #ffffff;
  }

  #gwpro-onboarding-notice .gwpro-ob__btn--primary,
  #gwpro-onboarding-notice .gwpro-ob__btn--secondary {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  #gwpro-onboarding-notice .gwpro-ob__btn,
  #gwpro-onboarding-notice .gwpro-ob__close {
    border: 1px solid ButtonText;
  }
}


/* ---------- Getting started extras ---------- */

#gwpro-onboarding-notice .gwpro-ob__title {
  margin-bottom: 12px;
}

#gwpro-onboarding-notice .gwpro-ob__steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: gwpro-ob-step;
}

#gwpro-onboarding-notice .gwpro-ob__steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 12px;
  padding: 0 0 0 36px;
  counter-increment: gwpro-ob-step;
  font-size: 13px;
  line-height: 1.55;
  color: var(--gwpro-ob-muted);
}

#gwpro-onboarding-notice .gwpro-ob__steps li::before {
  content: counter(gwpro-ob-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gwpro-ob-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* A finished step (location already saved) gets a tick instead of its number. */
#gwpro-onboarding-notice .gwpro-ob__steps li.is-done::before {
  content: "\2713";
  background: var(--gwpro-ob-done);
  font-size: 13px;
}

#gwpro-onboarding-notice .gwpro-ob__steps li.is-done strong {
  color: var(--gwpro-ob-text);
  font-weight: 600;
}

#gwpro-onboarding-notice .gwpro-ob__step-title {
  font-weight: 600;
  color: var(--gwpro-ob-text);
}

#gwpro-onboarding-notice .gwpro-ob__codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 6px;
}

#gwpro-onboarding-notice .gwpro-ob__code-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#gwpro-onboarding-notice .gwpro-ob__code-label {
  min-width: 52px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gwpro-ob-text);
}

#gwpro-onboarding-notice .gwpro-ob__code {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f0f0f1;
  border: 1px solid #dcdcde;
  font-size: 12.5px;
  color: var(--gwpro-ob-text);
  user-select: all;
}

#gwpro-onboarding-notice .gwpro-ob__copy {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  background: #ffffff;
  color: var(--gwpro-ob-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

#gwpro-onboarding-notice .gwpro-ob__copy[hidden] {
  display: none;
}

#gwpro-onboarding-notice .gwpro-ob__copy .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

#gwpro-onboarding-notice .gwpro-ob__copy:hover {
  border-color: var(--gwpro-ob-accent);
  color: var(--gwpro-ob-accent);
}

#gwpro-onboarding-notice .gwpro-ob__copy:focus {
  outline: none;
}

#gwpro-onboarding-notice .gwpro-ob__copy:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--gwpro-ob-accent);
}

#gwpro-onboarding-notice .gwpro-ob__copy.is-copied {
  border-color: #00a32a;
  color: #007017;
}

/* ---------- Compact layout (v2.15.0) ----------
   The card took 450px, half of a laptop's first screen. On wide admin
   screens the three steps now sit side by side and the artwork panel is a
   narrow strip, which brings the card to roughly 230px. */
@media (min-width: 1100px) {
  .notice.gwpro-onboarding-notice {
    grid-template-columns: 200px 1fr;
  }

  #gwpro-onboarding-notice .gwpro-ob__media {
    min-height: 0;
    padding: 14px 16px;
    gap: 6px;
  }

  #gwpro-onboarding-notice .gwpro-ob__content {
    padding: 14px 52px 14px 22px;
  }

  #gwpro-onboarding-notice .gwpro-ob__title {
    margin-bottom: 8px;
  }

  #gwpro-onboarding-notice .gwpro-ob__steps {
    display: grid;
    /* The middle step holds the two shortcodes, so it gets the most room. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 0 20px;
    margin-bottom: 10px;
  }

  #gwpro-onboarding-notice .gwpro-ob__steps li {
    margin: 0;
    line-height: 1.45;
  }

  #gwpro-onboarding-notice .gwpro-ob__codes {
    flex-direction: column;
    gap: 4px;
  }

  #gwpro-onboarding-notice .gwpro-ob__code-row {
    flex-wrap: nowrap;
  }

  #gwpro-onboarding-notice .gwpro-ob__code {
    padding: 3px 8px;
    white-space: nowrap;
  }

  #gwpro-onboarding-notice .gwpro-ob__copy {
    min-height: 28px;
    padding-top: 0;
    padding-bottom: 0;
  }
}
