.container {
  max-width: 1200px;
}

/*--------------------*/
/* COUNTY PAGE STYLES */
/*--------------------*/

/* Zone Selector Styles */
.zone-selector {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
  margin: 0.5em 0;
}

.zone-btn {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: 2px solid var(--color-primary);
  border-radius: var(--border-radius);
  padding: 12px;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.zone-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

.zone-btn.active {
  background-color: var(--color-accent);
  color: var(--color-text);
  border-color: var(--color-accent);
}

/* Mobile Zone Selector */
@media (max-width: 768px) {
  .zone-selector {
    gap: 2px;
    margin: 0.3em 0;
  }

  .zone-btn {
    padding: 10px;
    font-size: 0.8rem;
    min-width: 100px;
  }
}

/* CURRENT CONDITIONS */
.current-container {
  border-radius: 8px;
  margin-bottom: 5px;
  overflow: hidden;
  position: relative;
  width: 100%;
  background-position: top right;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: var(--gradient-header);
}

.weather-desc {
  border-radius: var(--border-radius);
  color: var(--color-text-light);
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
  padding: 0 10px 10px 20px;
  width: 90%;
}

.weather-desc .desc {
  font-family: "Roboto", Arial, sans-serif;
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.weather-desc .details p {
  font-family: "Roboto", Arial, sans-serif;
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  color: var(--color-accent);
  font-weight: 600;
  margin: 3px 0;
}

.weather-temp {
  color: var(--color-accent);
  text-shadow: 3px 2px 1px rgba(0, 0, 0, 1);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 4rem;
  border-radius: var(--border-radius);
  font-weight: bold;
  margin: 0;
}

.weather-bg {
  position: relative;
  display: flex;
  align-items: center;
}

.weather-icon {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
  mask-image: linear-gradient(to right, black 25%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.weather-desc {
  z-index: 1;
  position: relative;
}

#secondary-stations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.other-header {
  background: var(--color-header);
  color: var(--color-text-light);
  padding: 10px 15px;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fontawesome-icon {
  color: var(--color-accent);
}

.other-content {
  padding: 15px 0 0 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.station-chip {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 80px;
  max-width: 200px;
}

.chip-name {
  display: block;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.chip-temp {
  display: block;
  color: #0066cc;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Property references with data attributes */
[id^="current-"] strong {
  font-family: "Roboto", Arial, sans-serif;
  font-weight: bold;
  color: var(--color-text-light);
}

.details .value {
  color: white;
}

#current-location,
#current-obs-time {
  color: var(--color-accent);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.details .place {
  color: white;
}

/* FORECAST SECTION */
#forecast {
  display: flex;
  gap: 5px;
  justify-content: space-evenly;
  margin: 15px 0 10px 0;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) rgba(0, 0, 0, 0.1);
}

#forecast::-webkit-scrollbar {
  height: 8px;
}

#forecast::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

#forecast::-webkit-scrollbar-thumb {
  background-color: var(--color-accent);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#forecast::-webkit-scrollbar-thumb:hover {
  background-color: #e6d900;
}

.forecast-item {
  align-items: center;
  background-color: rgb(241, 241, 241);
  border-radius: 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
  color: var(--color-text);
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 10px;
  text-align: center;
  width: 90px;
}

.forecast-cell {
  font-size: 1rem;
  padding: 5px;
}

.forecast-day {
  align-items: flex-start;
  display: flex;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  justify-content: center;
  line-height: 1.2em;
  margin-bottom: 10px;
  min-height: 2.4em;
}

.forecast-desc {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.forecast-icon img {
  border-radius: 10px;
  height: auto;
  margin-bottom: 5px;
  object-fit: contain;
  width: 90px;
  border-radius: 10px;
}

.forecast-temp {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

/* DETAILED FORECAST */
.detailed-item {
  background-color: rgb(233, 233, 233);
  border-radius: var(--border-radius);
  color: var(--color-text);
  margin-top: 10px;
  padding: 15px;
}

.detailed-row {
  display: block;
  align-items: center;
}

.detailed-icon img {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin: 10px 0;
  border-radius: 15px;
}

.detailed-day {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detailed-forecast {
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

#detailed-forecast {
  display: flex;
  gap: 5px;
  justify-content: space-evenly;
  text-align: center;
  margin: 15px 0 10px 0;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) rgba(0, 0, 0, 0.1);
}

/* METEOGRAM SECTION */
.meteogram-content {
  text-align: center;
  display: none;
  border-radius: var(--border-radius);
}

.meteogram-tab-labels {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 5px;
}

.meteogram-tab {
  background-color: var(--color-primary);
  border-radius: var(--border-radius);
  color: var(--color-text-light);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 8px 10px;
}

.meteogram-tabs input[type="radio"] {
  display: none;
}

/* Make Chart.js meteogram visible when selected */
#meteogram-now:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-24:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-48:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-72:checked ~ .meteogram-tab-content #meteogram-chart-container,
#meteogram-96:checked ~ .meteogram-tab-content #meteogram-chart-container {
  display: block;
  background-color: var(--color-text-light);
  padding: 15px;
  border-radius: var(--border-radius);
  min-height: 400px;
}

/* Active tab styling */
#meteogram-now:checked ~ .meteogram-tab-labels label[for="meteogram-now"],
#meteogram-24:checked ~ .meteogram-tab-labels label[for="meteogram-24"],
#meteogram-48:checked ~ .meteogram-tab-labels label[for="meteogram-48"],
#meteogram-72:checked ~ .meteogram-tab-labels label[for="meteogram-72"],
#meteogram-96:checked ~ .meteogram-tab-labels label[for="meteogram-96"] {
  background-color: var(--color-accent);
  color: var(--color-text);
}

/* Make sure the tab content wrapper is displayed */
.meteogram-toggle:checked
  + .meteogram-title
  + .meteogram-tabs
  .meteogram-tab-content {
  display: block;
}

/* Parameter selection container */
.meteogram-param-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-bottom: 15px;
  padding: 5px;
}

.meteogram-param-item {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.meteogram-param-checkbox {
  margin-right: 5px;
  cursor: pointer;
}

.meteogram-param-item label {
  color: rgb(255, 255, 255);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

#meteogram-chart-container {
  min-height: 400px;
}

canvas#meteogramChart {
  max-width: 100%;
}

/* AFD SECTION */
.afd-content {
  background-color: var(--color-text-light);
  border-radius: var(--border-radius);
  color: var(--color-text);
  display: none;
  font-family: "Fira_Code", monospace;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
  white-space: pre-wrap;
}

/* RADAR SECTION - MAIN PAGE */
.radar-content,
.satellite-content {
  background: var(--gradient-header);
  border-radius: var(--border-radius);
  margin-top: 10px;
  padding: 5px 0;
  color: var(--color-text);
  position: relative;
}

.radar-controls,
.satellite-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding: 5px;
  align-items: center;
}

.radar-select-container,
.satellite-select-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.radar-select,
.satellite-select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  background-color: var(--color-text-light);
}

