@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap");

* {
  outline: 0;
  box-sizing: border-box;
}

body {
  background: #fff;
  font-family: "Open Sans", sans-serif;
  margin: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  font-weight: 300;
  height: 100%;
}

h1 { font-size: 2.2rem !important; font-family: "Open Sans", sans-serif !important; }
h2 { font-size: 1.8rem !important; }
h3 { font-size: 1.5rem !important; }
h4 { font-size: 1.2rem !important; }
h5 { font-size: 0.9rem !important; }

/* Preloader */
.preloader {
  width: 100%;
  height: 100%;
  top: 0;
  position: fixed;
  z-index: 99999;
  background: #fff;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.preloader--hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader .circular {
  animation: nb-rotate 2s linear infinite;
  height: 50px;
  width: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
}

.preloader .path {
  stroke: #95c11f;
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  animation: nb-dash 1.5s ease-in-out infinite;
}

@keyframes nb-rotate {
  100% { transform: rotate(360deg); }
}

@keyframes nb-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: -124;
  }
}

/* Status indicator (kiosk errors) */
.nb-status {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100000;
  background: rgba(220, 53, 69, 0.92);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  max-width: 45vw;
}

.nb-status--warn {
  background: rgba(253, 126, 20, 0.92);
}

/* Slide area */
.slide-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: calc(100vh - 8vh);
  min-height: 48px;
  padding: 0;
  margin: 0;
  align-self: start;
  background: #fff;
}

.container-content,
#itemcontainer.container-content {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: flex !important;
  overflow: hidden;
  line-height: 0;
}

.slide-stage {
  position: relative;
  align-items: stretch;
  justify-content: stretch;
  contain: strict;
}

.slide-pane {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s linear;
  backface-visibility: hidden;
  transform: translateZ(0);
  z-index: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  contain: layout paint;
}

.slide-pane.is-active {
  visibility: visible;
  opacity: 1;
  z-index: 1;
}

.slide-pane.is-leaving {
  visibility: visible;
  opacity: 0;
  z-index: 2;
}

.slide-pane .slide-image-wrap,
.slide-pane > div {
  width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 0;
  flex: 0 0 auto;
}

.slide-pane p,
.slide-pane div,
.slide-pane span {
  margin: 0;
  padding: 0;
}

.slide-pane br {
  display: none;
}

.slide-pane img,
.slide-pane .slide-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 8vh);
  object-fit: contain;
  object-position: top center;
  margin: 0;
}

.slide-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  text-align: center;
  color: #666;
  font-size: 2vh;
}

.slide-fallback img {
  width: min(40vw, 320px);
  opacity: 0.85;
}

/* Sidebar birthdays */
#sidebardata .todySidebar_t {
  font-size: 2vh;
  color: #95c11f;
  font-weight: bold;
}

#sidebardata .todySidebar {
  font-size: 2.5vh;
  color: #95c11f;
  font-weight: bold;
}

#sidebardata .tommorowSidebar_t {
  font-size: 2vh;
  color: #fd7e14;
  font-weight: bold;
}

#sidebardata .tommorowSidebar {
  font-size: 2vh;
  color: #fd7e14;
  font-weight: bold;
}

#sidebardata .aftertommorowSidebar_t {
  font-size: 2vh;
  color: #d63384;
  font-weight: bold;
}

#sidebardata .aftertommorowSidebar {
  font-size: 2vh;
  color: #d63384;
  font-weight: bold;
}

.dates {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
}

/* Traffic alert bar (serious incidents) */
.traffic-alert {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8vh;
  z-index: 1000;
  background: #fd7e14;
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 2vh, 1.35rem);
  text-align: center;
  padding: 0.55vh 1.5rem;
  min-height: 3.2vh;
  line-height: 1.3;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.has-traffic-alert .slide-area {
  height: calc(100vh - 8vh - 3.2vh);
}

body.has-traffic-alert .right-content {
  height: calc(100vh - 60px - 3.2vh);
}

/* News ticker bar */
.news-bar {
  background-color: #fff;
  z-index: 999;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: 100%;
  height: 8vh;
  min-height: 48px;
  max-height: 72px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  contain: layout style paint;
}

/* Layout */
.newsboard-layout {
  display: grid;
  grid-template-columns: 1fr min(18vw, 260px);
  grid-template-rows: 1fr;
  align-items: start;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  width: 100%;
}

