/*! Copyright (c) 2025-2026 Markus Schüssler. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Markus-Schuessler-Proprietary; see repository LICENSE.
 */

/* Public flight cards keep the route map and every flight value in view. */
.public-flights-dashboard .flight-dashboard-card {
  grid-template-columns: minmax(230px, 38%) minmax(0, 1fr);
  min-height: 0;
}

.public-flights-dashboard .flight-dashboard-card__body {
  gap: 8px;
  padding: 12px 14px;
}

.public-flights-dashboard .flight-dashboard-card__detail-layout,
.public-flights-dashboard .flight-dashboard-card__details {
  min-width: 0;
}

.public-flights-dashboard .flight-dashboard-card__details {
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-flights-dashboard .flight-dashboard-card:not(.flight-dashboard-card--with-photos) .flight-dashboard-card__details {
  grid-template-columns: minmax(0, 1.12fr) minmax(190px, 0.88fr);
  column-gap: 18px;
}

.public-flights-dashboard .flight-dashboard-card:not(.flight-dashboard-card--with-photos) .flight-dashboard-card__details > :not(.flight-dashboard-card__metrics) {
  grid-column: 1;
}

.public-flights-dashboard .flight-dashboard-card:not(.flight-dashboard-card--with-photos) .flight-dashboard-card__metrics {
  grid-column: 2;
  grid-row: 1 / span 8;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.public-flights-dashboard .flight-dashboard-card--with-photos .flight-dashboard-card__detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(172px, 27%);
  gap: 14px;
}

.public-flights-dashboard .flight-dashboard-card__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.public-flights-dashboard .flight-dashboard-card__photo {
  display: block;
  min-width: 0;
  min-height: 44px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-color-surface-alt);
}

.public-flights-dashboard .flight-dashboard-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-flights-dashboard .flight-dashboard-card__photo:hover {
  border-color: var(--ui-color-primary);
}

.public-flights-dashboard .flight-dashboard-card__photo:focus-visible,
.public-flights-dashboard a.flight-dashboard-card__launch:focus-visible {
  outline: 2px solid var(--ui-color-focus);
  outline-offset: 2px;
}

.public-flights-dashboard .flight-dashboard-card__metrics {
  gap: 5px 10px;
}

.public-flights-dashboard .flight-dashboard-card__metric {
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.public-flights-dashboard .flight-dashboard-card__metric-icon {
  width: 24px;
  height: 24px;
}

.public-flights-dashboard .flight-dashboard-card__pilot-avatar {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
}

.public-flights-dashboard .flight-dashboard-card__header {
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.public-flights-dashboard .flight-dashboard-card__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  margin-left: auto;
}

.public-flights-dashboard .flight-dashboard-card__quick-actions {
  display: flex;
}

.public-flights-dashboard .flight-dashboard-card__quick-actions a {
  width: auto;
  min-width: 44px;
  height: 44px;
  gap: 6px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.public-flights-dashboard__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.public-flights-dashboard__social form {
  margin: 0;
}

.public-flights-dashboard__reaction-menu {
  min-width: 0;
}

.public-flights-dashboard__reaction-menu[open] {
  flex-basis: 100%;
}

.public-flights-dashboard__reaction-menu summary {
  list-style: none;
  cursor: pointer;
}

.public-flights-dashboard__reaction-menu summary::-webkit-details-marker {
  display: none;
}

.public-flights-dashboard__social-control,
.public-flights-dashboard__reaction-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm, 4px);
  background: transparent;
  color: var(--ui-color-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.public-flights-dashboard__social-control:hover,
.public-flights-dashboard__reaction-option:hover {
  background: var(--ui-color-surface-hover);
  color: var(--ui-color-primary-strong);
}

.public-flights-dashboard__social-control.is-active,
.public-flights-dashboard__reaction-option.is-active {
  background: var(--ui-color-surface-hover);
  color: var(--ui-color-primary-strong);
}

.public-flights-dashboard__social-control:focus-visible,
.public-flights-dashboard__reaction-option:focus-visible {
  outline: 2px solid var(--ui-color-focus);
  outline-offset: 2px;
}

.public-flights-dashboard__reaction-chevron {
  font-size: 10px;
}

.public-flights-dashboard__reaction-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding: 4px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-sm, 4px);
  background: var(--ui-color-surface-alt);
}

.public-flights-dashboard__reaction-option small {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.public-flights-dashboard .flight-dashboard-card__comment {
  margin-top: 0;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
}

.public-flights-dashboard a.flight-dashboard-card__launch {
  color: var(--ui-color-primary-strong);
  text-decoration: none;
}

.public-flights-dashboard a.flight-dashboard-card__launch:hover {
  color: var(--ui-color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 1300px) {
  .public-flights-dashboard .flight-dashboard-card--with-photos .flight-dashboard-card__detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-flights-dashboard .flight-dashboard-card__photos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .public-flights-dashboard .flight-dashboard-card:not(.flight-dashboard-card--with-photos) .flight-dashboard-card__details {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-flights-dashboard .flight-dashboard-card:not(.flight-dashboard-card--with-photos) .flight-dashboard-card__metrics {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .public-flights-dashboard .flight-dashboard-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-flights-dashboard .flight-dashboard-card__header-actions {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .public-flights-dashboard__social {
    justify-content: flex-start;
  }

  .public-flights-dashboard .flight-dashboard-card__preview,
  .public-flights-dashboard .flight-dashboard-card__preview-overlay {
    min-height: 190px;
  }

  .public-flights-dashboard .flight-dashboard-card__body {
    padding: 10px 12px;
  }

  .public-flights-dashboard .flight-dashboard-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .public-flights-dashboard__social {
    gap: 2px;
  }

  .public-flights-dashboard__social-control,
  .public-flights-dashboard .flight-dashboard-card__quick-actions a {
    gap: 4px;
    padding-inline: 6px;
  }
}
