/* NPN Home Space Weather Badge v3 - default minimized + dock-card shape */

#npn-home-spacewx-badge {
  position: fixed;
  right: 18px;
  top: 96px;
  bottom: auto;
  width: 315px;
  max-width: calc(100vw - 36px);
  z-index: 2147483646;
  color: #f4f8ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: auto;
}

#npn-home-spacewx-badge.npn-home-spacewx-minimized {
  display: none !important;
}

.npn-home-spacewx-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 20px;
  background:
    radial-gradient(circle at 15% 0%, rgba(128,199,255,.20), transparent 18rem),
    linear-gradient(180deg, rgba(12,18,31,.98), rgba(6,9,16,.94));
  box-shadow:
    0 22px 58px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.npn-home-spacewx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 9px;
  border-bottom: 1px solid rgba(255,255,255,.11);
}

.npn-home-spacewx-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.npn-home-spacewx-sun {
  width: 27px;
  height: 27px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,179,71,.14);
  box-shadow: 0 0 24px rgba(255,179,71,.18);
  flex: 0 0 auto;
}

.npn-home-spacewx-title-text {
  min-width: 0;
}

.npn-home-spacewx-title-text b {
  display: block;
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npn-home-spacewx-title-text span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(244,248,255,.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npn-home-spacewx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.npn-home-spacewx-body {
  padding: 11px 12px 12px;
  display: grid;
  gap: 9px;
}

.npn-home-spacewx-risk {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  align-items: center;
}

.npn-home-spacewx-score {
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.08em;
}

.npn-home-spacewx-summary b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.npn-home-spacewx-summary span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
  color: rgba(244,248,255,.66);
}

.npn-home-spacewx-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.npn-home-spacewx-metric {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 13px;
  background: rgba(0,0,0,.18);
  padding: 7px 6px;
  min-width: 0;
}

.npn-home-spacewx-metric span {
  display: block;
  font-size: 9px;
  color: rgba(244,248,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.npn-home-spacewx-metric b {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npn-home-spacewx-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding-top: 1px;
  color: rgba(244,248,255,.58);
  font-size: 10px;
}

.npn-home-spacewx-footer strong {
  color: rgba(244,248,255,.82);
}

.npn-home-spacewx-low .npn-home-spacewx-pill,
.npn-home-spacewx-low .npn-home-spacewx-score {
  color: #74f29c;
}

.npn-home-spacewx-elevated .npn-home-spacewx-pill,
.npn-home-spacewx-elevated .npn-home-spacewx-score {
  color: #ffd166;
}

.npn-home-spacewx-high .npn-home-spacewx-pill,
.npn-home-spacewx-high .npn-home-spacewx-score {
  color: #ff9f43;
}

.npn-home-spacewx-severe .npn-home-spacewx-pill,
.npn-home-spacewx-severe .npn-home-spacewx-score {
  color: #ff5f6d;
}

.npn-home-spacewx-card:hover {
  border-color: rgba(128,199,255,.34);
  transform: translateY(-1px);
  transition: transform .15s ease, border-color .15s ease;
}

#npn-home-spacewx-minimize {
  position: absolute;
  right: 8px;
  top: -11px;
  min-width: 84px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(8,12,20,.98);
  color: rgba(244,248,255,.86);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2147483647;
}

/* Make the Space Weather minimized item match the other dock cards */
.npn-home-spacewx-dock-chip {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 470px !important;
  max-width: calc(100vw - 72px) !important;
  min-height: 76px !important;
  padding: 0 20px !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: 0 !important;
  background: rgba(32, 40, 48, .88) !important;
  color: #f4f8ff !important;
  box-shadow: none !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  text-align: left !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.npn-home-spacewx-dock-chip:hover {
  background: rgba(42, 52, 61, .92) !important;
  border-color: rgba(255,255,255,.24) !important;
}

.npn-home-spacewx-chip-icon {
  color: #ffc94a !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

.npn-home-spacewx-chip-label {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #f4f8ff !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  letter-spacing: -.03em !important;
}

.npn-home-spacewx-chip-restore {
  display: block !important;
  color: rgba(244,248,255,.68) !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

/* Fallback dock only appears if the real panel dock cannot be found */
#npn-home-spacewx-fallback-dock {
  position: fixed;
  left: 30px;
  right: 30px;
  bottom: 22px;
  z-index: 2147483000;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  justify-content: flex-start;
  align-items: center;
  pointer-events: none;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 28px;
  background: rgba(4, 11, 19, .92);
  box-shadow: 0 18px 60px rgba(0,0,0,.38);
}

@media (max-width: 760px) {
  #npn-home-spacewx-badge {
    left: 10px;
    right: 10px;
    top: 76px;
    bottom: auto;
    width: auto;
    max-width: none;
  }

  .npn-home-spacewx-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .npn-home-spacewx-dock-chip {
    width: 100% !important;
    min-height: 68px !important;
    grid-template-columns: 24px minmax(0, 1fr) auto !important;
  }

  .npn-home-spacewx-chip-label {
    font-size: 19px !important;
  }

  .npn-home-spacewx-chip-restore {
    font-size: 15px !important;
  }

  #npn-home-spacewx-fallback-dock {
    left: 10px;
    right: 10px;
    bottom: 12px;
    padding: 12px;
  }
}
