/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
	Roboto, Ubuntu, sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #6892bc;
}

/* ---------- OVERLAY ---------- */
#mapOverlay {
	position: fixed;
	/*background-color: #C0C0C040;*/
	height: 200px;
	width: 200px;
	top: 50dvh;
	left: 50dvw;
	transform: translate(-50%, -50%);
	transition: background-color 0.3s;
}

.overlay-group {
	position: absolute;
}

.rainb {
	position: absolute;
	background-color: #4080FF80;
	height: 1px;
	width: 1px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: all 0.3s;
}
.rainb:hover {
	box-shadow: 0px 0px 2px #00000080;
	z-index: 10;
}

.windo {
	position: absolute;
	width: 0px;
	height: 0px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-bottom: 20px solid rgb(22 79 201 / 38%);
	/*transition: transform 0.3s ease-out;*/
}

/* ---------- APP CONTAINER ---------- */
.app {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---------- MAP BACKGROUND ---------- */
.map {
  position: absolute;
  background: url("map.svg") center center / contain no-repeat;
  background-color: #6892bc;
  filter: saturate(0.85);
  inset: 0;
}

/* ---------- TOP-RIGHT DETAILS PANEL ---------- */
.info-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 158px;
  padding: 11px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  zoom: 0.85;
  backdrop-filter: blur(8px);
}

.info-panel .date {
  font-size: 14px;
  opacity: 0.85;
}

.info-panel .time {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 4px;
  margin-bottom: 5px;
}

/* ---------- BOTTOM SLIDER BAR ---------- */
.control-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px 16px;
  background: linear-gradient(
	to top,
	rgba(0, 0, 0, 0.8),
	rgba(0, 0, 0, 0)
  );
}

.slider-container {
  background: rgba(20, 20, 20, 0.25);
  border-radius: 14px;
  padding: 8px 16px;
  backdrop-filter: blur(4px);
}

.slider-labels {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #cfd8dc;
	margin-bottom: 6px;
	width: calc(100% - 24px);
	float: right;
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  /*border-radius: 3px;*/
  background: #455a64C0;
  outline: none;
}

button#playPause {
	content: "\e072";
	padding: 0px 0px 2px 1px;
	vertical-align: 5px;
	margin-top: -4px;
	max-width: 20px;
	min-width: 20px;
	text-align: center;
	cursor: pointer;
	border: 1px solid #455a64;
	background-color: #4fc3f7;
}
button#playPause.playing {
	content: "&#x23f8;";
	padding: 0px 5px 0px 5px;
}

.timeSliderTicks {
	height: 12px;
	width: calc(100% - 15px);
	margin-left: 8px;
	margin-top: 10px;
	margin-bottom: -19px;
	background:
		/* Major ticks (1 day = 8 * 3h) */
		repeating-linear-gradient(
		  to right,
		  rgba(255,255,255,0.8) 0,
		  rgba(255,255,255,0.8) 2px,
		  transparent 2px,
		  transparent calc(99% / 4)
		),

		/* Minor ticks (3 hours) */
		repeating-linear-gradient(
		  to right,
		  rgba(255,255,255,0.4) 0,
		  rgba(255,255,255,0.4) 1px,
		  transparent 1px,
		  transparent calc(99% / 32)
		);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4fc3f7C0;
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.25);
  cursor: pointer;
}
input[type="range"]:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px rgba(79, 195, 247, 0.3);
  background: #4fc3f7E0;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4fc3f7C0;
  box-shadow: 0 0 0 6px rgba(79, 195, 247, 0.25);
  cursor: pointer;
  border: none;
}
input[type="range"]:hover::-moz-range-thumb {
  box-shadow: 0 0 0 6px rgba(79, 195, 247, 0.3);
  background: #4fc3f7E0;
}

/* ---------- SAFE AREA (iOS) ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .control-bar {
	padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}

/* ---------- LEGEND ---------- */
.legend {
  font-size: 12px;
  line-height: 1.4;
  color: #cfd8dc;
  overflow: hidden;
  border-top: 1px solid #565d60;
  margin-top: 4px;
  padding-top: 8px;
  transition: all 0.3s ease-in-out;
}
/* No point - no animation from height auto to 0
  height: 0px;*/
.info-panel.hide-legend .legend {
  border-top: 0px solid #202020;
  margin-top: 0px;
  padding-top: 0px;
}

.info-panel a.toggle-legend {
  display: block;
  margin-bottom: -20px;
  color: #A0A0A0;
  opacity: 0;
  transition: all 0.3s;
}
.info-panel:hover a.toggle-legend {
  color: #D0D0D0;
}
.info-panel.hide-legend a.toggle-legend {
  opacity: 1;
  margin-bottom: 0px;
}

.legend div {
  text-align: left;
  margin-top: 3px;
}

/* Legend icons */
.legend span {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 3px;
  vertical-align: -2px;
}

/* Rain size */
.lg-circle {
  border-radius: 50%;
  background: rgba(100, 160, 255, 0.6);
}

/* Temperature color */
.lg-color {
  border-radius: 50%;
  background: linear-gradient(
    to right,
    hsl(220 80% 60%),
    hsl(40 80% 60%)
  );
}

/* Probability opacity */
.lg-opacity {
  border-radius: 50%;
  background: linear-gradient(
    to right,
    hsl(220 80% 60% / 30%),
    hsl(220 80% 80%)
  );
}

/* Cloud brightness */
.lg-bright {
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255,255,255,0.9),
    rgba(255,255,255,0.2)
  );
}

/* Wind */
.lg-wind {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 14px solid #3d7eed;
  width: 9px !important;
  margin-right: 7px !important;
}

@media (pointer: coarse), (hover: none) {
/**/
  .overlay-group[title]:hover::after, .rainb[title]:hover::after {
	content: attr(title);
	white-space: pre-line;
	display: block;
	position: relative;
	/*top: calc(-45px - var(--rad));
	left: calc(-50px - var(--rad));
	transform: translate(var(--rad), var(--rad));*/
	top: -75px;
	left: -50px;
	font-size: 9pt;
	color: #eef4f7;
	background-color: #00000080;
	min-width: 135px;
	width: fit-content;
	padding: 4px;
	border-radius: 6px;
	z-index: 101;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
  }
}

