@use "../../../../styles/colors" as colors;
@use "../../../../styles/variables" as vars;
@use "../../../../styles/fonts" as fonts;

.details-panel {
  padding: vars.$space-m2 0;
  font-size: fonts.$font-size-m;
  line-height: 1.5;
}

.details-panel__row {
  display: grid;
  grid-template-columns: minmax(160px, 35%) 1fr;
  gap: 16px;
  padding: vars.$space-s2 0;

  &--title {
    .details-panel__value {
      font-weight: fonts.$font-bold;
    }
  }

  &:last-child {
    border-bottom: none;
  }
}

.details-panel--table {
  .details-panel__row {
    border-bottom: 1px solid colors.$border;
  }
}

.details-panel__label {
  color: colors.$light-gray;
}

.details-panel__value {
  color: colors.$blue-dark;
  font-weight: fonts.$font-medium;
}

.details-panel__status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: vars.$border-radius;
  background: colors.$blue-extra-light;
  color: colors.$blue;
  font-size: fonts.$font-size-s;
}

.details-panel__icons {
  display: flex;
  gap: vars.$space-m2;
  flex-wrap: wrap;
}

// Aircraft properties laid out horizontally (Название | Количество мест |
// Эконом | Комфорт | Бизнес | Предыдущий рейс), matching Angular's
// flight-props grid: desktop 5 equal columns, tablet 4, mobile 2 (3fr 2fr).
// Column/row gaps are $space-l (15px).
.aircraft-panel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: vars.$space-l;
  row-gap: vars.$space-l;
  padding: 4px 0;

  @media (max-width: 1050px) and (min-width: 769px) {
    grid-template-columns: repeat(4, 1fr);
  }

  @media (max-width: 640px) {
    grid-template-columns: 3fr 2fr;
  }

  &__prop {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  &__label {
    font-size: fonts.$font-size-s;
    color: colors.$light-gray;
  }

  // Aircraft property values ('Салехард', '87', '75', '12'). Angular
  // shows these at 16px/500/#333 — larger and darker than the label,
  // but not bold.
  &__value {
    font-size: fonts.$font-size-l;
    font-weight: fonts.$font-medium;
    color: colors.$text-color;
  }

  &__prop--link .aircraft-panel__value {
    color: colors.$blue;
  }
}

// Meal/service icon links ('Эконом класс', 'Выбор места', 'Space+', …).
// Angular renders the label text at 12px in #4A90E2 (brand link blue),
// which hints the whole tile is clickable without underlining.
.details-panel__icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: fonts.$font-size-s;
  color: colors.$blue-light;
  text-decoration: none;

  &:hover {
    color: colors.$blue;
  }

  img {
    width: 24px;
    height: 24px;
  }
}
