@font-face {
  font-family: "Signage Sans";
  src: url("fonts/DejaVuSans-Latvian.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Signage Sans";
  src: url("fonts/DejaVuSans-Latvian-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Signage Sans", Arial, sans-serif;
  color: #162a4b;
  background: #f4eee6;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #f4eee6;
}

.signage {
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 100% 0, rgba(11, 79, 159, 0.1), transparent 22%),
    linear-gradient(180deg, #f8f3ec 0%, #f4eee6 75%, #e7edf6 75%, #e7edf6 100%);
}

.timetable-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  height: 75vh;
  padding: 2.4vw 2.6vw 1.9vw;
  gap: 1.25vw;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.4vw;
}

.logo-card,
.clock-card {
  display: flex;
  align-items: center;
  min-height: 7.2vw;
  padding: 1.1vw 1.35vw;
  border: 0.12vw solid #b9bec7;
  border-radius: 1.1vw;
  background: rgba(255, 253, 249, 0.9);
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 5.2vw;
}

.clock-card {
  justify-content: flex-end;
}

.calendar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 1.35vw;
  color: #263c61;
  font-size: 1.28vw;
  line-height: 1.4;
}

.calendar span:last-child {
  color: #657082;
}

.clock-card time {
  min-width: 10.5vw;
  padding-left: 1.35vw;
  border-left: 0.12vw solid #b9bec7;
  color: #0b4f9f;
  font-size: 3.3vw;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.title-row {
  display: flex;
  align-items: center;
  min-height: 5vw;
  padding: 0.8vw 1.65vw;
  border: 0.12vw solid #b9bec7;
  border-radius: 1.1vw;
  background: rgba(255, 253, 249, 0.78);
}

h1 {
  margin: 0;
  color: #073b77;
  font-size: 2.35vw;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.screen-number {
  margin-left: auto;
  color: #657082;
  font-size: 1.15vw;
}

.schedule {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0.18vw;
}

.loading,
.error {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #0b4f9f;
  font-size: 1.4vw;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.5fr) minmax(0, 0.82fr) repeat(5, minmax(0, 0.95fr));
  align-items: stretch;
}

.table-row > span {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 0.23vw 0.35vw;
  border-right: 0.07vw solid rgba(111, 119, 133, 0.42);
  justify-content: center;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.table-row > span:first-child {
  justify-content: flex-start;
}

.table-row > span:last-child {
  border-right: 0;
}

.column-header {
  flex: 0 0 3.4vw;
  border-radius: 0.85vw;
  background: #0b4f9f;
  color: #ffffff;
  font-size: 0.86vw;
  font-weight: 700;
  line-height: 1.08;
  text-transform: uppercase;
}

.column-header > span {
  border-color: rgba(255, 255, 255, 0.24);
}

.section-title {
  display: flex;
  flex: 0.68 1 0;
  min-height: 0;
  align-items: center;
  padding: 0.1vw 0.9vw;
  border-left: 0.35vw solid #0b4f9f;
  border-radius: 0.45vw;
  background: #dce6f3;
  color: #073b77;
  font-size: 0.98vw;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.doctor-row {
  flex: 1 1 0;
  min-height: 0;
  border: 0.07vw solid #b9bec7;
  border-radius: 0.72vw;
  background: rgba(255, 253, 249, 0.96);
  color: #243653;
  font-size: 0.98vw;
  line-height: 1.08;
  overflow: hidden;
}

.doctor-row.tall-row {
  flex-grow: 1.45;
}

.doctor-row.tall-row .doctor {
  font-size: 1.02vw;
  line-height: 1;
}

.doctor-row .doctor {
  color: #101f3d;
  font-size: 1.23vw;
  font-weight: 700;
}

.doctor-row .place {
  color: #073b77;
  font-size: 1.06vw;
  font-weight: 700;
}

.doctor-row .direction-cell {
  gap: 0.3vw;
  background: #e7edf6;
}

.doctor-row .day {
  flex-direction: column;
  color: #111111;
  font-size: 1.08vw;
}

.doctor-row .day > span {
  display: block;
}

.doctor-row .secondary {
  color: #c6283d;
}

.doctor-row .empty {
  color: #8b929e;
}

.direction-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15vw;
  height: 2.15vw;
  border-radius: 50%;
  background: #0b4f9f;
  color: #ffffff;
  font-size: 1.58vw;
  font-weight: 700;
  line-height: 1;
}

.k2-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75vw;
  height: 1.75vw;
  border: 0.12vw solid #0b4f9f;
  border-radius: 50%;
  background: #fffdf9;
  color: #0b4f9f;
  font-size: 0.78vw;
  font-weight: 700;
  line-height: 1;
}

.advertisement {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 25vh;
  border-top: 0.32vw solid #0b4f9f;
  background: #e7edf6;
  overflow: hidden;
}

.ad-media {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4vw 6vw;
  gap: 2.2vw;
  color: #162a4b;
  background:
    radial-gradient(ellipse at 92% 110%, rgba(11, 79, 159, 0.2), transparent 38%),
    #e7edf6;
}

.info-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 6.2vw;
  height: 6.2vw;
  border-radius: 50%;
  background: #0b4f9f;
  color: #ffffff;
  font-size: 4vw;
  font-weight: 700;
  font-style: normal;
}

.ad-placeholder strong,
.ad-placeholder-title {
  display: block;
  margin-bottom: 0.9vw;
  color: #0b4f9f;
  font-size: 2.4vw;
  text-transform: uppercase;
}

.ad-placeholder p {
  max-width: 72vw;
  margin: 0;
  font-size: 1.75vw;
  line-height: 1.4;
}
