/* General Text Styling */
body,
.weather-card,
.totals-placeholder {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1;
  background-color: var(--bg);
  text-align: left;
  transition: background-color 0.5s ease-in, color 0.5s ease-in,
    background-image 0.5s ease-in;
}

h1 {
  font-size: 3rem;
  text-align: center;
}

/* Header */
.main-header {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1rem;
  text-align: center;
}

/* Tabs and Buttons */
.tabs,
.sort-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem auto;
}

.tab-button,
.sort-button {
  background-color: var(--button-background);
  border-color: var(--button-border-color);
}

.tab-button {
  padding: 20px;
  border-top-left-radius: 35%;
  border-top-right-radius: 35%;
}

.tab-button.active {
  font-weight: bold;
}

.tab-button:hover {
  background-color: #e0e0e0;
  transition: background-color 0.3s ease;
}

.tab-button i {
  color: red;
  margin-right: 0.5rem;
}

.sort-button.active {
  border-color: red;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Containers */
#locations-container,
#favorites-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 15px;
  gap: 2rem;
  margin: 1rem auto;
}

#locations-totals,
#favorites-totals {
  display: flex;
  justify-content: center;
}

/* Favorite Icon */
.favorite-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  color: red;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
}

.favorite-icon:hover {
  transform: translateY(-4px);
}

/* Weather Card */
.weather-card,
.totals-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 300px;
  background-color: var(--button-background);
  padding: 20px;
  border-radius: 12px;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-size: 1.1rem;
  line-height: 1.5;
  text-align: center;
}

/* Card Sections */
.weather-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
}

.location {
  font-weight: 600;
}

.temp-desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.temperature {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.2rem;
}

.temperature .value {
  font-size: 3rem;
  font-weight: 900;
}

.description {
  font-size: 1rem;
  line-height: 1.2;
  max-width: 22ch;
}

.weather-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.weather-footer > .left,
.weather-footer > .right {
  display: flex;
  flex-direction: column;
  flex: 1;
  font-size: 1rem;
}
