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

html, body {
    height: auto;
    min-height: 100vh;
}

body {
  position: relative;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, 'sans-serif'; 
  background: 
                  linear-gradient(
                  to bottom,
                  #c7e6ff 0%,
                  #a8d8ff 25%,
                  #7fc0ff 55%,
                  #5aa8ff 80%,
                  #3e8eff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* TYPO START */
h1 {
  font-size: 1.8rem;
  color: #004b87;
  margin: 0;
  padding-top: 5px;
  padding-bottom: 10px;
}
/* TYPO END */

/* TYPO END */


.container {
     width: 90%;
     max-width: 600px;
}

.header {
    color: #000000;
    background-color: rgba(255, 255, 255, 0.4); /* semi-transparent */
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 20px;
    height: fit-content;
    text-align: center;
}

input {
    padding: 0.2rem;
    border: 1px solid #000768;
    border-radius: 5px 1px 5px 1px;
    width: 60%;
}

button {
    background-color: #fff;
    padding: 0.2rem 1rem;
    border-radius: 5px 1px 5px 1px;
    cursor: pointer;
}

button:hover {
    background-color: #327D96;
}

.card {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.0); /* semi-transparent */
    backdrop-filter: blur(5px);
    
}

.weathercard {
    color: #000000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 20px;
    height: fit-content;
    text-align: center;
    position: relative;
    margin-bottom: 1rem;
    min-width: 250px;
    display: flex;
    
}

.weather {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 90%;
  margin: auto;
}

 

/* = LOGO  = */
header {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.logo {
    position: absolute;
    top: 15px;      
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
    z-index: 1;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: black;
  transition: color 0.2s ease;
}

.weathercard:focus {
  outline: 3px solid #004b87;
  outline-offset: 5px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Default layout – kolumn */
#weatherResult {
  display: flex;
  flex-direction: column;
  /* gap: 1rem; */
}

.row-layout {
  flex-direction: row !important;
  flex-wrap: wrap;
}

#weatherResult.row-layout {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
}

#weatherResult.row-layout .weathercard {
  min-width: 250px;
  max-width: 250px;
  min-height: 300px;
  max-height: 300px;
}

#toggleLayoutBtn {
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  #toggleLayoutBtn {
    display: none;
  }
}


/* styling för listan, kan behöva fixas */

.city-dropdown {
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;

  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

  font-size: 0.9rem;
  text-align: left;
}

.city-dropdown li {
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.city-dropdown li:last-child {
  border-bottom: none;
}

.city-dropdown li:hover {
  background-color: rgba(0, 75, 135, 0.1);
}

.city-dropdown li:focus {
  outline: none;
  background-color: rgba(0, 75, 135, 0.25);
}
