body {
  box-sizing: border-box;
  margin: 0;
  font-family: "Roboto", sans-serif;
}

.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
}

.app-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 0 5px rgb(193, 193, 193);
}


/* ----- styling for search bar ----- */

.search-container {
  position: absolute;
  top: 20px;
  padding: 0 40px;
  gap: 4px;
  display: flex;
  align-items: center;
  z-index: 1000;
}

.search-btn,
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: white;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.search-btn:hover {
  transform: scale(1.1);
  color: #d1d1d1;
}

.close-btn {
  display: none;
}

.close-btn:hover {
  transform: scale(1.1);
  color: #d1d1d1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-left: 8px;
  padding-left: 4px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-width 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

.search-box.active {
  max-width: 250px;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

#search-input {
  border: none;
  outline: none;
  font-size: 16px;
  min-width: 0;
  flex: 1;
  color: #333;
  background: transparent;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-btn-right {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 16px;
  color: white;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.search-btn-right:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* ------------------- */


.weather-overview {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 580px;
  padding: 0 40px;
  color: white;
  clip-path: ellipse(110% 75% at 50% 10%);
  z-index: 0;
}


/* ----- classes for changing background image depending on location ----- */

.default-image {
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("./images/default.jpg");
    background-size: cover;
    background-position: center;  
}

.stockholm {
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("./images/stockholm.jpg");
    background-size: cover;
    background-position: center;  
}

.goteborg {
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("./images/goteborg.jpg");
    background-size: cover;
    background-position: center;  
}

.umea {
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("./images/umea.jpg");
    background-size: cover;
    background-position: center;  
}

/* ------------------- */

.weather-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.weather-effect.rain span {
  position: absolute;
  top: -10%;
  width: 2px;
  height: 15px;
  background: rgba(255, 255, 255, 0.6);
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0);
    opacity: 0.8;
  }
  100% {
    transform: translateY(500px);
    opacity: 0;
  }
}

.weather-summary {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}

.weather-text {
  position: relative;
  margin-top: 72px;
}

.time-condition-flex-container {
  display: flex;
  gap: 24px;
  align-items: center;
}

.weather-condition {
  display: flex;
  align-items: center;
  gap: 5px;
}

.weather-condition .weather-icon {
  display: flex;
  min-width: 55px;
  height: auto;
}

h1 {
  font-size: 60px;
  font-weight: 400;
  margin: 16px 0;
}

h2 {
  font-size: 32px;
  font-weight: 300;
  margin: 0;
}

h3 {
  font-size: 20px;
  font-weight: 300;
  margin: 12px 0;
}

.sunrise-sunset {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  margin-top: 24px;
}



.arrow-button {
  position: absolute;
  top: 48%;
  left: 80%;
  transform: translate(-50%, -50%);
  width: 101px;
  height: 101px;
  border-radius: 50%;
  font-size: 44px;
  background-color: rgba(117, 122, 255, 1);
  color: white;
  border: none;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  cursor: pointer;
}


.weekly-details {
  margin-top: 7px;
  padding-bottom: 32px;
}

.day-box {
  display: flex;
  justify-content: space-around;
  border-radius: 76px;
  padding: 7px 0px;
}

.day-box:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.details {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 180px;
}


@media (min-width: 668px) {
  
  .app-container{
  margin: 30px auto;
  }

}