/* The gate scene belongs to the pilot's Home view. Flight details and actions
   continue to come from the existing reservation and briefing controls. */
#view .hm-g {
  grid-template-columns: minmax(0, 1fr);
}
#view .hm-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#view .hm-next {
  --gate-photo: linear-gradient(90deg, #071526 2%, rgba(7,21,38,.94) 30%, rgba(7,21,38,.1) 73%), url("img/gate-dashboard.jpg");
  position: relative;
  isolation: isolate;
}
#view .hm-next::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 290px;
  background-color: #101e30;
  background-image: var(--gate-photo);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
#view .hm-next .hm-band {
  background: transparent !important;
  color: white !important;
  width: min(100%, 650px);
  box-sizing: border-box;
}
#view .hm-next .hm-route {
  width: min(100%, 640px);
  min-height: 185px;
  box-sizing: border-box;
  color: white;
  text-shadow: 0 1px 5px #071526;
}
#view .hm-route :is(.hm-mid, .hm-ap small) { color: #e5eef9; }
#view .hm-next .hm-chips { background: var(--sheet); padding-top: 14px; }
#view .hm-empty {
  min-height: 290px;
  display: grid;
  align-content: center;
  color: white;
}
#view .hm-next.hm-empty {
  background-color: #101e30;
  background-image: var(--gate-photo);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#view .hm-empty::before { content: none; }
#view .hm-empty .hm-acts .btn:not(.primary) {
  background: #14263b;
  color: #fff;
  border-color: #8796a6;
}
#view .hm-empty .hm-ein { max-width: min(48%, 540px); }
#view .hm-empty .hm-ein p { color: #e5eef9; }
#view .hm-empty .hm-big { display: none; }
@media (max-width: 760px) {
  #view .hm-col { grid-template-columns: minmax(0,1fr); }
  #view .hm-next {
    --gate-photo: linear-gradient(0deg,#071526 5%,rgba(7,21,38,.94) 39%,transparent 83%), url("img/gate-dashboard.jpg");
    padding-top: 125px;
  }
  #view .hm-next::before { height: 100%; background-position: 75% top; background-size: 100% 320px, auto 220px; }
  #view .hm-next .hm-route { min-height: 0; padding-bottom: 16px; background: #071526; }
  #view .hm-next .hm-band { background: #071526 !important; }
  #view .hm-next > :is(.hm-facts,.hm-acts,.hm-legs) { background: var(--sheet); }
  #view .hm-next.hm-empty { align-content: end; background-position: center, 75% top; background-size: cover, auto 220px; }
  #view .hm-empty .hm-ein { max-width: 100%; }
}

/* Booked flights use the fleet portrait for the assigned registration. */
#view .hm-next:has(.hm-aircraft) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-top: 0;
}
#view .hm-next:has(.hm-aircraft)::before {
  height: 100%;
  background: linear-gradient(110deg, #081829, #213c50);
}
#view .hm-next:has(.hm-aircraft) > * { grid-column: 1 / -1; }
#view .hm-next > .hm-aircraft {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  align-items: center;
  min-width: 0;
}
#view .hm-next:has(.hm-aircraft) > .hm-band,
#view .hm-next:has(.hm-aircraft) > .hm-route { grid-column: 1; width: 100%; }
#view .hm-aircraft .gate, #view .hm-aircraft .ac-photo { height: 100%; }
#view .hm-aircraft .gate { display: grid; align-items: center; }
#view .hm-aircraft img, #view .hm-aircraft svg { width: 100%; height: 100%; max-height: 300px; object-fit: cover; }
#view .hm-aircraft .ac-photo {
  display: grid;
  place-items: center;
  min-height: 0;
  background: #101e30;
}
#view .hm-aircraft .ac-photo img {
  object-fit: scale-down;
  border-radius: 0;
}
#view .hm-next:has(.hm-aircraft) > :is(.hm-facts,.hm-acts,.hm-legs) { background: var(--sheet); }
@media(max-width:900px){
  #view .hm-next:has(.hm-aircraft) {grid-template-columns:minmax(0,1fr);}
  #view .hm-next > .hm-aircraft {grid-column:1;grid-row:1;height:clamp(150px,42vw,260px);}
}
