/* Wider, denser aircraft details panel.
   Loaded last so it can improve the panel without replacing existing features. */

#panel {
  width: clamp(380px, 28vw, 460px);
  max-height: calc(100dvh - 82px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

#panel .flight-status-section {
  margin-inline: 14px;
}

#panel .flight-status-grid > div {
  display: grid;
  grid-template-columns: minmax(125px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 10px 14px;
}

#panel .flight-status-grid > div > span {
  width: auto;
  font-size: 12px;
  line-height: 1.3;
}

#panel .flight-status-grid > div b {
  width: auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  text-align: end;
  white-space: normal;
  overflow-wrap: anywhere;
}

#panel .flight-status-grid .flight-status-punctuality b {
  font-size: 14px;
}

#panel .panel-actions {
  position: sticky;
  bottom: 0;
}

#panel .close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 13px;
  color: #d8f3ff;
  background: linear-gradient(145deg, rgba(19, 40, 57, 0.96), rgba(8, 20, 34, 0.96));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 0;
  line-height: 1;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

#panel .close::before,
#panel .close::after {
  content: '';
  position: absolute;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

#panel .close::before {
  transform: rotate(45deg);
}

#panel .close::after {
  transform: rotate(-45deg);
}

#panel .close:hover,
#panel .close:focus-visible {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.34),
    0 0 0 3px rgba(56, 189, 248, 0.12);
  outline: none;
  transform: translateY(-1px);
}

#panel .close:active {
  transform: scale(0.96);
}

@media (max-width: 600px) {
  #panel {
    width: auto;
    max-height: calc(100dvh - 122px);
  }

  #panel .flight-status-section {
    margin-inline: 10px;
  }

  #panel .flight-status-grid > div {
    grid-template-columns: minmax(112px, 0.86fr) minmax(0, 1.14fr);
    gap: 10px;
    min-height: 44px;
    padding: 9px 12px;
  }

  #panel .flight-status-grid > div > span {
    font-size: 11px;
  }

  #panel .flight-status-grid > div b {
    font-size: 12px;
    text-align: end;
  }

  #panel .flight-status-route {
    padding-block: 11px 6px;
  }

  #panel .flight-status-route strong {
    font-size: 23px;
  }
}

@media (max-width: 370px) {
  #panel .flight-status-grid > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #panel .flight-status-grid > div b {
    text-align: start;
  }
}
