/**
 * Weather Radar Widget CSS
 * 天气雷达小部件样式
 */

/* 天气雷达小部件容器 - 磁贴样式 */
.weather-radar-widget {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  min-height: 180px;
}

.weather-radar-widget:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-mode .weather-radar-widget {
  background-color: rgba(30, 30, 30, 0.2);
}

.dark-mode .weather-radar-widget:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* 雷达地图容器 */
.weather-radar-map-container {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.weather-radar-map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* 雷达标题 */
.weather-radar-title {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 点击提示 */
.weather-radar-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.weather-radar-hint i {
  font-size: 12px;
}

/* 加载状态 */
.weather-radar-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.weather-radar-loading i {
  font-size: 24px;
  animation: spin 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

/* Leaflet地图样式覆盖 */
.weather-radar-map .leaflet-container {
  background: transparent;
  font-family: inherit;
}

.weather-radar-map .leaflet-control-container {
  display: none; /* 隐藏所有控制器 */
}

.weather-radar-map .leaflet-tile-pane {
  opacity: 0.7; /* 降低底图透明度 */
}

/* 移动端优化 */
@media (max-width: 768px) {
  .weather-radar-widget {
    min-height: 150px;
    margin-bottom: 12px;
  }

  .weather-radar-title {
    font-size: 11px;
    padding: 3px 6px;
  }

  .weather-radar-hint {
    font-size: 10px;
    padding: 3px 6px;
  }
}