.radar-label,
.satellite-label {
  text-transform: uppercase;
  font-weight: 800;
}

.radar-button,
.satellite-button {
  padding: 5px 15px;
  border-radius: 5px;
  border: 1px solid var(--color-accent);
  background-color: var(--color-primary);
  color: var(--color-text-light);
  cursor: pointer;
  transition: background-color 0.3s;
}

.radar-button:hover,
.satellite-button:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
}

.radar-button:disabled,
.satellite-button:disabled {
  background-color: #666;
  border-color: #888;
  color: #ddd;
  cursor: not-allowed;
  opacity: 0.7;
}

.radar-image-container,
.satellite-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.radar-image {
  width: 600px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.satellite-image-container {
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.satellite-image {
  width: 100%;
  object-fit: cover;
  transform-origin: top right;
  transition: transform 0.3s ease;
}

.radar-timestamp,
.satellite-timestamp {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-family: "Fira_Code", monospace;
  font-size: 0.8rem;
}

.radar-loading,
.radar-error,
.satellite-loading,
.satellite-error {
  padding: 30px 20px;
  text-align: center;
  font-family: "Fira_Code", monospace;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.radar-error,
.satellite-error {
  color: var(--color-alert);
  display: none;
  line-height: 1.5;
}

.radar-error i,
.radar-loading i,
.satellite-error i,
.satellite-loading i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Radar Controls Layout */
.radar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  align-items: end;
}

.radar-select-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
}

.radar-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.radar-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
  color: var(--color-text);
  min-height: 38px;
}

.radar-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(255, 242, 0, 0.3);
}

/* RADAR CONTENT - COUNTY PAGES */
.radar-content {
  position: relative;
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
  min-height: 300px;
}

.radar-image-container {
  position: relative;
  width: 100%;
  text-align: center;
}

.radar-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.radar-timestamp {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: monospace;
}

.radar-loading,
.radar-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--color-text-light);
  text-align: center;
  min-height: 250px;
}

.radar-loading,
.radar-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 95%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--color-text-light);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
}

