:root {
  --background: #fff8f0;
  --primary-text: #767522;
  --primary-accent: #f4d06f;
  --primary-action: #ff4a1c;
  --secondary-accent: #9dd9d2;
  --secondary-text: #000000;
  --weather-color: #f4d06f;
  --blue-100: #e3eefa;
}
* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  font-family: "DM Sans", sans-serif;
}
.main-section {
  background: var(--background);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
}
.weather-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: min(400px, 100%);
}

/* 1st sub-section */
.header {
  display: flex;
  flex-direction: column;
  /* gap: 2px; */
}
.main-text {
  color: var(--primary-text);
  font-size: 2.25rem;
  font-weight: 600;
  text-align: center;
}
.sub-text {
  color: var(--primary-text);
  font-size: 0.875rem;
  text-align: center;
}

/* 2nd sub-section */
.search-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
}
.search-input {
  background: none;
  border: 1px solid var(--secondary-accent);
  padding: 9px 15px;
  min-width: 0;
  width: 100%;
  border-radius: 20px;
  max-height: 50px;
}
.search-input::placeholder {
  color: var(--primary-text);
  font-weight: 200;
  font-size: 0.75rem;
}
.search-button {
  padding: 9px 9px;
  background: var(--secondary-accent);
  border: none;
  border-radius: 5px;
  color: var(--primary-text);
  cursor: pointer;
}

/* 3rd sub-section */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #ffffff;
  padding: 30px 20px;
  border-radius: 20px;
  width: min(620px, 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.07);
}
/* 1st part */
.sub-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sub-left-details {
  display: flex;
  flex-direction: column;
  /* gap: 2px; */
}
.day {
  font-size: 0.875rem;
  font-weight: 600;
}
.location {
  font-size: 0.75rem;
  font-weight: 400;
}
.current-time {
  font-size: 0.75rem;
  font-weight: 400;
}
/* 2nd part */
.weather-main-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* .weather-left-main-details {
} */
.main-temerature {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--weather-color);
  line-height: 50px;
}
.other-temerature {
  font-size: 0.875rem;
  font-weight: 500;
}
.weather-right-main-details {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.weather-icon {
  font-size: 64px;
  color: var(--weather-color);
}
.weather-condition {
  font-size: 0.75rem;
  font-weight: 400;
}
.weather-conditions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.weather-cond {
  padding: 20px 15px;
  background: var(--blue-100);
  min-width: 100px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.condition-icon {
  font-size: 1rem;
  font-weight: 400;
}
.condition-description {
  font-size: 0.8rem;
  font-weight: 500;
}
.condition-value {
  font-size: 0.7rem;
  font-weight: 400;
}

/* Loading Overlay */
.dashboard {
  position: relative;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  z-index: 10;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--secondary-accent);
  border-top-color: var(--primary-text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: var(--primary-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.weather-content.loading {
  opacity: 0.3;
  pointer-events: none;
}

@media (max-width: 720px) {
  .main-section {
    align-items: center;
    padding: 24px 14px;
  }

  .weather-wrapper {
    width: 100%;
    gap: 12px;
  }

  .main-text {
    font-size: 1.75rem;
  }

  .search-section {
    width: 100%;
  }

  .search-button {
    padding: 10px 12px;
  }

  .dashboard {
    width: 100%;
    padding: 22px 16px;
  }

  .sub-details {
    flex-direction: row;
    align-items: center;
    /* justify-content: center; */
    gap: 4px;
  }

  .weather-main-details {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .weather-conditions {
    flex-direction: row;
  }

  .weather-cond {
    width: 100%;
  }

  .weather-icon {
    font-size: 48px;
  }
}
