/* Weather Widget Styles */

.weather-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 8px;
}

.weather-widget.loaded {
  opacity: 1;
}

.weather-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.weather-link:hover {
  background-color: rgba(102, 126, 234, 0.1);
}

.weather-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weather-temp {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* Small weather icons for widget */
.weather-icon-small {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

/* Simplified icon styles for compact display */
.icon-sunny::before {
  content: '☀️';
  font-size: 20px;
  line-height: 24px;
}

.icon-cloudy::before {
  content: '☁️';
  font-size: 20px;
  line-height: 24px;
}

.icon-rainy::before {
  content: '🌧️';
  font-size: 20px;
  line-height: 24px;
}

.icon-sun-shower::before {
  content: '🌦️';
  font-size: 20px;
  line-height: 24px;
}

.icon-thunder-storm::before {
  content: '⛈️';
  font-size: 20px;
  line-height: 24px;
}

.icon-flurries::before {
  content: '🌨️';
  font-size: 20px;
  line-height: 24px;
}

.icon-error::before {
  content: '❓';
  font-size: 20px;
  line-height: 24px;
  opacity: 0.5;
}

/* Tooltip styles */
.weather-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  padding: 12px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
}

.weather-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Tooltip arrow */
.weather-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: var(--surface, #ffffff);
  border-left: 1px solid var(--border, #e0e0e0);
  border-top: 1px solid var(--border, #e0e0e0);
  transform: rotate(45deg);
}

.tooltip-location {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.tooltip-condition {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.tooltip-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .weather-tooltip {
    background: var(--surface, #1e1e1e);
    border-color: var(--border, #404040);
  }
  
  :root:not([data-theme="light"]) .weather-tooltip::before {
    background: var(--surface, #1e1e1e);
    border-color: var(--border, #404040);
  }
  
  :root:not([data-theme="light"]) .weather-link:hover {
}

/* Mobile responsive */
@media (max-width: 768px) {
  .weather-widget {
    margin-left: 4px;
  }

  .weather-link {
    padding: 4px 8px;
  }

  .weather-temp {
    font-size: 13px;
  }

  .weather-icon-small {
    width: 20px;
    height: 20px;
  }

  .icon-sunny::before,
  .icon-cloudy::before,
  .icon-rainy::before,
  .icon-sun-shower::before,
  .icon-thunder-storm::before,
  .icon-flurries::before,
  .icon-error::before {
    font-size: 16px;
    line-height: 20px;
  }

  .weather-tooltip {
    right: -8px;
    min-width: 180px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .weather-temp {
    font-size: 12px;
  }
}
