/**
 * WSG Weather - Frontend Stylesheet
 * Scoped under .wsg-weather
 */

.wsg-weather {
  max-width: 720px;
  margin: 1.5rem auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #2c3e50;
}

.wsg-weather-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (min-width: 600px) {
  .wsg-weather-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wsg-field {
  display: flex;
  flex-direction: column;
}

.wsg-field-full {
  grid-column: 1 / -1;
}

.wsg-field label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: #1d2327;
}

.wsg-field select,
.wsg-field input[type='number'],
.wsg-field input[type='text'] {
  padding: 0.5rem;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
  color: #2c3e50;
  width: 100%;
  box-sizing: border-box;
}

.wsg-field select:focus,
.wsg-field input:focus {
  border-color: #2271b1;
  outline: none;
  box-shadow: 0 0 0 1px #2271b1;
}

.wsg-elevation-hint-box {
  background: #f6f7f7;
  border-left: 4px solid #2271b1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #50575e;
  border-radius: 0 4px 4px 0;
}

.wsg-advanced-details {
  margin: 1rem 0;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 0.75rem;
  background: #f9f9f9;
}

.wsg-advanced-details summary {
  font-weight: 600;
  cursor: pointer;
  color: #2271b1;
}

.wsg-advanced-grid {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.wsg-checkbox-field {
  justify-content: flex-start;
  flex-direction: row;
  align-items: center;
}

.wsg-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.wsg-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.wsg-error-message {
  color: #d63638;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Results & Cards */
.wsg-weather-results {
  margin-top: 1.5rem;
}

.wsg-empty-state {
  text-align: center;
  padding: 2rem;
  background: #f6f7f7;
  border-radius: 6px;
  color: #646970;
  font-style: italic;
}

.wsg-forecast-header-card {
  background: #f0f6fc;
  border: 1px solid #cce5ff;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.wsg-header-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.35rem;
  color: #09347a;
}

.wsg-header-meta {
  font-size: 0.9rem;
  color: #3c434a;
  margin-bottom: 0.2rem;
}

.wsg-header-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.wsg-header-actions button {
  background: #fff;
  border: 1px solid #2271b1;
  color: #2271b1;
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wsg-header-actions button:hover {
  background: #f0f6fc;
}

.wsg-day-card {
  background: #ffffff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.wsg-day-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #1d2327;
  border-bottom: 1px solid #f0f0f1;
  padding-bottom: 0.3rem;
}

.wsg-weather-stats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.wsg-stat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wsg-stat-effective {
  font-weight: 600;
  color: #b32d2e;
}

.wsg-day-notes {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #646970;
}

/* Special event banner tints */
.wsg-special-banner-heat {
  border-left: 4px solid #dba617;
  background-color: #fff9e6;
}

.wsg-special-banner-cold {
  border-left: 4px solid #72aee6;
  background-color: #f0f6fc;
}

.wsg-special-banner-storm {
  border-left: 4px solid #d63638;
  background-color: #fce8e6;
}

.wsg-special-banner-wind {
  border-left: 4px solid #8c8f94;
  background-color: #f6f7f7;
}

.wsg-special-alert {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  .wsg-weather,
  .wsg-weather * {
    visibility: visible;
  }
  .wsg-weather {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .wsg-weather-form,
  .wsg-header-actions {
    display: none !important;
  }
}
