/**
 * TCMS Weather Widget Styles
 */

.tcms-weather-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
}

/* Light theme */
.tcms-theme-light {
  background: linear-gradient(to right, #f9f9f9, #f1f1f1);
  color: #333;
}

/* Dark theme */
.tcms-theme-dark {
  background: linear-gradient(to right, #2c3e50, #1a1a2e);
  color: #fff;
}

/* Header */
.tcms-weather-header {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tcms-theme-dark .tcms-weather-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tcms-weather-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Current weather */
.tcms-weather-current {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tcms-weather-icon img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
}

.tcms-weather-temp {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.tcms-weather-description {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-transform: capitalize;
}

.tcms-weather-details {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Forecast */
.tcms-weather-forecast {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.5rem;
}

.tcms-weather-forecast::-webkit-scrollbar {
  height: 6px;
}

.tcms-weather-forecast::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.tcms-weather-forecast::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
}

.tcms-theme-dark .tcms-weather-forecast::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.tcms-theme-dark .tcms-weather-forecast::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
}

.tcms-forecast-day {
  flex: 0 0 auto;
  width: 100px;
  padding: 1rem 0.5rem;
  text-align: center;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.tcms-theme-dark .tcms-forecast-day {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.tcms-forecast-day:last-child {
  border-right: none;
}

.tcms-forecast-date {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.tcms-forecast-icon img {
  width: 50px;
  height: 50px;
  margin-bottom: 0.25rem;
}

.tcms-forecast-temp {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.tcms-forecast-temp .high {
  font-weight: 600;
}

.tcms-forecast-temp .low {
  opacity: 0.7;
}

/* Footer */
.tcms-weather-footer {
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.6;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tcms-theme-dark .tcms-weather-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Error messages */
.tcms-weather-error {
  padding: 1rem;
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffeeba;
  margin: 1rem 0;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .tcms-weather-temp {
    font-size: 2rem;
  }

  .tcms-weather-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tcms-forecast-day {
    width: 80px;
  }
}

/* 
* Weather Widget CSS for TCMS Destination Weather Widget
* Save this file to: plugin_dir/assets/css/weather-widget.css
*/

.tcms-weather-widget {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: #333;
}

/* Header styles */
.tcms-weather-header h3 {
  margin: 0 0 5px;
  font-size: 1.4em;
  color: #2c3e50;
}

.tcms-weather-updated {
  color: #7f8c8d;
  font-size: 0.8em;
  margin-bottom: 15px;
}

/* Current weather section */
.tcms-weather-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ecf0f1;
}

.tcms-weather-icon {
  margin-right: 15px;
}

.tcms-weather-temp {
  font-size: 2em;
  font-weight: bold;
  margin-right: 15px;
  color: #2980b9;
}

.tcms-weather-condition {
  font-size: 1.2em;
  margin-right: 15px;
  color: #34495e;
}

.tcms-weather-details {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
  width: 100%;
}

.tcms-weather-detail {
  display: inline-block;
  background: #f8f9fa;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.9em;
}

.detail-label {
  font-weight: bold;
  color: #7f8c8d;
}

/* Forecast section */
.tcms-weather-forecast {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.tcms-forecast-day {
  text-align: center;
  padding: 15px 10px;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 100px;
  transition: all 0.2s ease;
}

.tcms-forecast-day:hover {
  background: #f8f9fa;
  border-radius: 8px;
}

.forecast-date {
  font-weight: bold;
  margin-bottom: 8px;
  color: #34495e;
}

.forecast-icon img {
  height: 50px;
  width: auto;
}

.forecast-temp {
  margin: 8px 0;
}

.forecast-high {
  font-weight: bold;
  margin-right: 8px;
  color: #e74c3c;
}

.forecast-low {
  color: #3498db;
}

.forecast-condition {
  font-size: 0.9em;
  color: #7f8c8d;
}

/* Layout specific styles */
.tcms-weather-horizontal .tcms-weather-forecast {
  justify-content: space-between;
}

.tcms-weather-vertical .tcms-forecast-day {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ecf0f1;
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
}

.tcms-weather-vertical .forecast-date {
  flex: 1;
  margin-bottom: 0;
}

.tcms-weather-vertical .forecast-icon {
  margin: 0 15px;
}

.tcms-weather-vertical .forecast-temp {
  margin: 0 15px;
}

/* Footer styles */
.tcms-weather-footer {
  margin-top: 15px;
  text-align: right;
  color: #95a5a6;
  font-size: 0.8em;
}

.tcms-weather-footer a {
  color: #3498db;
  text-decoration: none;
}

.tcms-weather-footer a:hover {
  text-decoration: underline;
}

/* Error message */
.tcms-weather-error {
  background: #fff0f0;
  color: #e74c3c;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #fcc;
  text-align: center;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tcms-weather-horizontal .tcms-forecast-day {
    min-width: 80px;
    padding: 10px 5px;
  }

  .tcms-weather-temp {
    font-size: 1.6em;
  }

  .tcms-weather-condition {
    font-size: 1em;
  }
}

@media (max-width: 576px) {
  .tcms-weather-horizontal {
    display: flex;
    flex-direction: column;
  }

  .tcms-weather-horizontal .tcms-weather-forecast {
    flex-direction: column;
  }

  .tcms-weather-horizontal .tcms-forecast-day {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ecf0f1;
  }

  .tcms-weather-horizontal .forecast-date {
    flex: 1;
    margin-bottom: 0;
  }

  .tcms-weather-horizontal .forecast-icon {
    margin: 0 10px;
  }
}
