/* --------------------
   Tímaflakk panel
   Appears below Málsetningar and expands downward
-------------------- */
.time-travel-panel {
  background: var(--tsa-white);
  border-radius: 12px;
  padding: 12px 14px;
  border-top: 5px solid var(--tsa-blue);
  box-shadow: var(--tsa-shadow);
  font-family: Arial, sans-serif;
  width: 245px;
  color: #102a4c;
}

.time-travel-panel-title {
  color: var(--tsa-blue);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tsa-light-blue);
}

.time-travel-panel.active {
  border-top-color: var(--tsa-red);
}

.time-travel-content {
  padding-top: 8px;
}

.time-travel-content.collapsed {
  display: none;
}

.time-travel-content label {
  display: block;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 3px;
}

.time-travel-content select {
  width: 100%;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #aaa;
}

.time-travel-buttons {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.time-travel-buttons button {
  flex: 1;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 7px 8px;
  font-weight: 700;
}

#time-travel-start {
  background: var(--tsa-blue);
  color: white;
}

#time-travel-stop {
  background: #ddd;
  color: #222;
}

#time-travel-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  border-left: 1px solid #666;
  border-right: 1px solid #666;
  z-index: 1000;
  cursor: ew-resize;
  touch-action: none;
}

#time-travel-divider::after {
  content: "|||";
  position: absolute;
  top: 50%;
  left: -12px;
  transform: translateY(-50%);
  background: white;
  color: #555;
  border: 1px solid #666;
  border-radius: 4px;
  padding: 4px 5px;
  font-size: 11px;
}

.leaflet-pane img {
  will-change: clip-path;
}

/* Hide Tímaflakk on phones and tablets */
@media (max-width: 1024px) {
  .time-travel-panel,
  #time-travel-divider {
    display: none !important;
  }
}


.time-travel-panel.is-hidden {
  display: none !important;
}


.time-travel-panel-title {
  gap: 8px;
  user-select: none;
}

.time-travel-panel {
  z-index: 5600;
}

/* --------------------
   Hide Tímaflakk on phones/tablets in both portrait and landscape
-------------------- */
@media (pointer: coarse), (hover: none), (max-width: 1024px), (max-height: 520px) {
  .time-travel-panel,
  #time-travel-divider {
    display: none !important;
    pointer-events: none !important;
  }
}