.newsboard-layout > [class*="col-"] {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.right-content {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  padding: 0;
  margin: 0;
}

.sidebar-header {
  height: auto;
  display: flex;
  flex: 0 1 10%;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  font-size: 3vh;
  font-family: "Open Sans", sans-serif;
  color: gray;
}

.date-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sidebar-header .time {
  margin-bottom: -5%;
  margin-top: 5%;
  font-size: 4vh;
}

.sidebar-header .dates {
  font-size: 3vh;
  text-align: center;
}

.forecast,
.birthdays {
  flex: 1 1 auto;
  min-height: 0;
}

.forecast-inner,
.birthdays-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 0 0.4em;
  box-sizing: border-box;
}

.forecast-inner {
  justify-content: center;
}

.birthdays-inner {
  justify-content: flex-start;
  padding-top: 0.5vh;
}

.spacing-lg { height: 1.5vh; flex-shrink: 0; }
.spacing-sm { height: 1vh; flex-shrink: 0; }

.weatherIconTodayDiv {
  height: 9vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weatherIconToday {
  width: 9vh;
  height: 9vh;
  padding: 0;
  filter: drop-shadow(3px 3px 3px rgba(128, 128, 128, 0.359));
}

.min-max {
  font-weight: bold;
  font-size: 1.7vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  flex-shrink: 0;
  white-space: nowrap;
}

.currently {
  font-weight: bold;
  font-size: 3.2vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  line-height: 1.1;
}

.currently .temp {
  float: none;
  padding-top: 0;
  font-size: inherit;
  margin: 0;
}

.forecast-tommorow {
  background: white;
  width: 100%;
  min-height: 8.5vh;
  height: auto;
  margin-top: 1.2vh;
  padding: 0.8vh 0.4em;
  border-radius: 6px;
  overflow: visible;
  font-weight: bold;
  font-size: 1.55vh;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(87, 87, 87, 0.318);
}

.forecast-tommorow .left {
  height: auto;
  width: 5.5vh;
  min-width: 5.5vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weatherIconTomorrow {
  width: 4.5vh;
  height: 4.5vh;
  padding: 0;
  filter: drop-shadow(3px 3px 3px rgba(128, 128, 128, 0.18));
}

.forecast-tommorow .right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25vh;
  padding-left: 0.35em;
  padding-right: 0.25em;
}

.forecast-tommorow .top,
.forecast-tommorow .bottom {
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-left: 0;
  gap: 0.35em;
  line-height: 1.25;
}

.forecast-tommorow .bottom {
  font-weight: normal;
  font-size: 1.35vh;
  color: rgb(158, 158, 158);
  white-space: nowrap;
}

.route-times {
  width: 100%;
  margin-top: 1.6vh;
  padding: 1vh 0.55em 1.1vh;
  box-sizing: border-box;
  flex-shrink: 0;
  text-align: left;
  font-family: "Open Sans", sans-serif;
  color: #555;
  background: #f7f7f7;
  border-radius: 6px;
}

.route-times-title {
  font-size: 1.55vh;
  font-weight: 700;
  margin-bottom: 0.65vh;
  text-align: center;
  color: #444;
  letter-spacing: 0.02em;
}

.route-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5em;
  font-size: 1.55vh;
  line-height: 1.55;
  font-weight: 600;
  padding: 0.15vh 0.15em;
}

.route-row .route-label {
  flex: 1;
  min-width: 0;
  color: #555;
}

.route-row .route-value {
  flex-shrink: 0;
  font-size: 1.75vh;
  font-weight: 700;
  color: #222;
}

.route-row.is-delayed .route-value {
  color: #c0392b;
}

.logo {
  flex: 0 1 10%;
  object-fit: contain;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: 60%;
  padding: 10px;
}

.overcast {
  filter: invert(60%) sepia(0%) saturate(0%) hue-rotate(84deg) brightness(90%) contrast(89%);
}

/* Marquee — full-bleed ticker */
.marquee {
  --gap: 3rem;
  position: relative;
  display: block;
  overflow: hidden;
  user-select: none;
  width: 100%;
  height: 100%;
}

.marquee__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 100%;
  width: max-content;
  gap: 0;
  margin: 0;
  padding: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.marquee__segment {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.1rem, 2.2vh, 1.75rem);
  -webkit-font-smoothing: antialiased;
}

.marquee__segment > li {
  flex: 0 0 auto;
  color: gray;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  margin: 0;
  padding: 0 var(--gap);
  white-space: nowrap;
  line-height: 1.2;
}

.marquee__spacer {
  flex: 0 0 auto;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    transform: none !important;
  }

  .preloader .circular,
  .preloader .path {
    animation: none;
  }

  .slide-pane {
    transition: none;
  }
}
