/* Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.  */
html {-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;}

/*  apply a natural box layout model to all elements  */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Normalize */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body styling */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to bottom, #bcd3f0, #eaf2fb);
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #99afd7;
  color: white;
  width: 100%;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000; /* keeps header and settings visible */
}

header span {
  cursor: pointer;
  font-size: 1.4rem;
}

/* Make sure the button or icon for settings is visible */
#settings {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#settings img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1); /* makes it white on blue header */
  transition: transform 0.2s ease;
}

#settings:hover img {
  transform: rotate(45deg);
}

#town {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Weather card */
#weatherCard {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  width: 90%;
  max-width: 280px;
  text-align: center;
  position: relative; /* allows modal to overlay perfectly */
}

#weatherCard img {
  width: 80px;
  height: 80px;
  margin-top: 0.5rem;
}

.temperature {
  font-size: 1.5rem;
  font-weight: 600;
  color: #3367d6;
  margin: 0.5rem 0;
}

.date, .humidity, .wind, .feels {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

/* Modal (aside) — overlays perfectly on weatherCard */
aside {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

aside.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-align: center;
  padding: 1.5rem;
  z-index: 999;
  opacity: 1;
}

aside p {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #333;
}

aside input {
  padding: 0.7rem;
  width: 85%;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

aside button {
  background-color: #3367d6;
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

aside button:hover {
  background-color: #274fb3;
  transform: scale(1.03);
}

/* Footer */
footer {
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 1rem;
  background-color: #c5cbd6;
  color: #333;
  font-size: 0.9rem;
  position: relative; /* replaces absolute to prevent overlap */
}
