.weather-time-section-modal {
  position: fixed;
  inset: 0;
  z-index: 122;
  display: grid;
  place-items: center;
  padding: 18px;
}

.weather-time-section-modal.is-hidden {
  display: none;
}

.weather-time-section-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 18, 0.8);
  backdrop-filter: blur(5px);
  cursor: default;
}

.weather-time-section-panel {
  --weather-time-section-wind-direction: #7dd4fa;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1460px, calc(100vw - 36px));
  height: min(900px, calc(100vh - 36px));
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 8px;
  background: #07111d;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
  color: #edf7ff;
}

.weather-time-section-header {
  display: flex;
  min-width: 0;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: #0d1b2d;
}

.weather-time-section-title-wrap {
  min-width: 0;
}

.weather-time-section-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.weather-time-section-meta {
  margin-top: 4px;
  overflow: hidden;
  color: rgba(224, 242, 254, 0.68);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-time-section-controls {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: flex-end;
}

.weather-time-section-control {
  display: grid;
  gap: 4px;
  color: rgba(224, 242, 254, 0.68);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-time-section-select {
  min-width: 142px;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 6px;
  background: #111f32;
  color: #edf7ff;
  font-size: 12px;
  font-weight: 800;
}

.weather-time-section-select.is-height {
  min-width: 112px;
}

.weather-time-section-close {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 6px;
  background: #111f32;
  color: #e0f2fe;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.weather-time-section-close:hover,
.weather-time-section-close:focus-visible,
.weather-time-section-select:focus-visible {
  border-color: #38bdf8;
  outline: 2px solid rgba(56, 189, 248, 0.2);
}

.weather-time-section-body {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.weather-time-section-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-color: rgba(56, 189, 248, 0.48) #07111d;
}

.weather-time-section-chart {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.weather-time-section-svg {
  display: block;
  width: max(100%, 1120px);
  height: 100%;
  min-height: 620px;
}

.weather-time-section-plot {
  fill: #091827;
  stroke: rgba(148, 163, 184, 0.34);
}

.weather-time-section-grid {
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 1;
}

.weather-time-section-grid.is-time {
  stroke: rgba(125, 211, 252, 0.14);
}

.weather-time-section-axis-label,
.weather-time-section-time-label,
.weather-time-section-date-label,
.weather-time-section-hour-label {
  fill: rgba(224, 242, 254, 0.72);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.weather-time-section-axis-label.is-flight-level {
  fill: rgba(186, 230, 253, 0.54);
  font-size: 9px;
}

.weather-time-section-time-label {
  fill: #bae6fd;
}

.weather-time-section-date-label {
  fill: #fbbf24;
  font-size: 11px;
  font-weight: 900;
}

.weather-time-section-hour-label {
  fill: rgba(148, 163, 184, 0.72);
  font-size: 9px;
}

.weather-time-section-cloud-cell {
  fill: rgba(14, 165, 233, 0.32);
}

.weather-time-section-icing-cell {
  fill: rgba(244, 114, 182, 0.44);
}

.weather-time-section-turbulence-cell {
  fill: rgba(245, 158, 11, 0.34);
}

.weather-time-section-turbulence-cell.is-severe-turbulence {
  fill: rgba(248, 113, 113, 0.42);
}

.weather-time-section-isotherm {
  fill: none;
  stroke: rgba(251, 113, 133, 0.72);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}

.weather-time-section-isotherm.is-major {
  stroke: #fb7185;
  stroke-width: 1.8;
  stroke-dasharray: none;
}

.weather-time-section-isotherm-label {
  fill: #fecdd3;
  font-size: 9px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #07111d;
  stroke-width: 3px;
}

.weather-time-section-wind-barb {
  opacity: 1;
  pointer-events: none;
}

.weather-time-section-wind-direction-arrow {
  fill: none;
  stroke: var(--weather-time-section-wind-direction);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  filter: drop-shadow(0 1px 1px rgba(3, 8, 18, 0.9));
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.weather-time-section-route-wind-arrow {
  fill: none;
  stroke: var(--weather-time-section-wind-direction);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  filter: drop-shadow(0 1px 1px rgba(3, 8, 18, 0.9));
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.weather-time-section-hover-target {
  fill: transparent;
  cursor: crosshair;
}

.weather-time-section-hover-line {
  stroke: #fbbf24;
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.weather-time-section-hover-line.is-hidden {
  display: none;
}

.weather-time-section-status {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(7, 17, 29, 0.82);
  color: #bae6fd;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.weather-time-section-status.is-hidden {
  display: none;
}

.weather-time-section-status.is-error {
  color: #fecaca;
}

.weather-time-section-readout {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid rgba(125, 211, 252, 0.26);
  background: #0a1727;
  pointer-events: none;
}

.weather-time-section-readout-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(224, 242, 254, 0.64);
  font-size: 10px;
  font-weight: 700;
}

.weather-time-section-readout-item:last-child {
  border-right: 0;
}

.weather-time-section-readout-item strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-time-section-footer {
  display: flex;
  min-width: 0;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 9px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: #0d1b2d;
}

.weather-time-section-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.weather-time-section-legend-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: rgba(224, 242, 254, 0.8);
  font-size: 10px;
  font-weight: 800;
}

.weather-time-section-legend-mark {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 6px;
  border-radius: 1px;
}

.weather-time-section-legend-mark.is-temperature {
  height: 2px;
  background: #fb7185;
}

.weather-time-section-legend-mark.is-cloud {
  background: rgba(14, 165, 233, 0.74);
}

.weather-time-section-legend-mark.is-icing {
  background: rgba(244, 114, 182, 0.8);
}

.weather-time-section-legend-mark.is-turbulence {
  position: relative;
  height: 10px;
  background: rgba(168, 162, 158, 0.3);
  border: 1px dashed #94a3b8;
}

.weather-time-section-legend-mark.is-turbulence::before {
  position: absolute;
  inset: -4px 0 0;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 900;
  line-height: 12px;
  text-align: center;
  content: "\2014\00a0\2014\00a0\2022";
}

.weather-time-section-legend-mark.is-opmet {
  background: linear-gradient(90deg, #f87171 0 33%, #fbbf24 33% 66%, #a78bfa 66%);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.weather-time-section-legend-mark.is-precipitation {
  background: #38bdf8;
}

.weather-time-section-legend-mark.is-wind {
  height: 2px;
  background: #e0f2fe;
}

.weather-time-section-warning {
  max-width: 420px;
  color: #fcd34d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

body.has-time-section-modal {
  overflow: hidden;
}

@media (max-width: 980px) {
  .weather-time-section-readout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .weather-time-section-readout-item:nth-child(3n) {
    border-right: 0;
  }

  .weather-time-section-readout-item:nth-child(-n + 3) {
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .weather-time-section-footer {
    display: grid;
  }

  .weather-time-section-warning {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .weather-time-section-modal {
    padding: 0;
  }

  .weather-time-section-panel {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .weather-time-section-header {
    display: grid;
    align-items: flex-start;
    gap: 10px;
    min-height: 168px;
    padding: 10px 12px;
  }

  .weather-time-section-title {
    font-size: 16px;
  }

  .weather-time-section-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
    width: 100%;
  }

  .weather-time-section-control {
    min-width: 0;
  }

  .weather-time-section-select {
    width: 100%;
    min-width: 112px;
  }

  .weather-time-section-chart {
    min-height: 480px;
  }

  .weather-time-section-svg {
    width: 1250px;
    min-height: 580px;
  }

  .weather-time-section-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-time-section-readout-item {
    padding: 5px 7px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .weather-time-section-readout-item:nth-child(3n) {
    border-right: 1px solid rgba(148, 163, 184, 0.14);
  }

  .weather-time-section-readout-item:nth-child(2n) {
    border-right: 0;
  }

  .weather-time-section-footer {
    min-height: 92px;
    padding: 8px 12px;
  }
}
