/* ==================== 天气浮动卡片样式 ==================== */
/* 右侧固定定位，自动定位显示天气，完美匹配主页风格 */

.weather-float-card {
  position: fixed;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  background: var(--item_bg_color);
  backdrop-filter: blur(var(--card_filter));
  -webkit-backdrop-filter: blur(var(--card_filter));
  border-radius: 16px;
  padding: 20px 16px;
  z-index: 90;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.weather-float-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

html:not([data-theme="Dark"]) .weather-float-card {
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 加载状态 */
.weather-float-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--item_left_text_color);
  font-size: 12px;
  padding: 20px 0;
  justify-content: center;
}

.weather-spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #7db9ff;
  border-radius: 50%;
  animation: wfSpin 0.8s linear infinite;
  flex-shrink: 0;
}

html:not([data-theme="Dark"]) .weather-spinner-sm {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: #3a7bd5;
}

@keyframes wfSpin {
  to { transform: rotate(360deg); }
}

/* 错误 */
.weather-float-error {
  text-align: center;
  color: #ff6b6b;
  font-size: 12px;
  padding: 10px 0;
}

/* 主要内容 */
.weather-float-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.weather-float-icon {
  font-size: 2.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.weather-float-info {
  flex: 1;
  min-width: 0;
}

.weather-float-city {
  font-size: 13px;
  font-weight: 600;
  color: var(--item_left_title_color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.weather-float-temp {
  font-size: 2rem;
  font-weight: 200;
  line-height: 1.1;
  color: var(--item_left_title_color);
}

.weather-float-desc {
  font-size: 12px;
  color: var(--item_left_text_color);
  margin-bottom: 10px;
}

/* 详情行 */
.weather-float-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--item_left_text_color);
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

html:not([data-theme="Dark"]) .weather-float-row {
  border-color: rgba(0, 0, 0, 0.05);
}

/* 预报 */
.weather-float-forecast {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.weather-float-forecast-day {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  transition: all 0.3s ease;
}

html:not([data-theme="Dark"]) .weather-float-forecast-day {
  background: rgba(0, 0, 0, 0.03);
}

.weather-float-forecast-day:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.wff-name {
  font-size: 10px;
  color: var(--item_left_text_color);
  margin-bottom: 2px;
}

.wff-icon {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.wff-temp {
  font-size: 10px;
  color: var(--item_left_title_color);
}

.wff-high { color: #ffa500; }
.wff-low { opacity: 0.5; }

.wff-rain {
  font-size: 9px;
  color: #74b9ff;
  margin-top: 1px;
}

/* 带伞提示 */
.weather-float-tip {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 6px;
}

.weather-float-tip.rain {
  background: rgba(116, 185, 255, 0.12);
  color: #74b9ff;
}

.weather-float-tip.clear {
  background: rgba(0, 210, 160, 0.1);
  color: #00d2a0;
}

/* 更新时间 */
.weather-float-update {
  font-size: 9px;
  color: var(--item_left_text_color);
  opacity: 0.4;
  text-align: right;
}

/* 响应式 - 小屏幕隐藏 */
@media (max-width: 1400px) {
  .weather-float-card {
    display: none;
  }
}