.radar-loading span,
.radar-error span {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.radar-loading small,
.radar-error small {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 300px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .radar-controls {
    flex-direction: row; /* Keep horizontal instead of column */
    gap: 10px; /* Reduce gap for tighter spacing */
    align-items: end; /* Keep alignment */
  }

  .radar-select-container {
    min-width: unset;
    flex: 1; /* Allow containers to share available space */
  }

  .radar-label,
  .radar-select {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .radar-loading,
  .radar-error {
    padding: 30px 15px;
    min-height: 200px;
  }

  .radar-loading i,
  .radar-error i {
    font-size: 1.5rem;
  }

  .radar-loading span,
  .radar-error span {
    font-size: 1rem;
  }

  .radar-loading small,
  .radar-error small {
    font-size: 0.8rem;
  }
}

/* Add these styles to your existing CSS for satellite cropping */

/* Satellite Controls Layout */
.satellite-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  align-items: end;
}

.satellite-select-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}

.satellite-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.satellite-select {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
  color: var(--color-text);
  min-height: 38px;
}

.satellite-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(255, 242, 0, 0.3);
}

/* Satellite Content */
.satellite-content {
  position: relative;
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
}

.satellite-image-container {
  position: relative;
  width: 100%;
  height: 400px; /* Fixed height for consistent cropping */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main cropping styles for NC region from Eastern US view */
.satellite-image-cropped {
  width: 100%;
  height: 445%;
  object-fit: cover;

  /* Position to show NC area (center-left of EUS image) */
  object-position: 0% 50%; /* Adjust these percentages to fine-tune NC position */

  /* Could also use minimal scaling if needed */
  /* transform: scale(1.2) translate(-10%, 0%); */
}

/* For animated GIFs, might need slightly different positioning */
.satellite-image-container img[src*=".gif"] {
  object-position: 40% 50%; /* Slightly different position for animated EUS */
}

.satellite-timestamp {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: monospace;
}

.satellite-loading,
.satellite-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 95%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--color-text-light);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
}

.satellite-loading i,
.satellite-error i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--color-accent);
}

.satellite-loading span,
.satellite-error span {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.satellite-loading small,
.satellite-error small {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 300px;
}

/* Alternative cropping method using CSS transform */
.satellite-image-transform {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transform: scale(2.5) translate(20%, -15%);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .satellite-controls {
    flex-direction: row; /* Keep horizontal instead of column */
    gap: 10px; /* Reduce gap for tighter spacing */
    align-items: end; /* Keep alignment */
  }

  .satellite-select-container {
    min-width: unset;
    flex: 1; /* Allow containers to share available space */
  }

  .satellite-label,
  .satellite-select {
    font-size: 0.8rem;
  }

  .satellite-image-container {
    height: 300px; /* Smaller on mobile */
  }

  /* Adjust cropping for mobile - EUS positioning */
  .satellite-image-cropped {
    width: 100%;
    height: 425%;

    object-position: 5% 50%;
  }

  .satellite-timestamp {
    font-size: 0.7rem;
    bottom: 5px;
    left: 5px;
  }
}

@media (max-width: 600px) {
  .satellite-loading,
  .satellite-error {
    padding: 30px 15px;
    min-height: 200px;
  }

  .satellite-loading i,
  .satellite-error i {
    font-size: 1.5rem;
  }

  .satellite-loading span,
  .satellite-error span {
    font-size: 1rem;
  }

  .satellite-loading small,
  .satellite-error small {
    font-size: 0.8rem;
  }

  .satellite-image-container {
    height: 250px;
  }
  .satellite-image-cropped {
    width: 100%;
    height: 500%;

    object-position: 25% 50%;
  }
}

@media (max-width: 480px) {
  .radar-controls,
  .satellite-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .radar-select-container,
  .satellite-select-container {
    flex-direction: row;
    width: 100%;
  }
}

/* Media Queries for County Pages */
@media (max-width: 768px) {
  .weather-temp {
    background-color: transparent;
    font-size: 3.5rem;
  }

  .meteogram-param-container {
    gap: 2px;
  }

  .meteogram-param-item {
    padding: 4px 6px;
  }

  .meteogram-param-item label {
    font-size: 0.7rem;
  }
}

@media (max-width: 600px) {
  .weather-temp {
    font-size: 4rem;
  }

  .weather-icon {
    width: 100%;
  }

  .weather-desc {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    width: 100%;
  }

  .detailed-icon img {
    width: 150px;
    height: auto;
  }

  .detailed-forecast {
    font-size: 0.7rem;
  }

  .radar-select,
  .satellite-select {
    font-size: 0.7rem;
  }

  .meteogram-param-container {
    gap: 1px;
    padding: 1px;
  }

  .meteogram-param-item {
    padding: 4px 5px;
    font-size: 0.5rem;
    font-weight: 600;
  }
}
