div.pid.announcements-active #announcements {
  display: flex;
}

div.pid.no-trains #no-trains {
  display: flex;
}

div.pid.fixed-message-active .fixed-message {
  display: flex;
}

#announcements, #no-trains {
  background: #000;
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: var(--width);
  height: var(--height);
  gap: calc(var(--width) * 0.02);

  z-index: 1000;
}

#no-trains {
  flex-direction: column;
  gap: 0;
}

#announcements img {
  height: calc(var(--height) * 0.3);
}

#announcements p {
  font-size: calc(var(--height) * 0.12);
  color: #fff;
}

#no-trains p {
  margin: 0;
  font-size: calc(var(--height) * 0.25);
  color: #fff;
}

.fixed-message {
  background: #000;
  color: white;
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: var(--width);
  height: calc(var(--line-marker-height) + var(--main-height) - var(--body-margin));
  text-align: center;

  z-index: 1000;
}

div.pid {
  --body-margin: calc(var(--width) * 0.015);
  --body-width: calc(var(--width) - var(--body-margin) * 2);
  --line-marker-height: calc(var(--height) * 0.06);
  --main-height: calc(var(--height) * 0.58);
}

div.pid > div.line-marker {
  width: 100%;
  height: var(--line-marker-height);

  background-color: var(--line-colour);
}

div.next-service-info {
  width: var(--body-width);
  height: var(--main-height);
  margin-inline: var(--body-margin);

  --header-width: var(--body-width);
}

div.next-service-header {
  --svc-sch-time-width: calc(var(--width) * 0.19);
  --dest-width: calc(var(--width) * 0.55);
  --est-time-width: calc(var(--width) * 0.21);

  display: flex;
  flex-direction: column;
  margin-top: calc(var(--height) * 0.04);
}

div.next-service-info.arrival div.next-service-header {
  --svc-sch-time-width: calc(var(--width) * 0.3);
  --dest-width: calc(var(--width) * 0.4);
}

div.next-service-info.arrival span.next-service-sch-time::before {
  content: "";
  
  background-image: url(../../img/do-not-board.svg);
  background-size: cover;

  width: calc(var(--height) * 0.2);
  height: calc(var(--height) * 0.2);

  margin-right: calc(var(--width) * 0.03);

  display: inline-block;
}

div.next-service-info.arrival span.next-service-sch-time {
  width: calc(var(--width) * 0.3);
}

div.next-service-info.arrival span.next-service-destination {
  font-size: calc(var(--height) * 0.185);
  width: calc(var(--width) * 0.4);
}

div.next-service-info.arrival span.next-service-summary {
  text-align: center;
}

div.next-service-header div.top {
  line-height: calc(var(--height) * 0.22);
}

div.next-service-header div.top > span {
  vertical-align: super;
}

div.next-service-header  span.next-service-destination.small {
  font-size: calc(var(--height) * 0.185);
  letter-spacing: calc(var(--width) * 0.0005);
}

div.next-service-header span.next-service-platform {
  display: none;
}

div.pid-footer {
  --footer-height: calc(var(--height) - var(--line-marker-height) - var(--main-height) - var(--body-margin));
  --border-thickness: calc(var(--height) * 0.007);

  width: var(--body-width);
  height: var(--footer-height);
  margin-inline: var(--body-margin);
  margin-bottom: var(--body-margin);

  display: flex;
}

div.subsequent-service-info {
  border-top: var(--border-thickness) solid #000;
}

div.subsequent-service {
  --subsequent-service-height: calc(var(--footer-height) - var(--body-margin) - var(--border-thickness));
  --subsequent-service-width: calc(var(--width) * 0.65);
  --line-marker-thickness: calc(var(--width) * 0.01);

  width: var(--subsequent-service-width);
  height: var(--subsequent-service-height);
  margin-top: calc((var(--footer-height) - var(--subsequent-service-height)) / 2);
  display: flex;
}

div.subsequent-service:nth-child(2) {
  border-bottom: none;
}

div.subsequent-service div.line-marker {
  width: var(--line-marker-thickness);
  height: var(--subsequent-service-height);
  margin-right: var(--line-marker-thickness);
  display: block;

  background-color: var(--line-colour);
}

div.subsequent-service div.content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

div.subsequent-service div.content div.top {
  --svc-sch-time-width: calc(var(--width) * 0.1);
  --svc-est-time-width: calc(var(--width) * 0.1);
  --svc-dest-width: calc(var(--width) * 0.3);

  line-height: calc(var(--height) * 0.1);
}

div.subsequent-service div.content div.bottom {
  line-height: calc(var(--height) * 0.08);
}

div.subsequent-service div.content span {
  vertical-align: super;
}

div.subsequent-service div.content span.service-sch-time {
  font-size: calc(var(--height) * 0.08);
  font-weight: 400;
  width: var(--svc-sch-time-width);

  display: inline-block;
}

div.subsequent-service div.content span.service-destination {
  font-size: calc(var(--height) * 0.095);
  font-weight: bold;
  width: var(--svc-dest-width);

  display: inline-block;
}

div.subsequent-service div.content span.service-est-time {
  --padding-width: calc(var(--width) * 0.004);

  width: var(--svc-est-time-width);
  padding-block: calc(var(--width) * 0.005);
  padding-inline: var(--padding-width);
  margin-left: calc(var(--subsequent-service-width) - var(--svc-sch-time-width) - var(--svc-dest-width) - var(--svc-est-time-width) - var(--line-marker-thickness) * 2 - var(--padding-width) * 2);

  font-size: calc(var(--height) * 0.08);
  text-align: center;

  display: inline-block;

  background-color: #000;
  color: #fff;
}

div.subsequent-service div.content span.service-summary {
  margin-top: calc(var(--height) * 0.01);
  font-size: calc(var(--height) * 0.08);
  font-weight: 400;
}

div.clock {
  --clock-height: calc(var(--footer-height) - var(--border-thickness) * 2);

  width: calc(var(--width) * 0.3 - var(--border-thickness) * 2);
  height: var(--clock-height);
  border: calc(var(--height) * 0.007) solid #000;
  box-sizing: border-box;

  margin-top: auto;
  margin-bottom: var(--body-margin);
  margin-left: auto;
  text-align: center;

  font-size: calc(var(--height) * 0.13);
  line-height: calc(var(--clock-height) * 0.95);
}

.msg-size-1 {
  font-size: calc(var(--height) * 0.11);
}

.msg-size-2 {
  font-size: calc(var(--height) * 0.15);
}

.msg-size-3 {
  font-size: calc(var(--height) * 0.19);
}

.msg-size-4 {
  font-size: calc(var(--height) * 0.23);
}

.msg-size-5 {
  font-size: calc(var(--height) * 0.27);
}
