.fsg-weather {
  margin-block: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 0.5rem;
  background: #fff;
}

.fsg-weather__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.fsg-weather--linkcard {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 18rem;
  margin: 0;
  padding: 1.5rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(145deg, #315f91, #163b63);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.18);
}

.fsg-weather-linkcard__header,
.fsg-weather-linkcard__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.fsg-weather-linkcard__station,
.fsg-weather-linkcard__sky > span,
.fsg-weather-linkcard__sky > strong,
.fsg-weather-linkcard__footer span,
.fsg-weather-linkcard__unavailable span,
.fsg-weather-linkcard__unavailable strong {
  display: block;
}

.fsg-weather-linkcard__values dt,
.fsg-weather-linkcard__sky > span,
.fsg-weather-linkcard__footer {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.fsg-weather-linkcard__station {
  width: 100%;
  color: inherit;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-shadow: 0 0.15rem 0.25rem rgba(34, 42, 53, 1);
}

.fsg-weather-linkcard__values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0.8rem;
}

.fsg-weather-linkcard__values div {
  min-width: 0;
}

.fsg-weather-linkcard__values dd {
  margin: 0.12rem 0 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.fsg-weather--linkcard .fsg-weather__category {
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.fsg-weather-linkcard__sky {
  min-height: 2.7rem;
}

.fsg-weather-linkcard__sky > strong {
  margin-top: 0.12rem;
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.fsg-weather-linkcard__footer {
  align-items: flex-end;
  margin-top: auto;
  padding-right: 2.5rem;
}

.fsg-weather-linkcard__stale {
  color: #ffe39b;
  text-align: right;
}

.fsg-weather-linkcard__invalid {
  color: #ffd08a;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.fsg-weather-linkcard__details {
  position: static;
}

.fsg-weather-linkcard__details summary {
  position: absolute;
  right: 1rem;
  bottom: 0.85rem;
  z-index: 5;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: #fff;
  background: rgba(9, 30, 51, 0.72);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  place-items: center;
}

.fsg-weather-linkcard__details summary::-webkit-details-marker {
  display: none;
}

.fsg-weather-linkcard__details summary:hover,
.fsg-weather-linkcard__details summary:focus-visible {
  background: #fff;
  color: #163b63;
}

.fsg-weather-linkcard__details summary:focus-visible {
  outline: 0.18rem solid #f4c542;
  outline-offset: 0.15rem;
}

.fsg-weather-linkcard__details-close,
.fsg-weather-linkcard__details[open] .fsg-weather-linkcard__details-open {
  display: none;
}

.fsg-weather-linkcard__details[open] .fsg-weather-linkcard__details-close {
  display: block;
  font-size: 1.35rem;
  font-weight: 400;
}

.fsg-weather-linkcard__overlay {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 3.5rem 1.25rem 1.25rem;
  overflow: auto;
  border-radius: 0.5rem;
  color: #fff;
  background: linear-gradient(145deg, #244f7b, #102f50);
  scrollbar-width: thin;
}

.fsg-weather-linkcard__overlay h3 {
  margin: 0 0 0.25rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 400;
}

.fsg-weather-linkcard__overlay h3:not(:first-child) {
  margin-top: 0.75rem;
}

.fsg-weather-linkcard__overlay code {
  display: block;
  padding: 0.45rem;
  overflow-wrap: anywhere;
  border-radius: 0.3rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.7rem;
  line-height: 1.35;
  white-space: normal;
}

.fsg-weather-linkcard__overlay p {
  margin: auto 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  line-height: 1.35;
}

.fsg-weather-linkcard__overlay a {
  color: inherit;
  text-decoration: underline;
}

.fsg-weather-linkcard__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.fsg-weather-linkcard__unavailable {
  display: grid;
  min-height: 100%;
  place-content: center;
  text-align: center;
}

.fsg-weather-linkcard__unavailable strong {
  font-size: 1.4rem;
}

.fsg-weather-linkcard__unavailable span {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.76);
}

.fsg-weather__station,
.fsg-weather__name {
  display: block;
}

.fsg-weather__name,
.fsg-weather__footer {
  color: #5b6570;
}

.fsg-weather__sun {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.fsg-weather__sun div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fsg-weather__visual {
  display: grid;
  gap: 0.25rem;
  min-height: 5rem;
  place-content: center;
  text-align: center;
  color: #5b6570;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.025) 8px,
    transparent 8px,
    transparent 16px
  );
}

.fsg-weather-taf__validity {
  color: #5b6570;
  font-size: 0.8rem;
  text-align: right;
}

.fsg-weather-taf__periods {
  display: grid;
  gap: 0.75rem;
}

.fsg-weather-taf__period {
  padding: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.018);
}

.fsg-weather-taf__period h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.fsg-weather-taf__period .fsg-weather__values {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fsg-weather__category {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #f4f7f8;
  background: #14181c;
  font-size: 0.8rem;
  font-weight: 700;
}

.fsg-weather__category--vfr,
.fsg-weather__category--mvfr,
.fsg-weather__category--ifr,
.fsg-weather__category--lifr,
.fsg-weather__category--invalid {
  color: #14181c;
}

.fsg-weather__category--vfr { background: #00ff66; }
.fsg-weather__category--mvfr { background: #00e5ff; }
.fsg-weather__category--ifr { background: #ff3038; }
.fsg-weather__category--lifr { background: #ff40ff; }
.fsg-weather__category--invalid { background: #ffb000; }

.fsg-weather__raw {
  margin-block: 1rem;
  overflow-wrap: anywhere;
}

.fsg-weather__raw code {
  white-space: normal;
}

.fsg-weather__values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.fsg-weather__values div {
  min-width: 0;
}

.fsg-weather__values dt {
  color: #5b6570;
  font-size: 0.8rem;
}

.fsg-weather__values dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
}

.fsg-weather__notice {
  margin: 1rem 0 0;
  color: #8a4300;
}

.fsg-weather__footer {
  margin-top: 1rem;
  font-size: 0.75rem;
}

@media (max-width: 767px) {
  .fsg-weather--linkcard {
    min-height: 13rem;
    padding: 1.1rem;
  }

  .fsg-weather-linkcard__values {
    gap: 0.45rem;
    margin-top: 0.75rem;
  }

  .fsg-weather-linkcard__values dd {
    font-size: 0.82rem;
  }

  .fsg-weather-linkcard__details summary {
    right: 0.75rem;
    bottom: 0.65rem;
  }

  .fsg-weather-linkcard__overlay {
    padding: 1rem 3rem 1rem 1rem;
  }

  .fsg-weather-linkcard__overlay code {
    font-size: 0.65rem;
  }

  .fsg-weather__values,
  .fsg-weather-taf__period .fsg-weather__values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fsg-weather-taf__validity {
    text-align: left;
  }
}
