@import url('https://fonts.googleapis.com/css2?family=Caveat&family=Nunito&display=swap');

/* Global styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    text-align: center;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: #f2f2f2;
  }
  
  header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.2rem;

    color: #fff;
  }

  a {
    color: #664646;
    text-decoration: none;
  }
  
  a:hover {
    color: #94c566;
  }
  
  i.fa-check {
    color: #94c566;
    font-size: large;
  }

/* logo styling */

  .logo {
    max-width: 90%;
    margin: 0 auto;
    padding: 1rem 1rem;
  }

/* main image styling */

  .main-img img{
    max-width: 90%;
    margin: 0 auto;
    padding: 1rem 1rem;
  }

  p {
    margin-bottom: 1rem;
  }

/* button styling */

  button {
    padding: 0.5rem 1rem;
    margin-bottom: 10px;
    background-color: #94c566;
    font-size: 1.2rem;
    font-family: 'Caveat', cursive;
    font-weight: bold;
    text-transform: uppercase;
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  button:hover {
    background-color: #664646;
  }

/* intro text styling  */

  .intro-text {
    max-width: 800px;
    padding: 0.5rem 1rem;
    margin: 0 auto;
  }

  .intro-text h3 {
    color: #664646;
    text-shadow: 0.3px 0.3px black;
  }

/* icon container styling */
  
  .backpack-icon-container {
    position: relative;
    display: inline-block;
  }
  
  #backpack-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    display: block;
    width: 25px;
    height: 25px;
    background-color: #f44336;
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    font-weight: bold;
    font-size: small;
    color: white;
  }

  #weather-widget {
    max-width:800px;
    margin:0 auto;
  }

  #location-input {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    width:50%;
  }
  
  #search-location {
    width:40%;
    padding: 0.6rem;
    margin-bottom: 1rem;
  }
  
/* Weather data container styles */
.weather-data {
  background: rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(21px);
  backdrop-filter: blur(21px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 5px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 90%;
  margin: 0 auto;
  margin-bottom: 1rem;
}


.location-text {
  font-family: 'Caveat', cursive;
  font-size: xx-large;
}

.city-name {
  font-weight: bold;
}

.weather-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 1rem;
}

/* Weather data elements styles */
.temperature,
.description,
.wind-speed {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  text-align: left;
}

#weather-icon-container {
  display: flex;
  flex-direction: column;
  justify-content: right;
  margin-left: auto;
}

.weather-icon {
  display: none;
  width: 150px;
  height: 150px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* For tablet devices */
@media screen and (max-width: 768px) {
  .weather-icon {
    width: 100px;
    height: 100px;
  }
}

/* For mobile devices */
@media screen and (max-width: 480px) {
  .weather-icon {
    width: 75px;
    height: 75px;
  }
}


.cloudy {
  background-image: url('../images/weather-widget/cloudy.svg');
}

.rain {
  background-image: url('../images/weather-widget/rain.svg');
}

.snow {
  background-image: url('../images/weather-widget/snow.svg');
}

.sunny {
  background-image: url('../images/weather-widget/clear-day.svg');
}

.thunderstorms {
  background-image: url('../images/weather-widget/thunderstorms.svg');
}

.city {
  text-align: center;
  margin-bottom: 0.5rem;
  flex-basis: 100%;
}

/* Accordion section styling */

  .accordion {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .accordion-button {
    width: 90%;
    padding: 0.8rem;
    font-size: 1.2rem;
    font-family: 'Caveat', cursive;
    font-weight: bold;
    border: none;
    border-bottom: 1px solid #ccc;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 1s ease;
  }
  
  .accordion-button:hover {
    background-color: #AE7878;
  }
  
  .accordion-content {
    margin-top: 0.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align:left;
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease;
  }
  
  .accordion-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .accordion-content li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    font-size: large;
  }
  
  .accordion-content h4, p {
    padding: 1rem;
  }
  
  .active {
    max-height: 500px;
  }
  
/* Backpack modal styling */

  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(218, 218, 218);
    transition: all 0.4s ease;
    opacity: 0;
    transform: scale(0.9);
  }

 .modal.visible {
    display: block;
    opacity: 1;
    transform: scale(1);
  }

  #modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #e7dfdf;
    margin: 10% auto;
    padding: 1rem;
    border-radius: 4px;
    max-width: 500px;
  }

  #modal-content h2 {
    text-transform: uppercase;
}

  .close-button {
    align-self: flex-end;
    font-size: 2.2rem;
    font-weight: bold;
    color: #f44336;
    cursor: pointer;
  }

  .close-button:hover {
    color: #000;
  }

  #item-count{
    color: #f44336;
    font-weight: bold;
  }

  #backpack-list {
    list-style: none;
    font-size: large;
    margin: 0;
    padding: 0;
  }

  #backpack-list li {
    margin-bottom: 0.5rem;
  }

  #backpack-list h5 {
    font-family: 'Caveat', cursive;
    color: #3e8e41;
    font-size: x-large;
  }

  .extra-item label{
    display: flex;
    flex-direction: column;
    align-items: center;
    color:#664646;
    font-weight: bold;
  }

  .extra-item input {
    height: 35px;
    width: 120px;
  }

  #clear-button {
    margin-top: 1rem;
  }

  #clear-button:hover {
    background-color: #f44336;
  }

  #useful-links-button {
    width: 250px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #664646;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
  }
  
  #useful-links-button:hover {
    background-color: #94c566;
  }

  .useful-links {
    padding: 1.5rem;
    max-width: 80%;
    margin: 0 auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
  }
  
  .useful-links.visible {
    max-height: 1000px;
    opacity: 1;
  }
  
  .useful-links li {
    list-style: none;
    padding-bottom: 0.3rem;
    opacity: 0;
  }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateX(-50%);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideOut {
    from {
      opacity: 1;
      transform: translateX(0);
    }
    to {
      opacity: 0;
      transform: translateX(-50%);
    }
  }
  
  .useful-links li a {
    font-weight: bold;
  }  
  

  /* signup-form styling */

  #sign-up__form___container {
    max-width: 800px;
      margin: 0 auto;
      padding-bottom: 1rem;
  }

  #sign-up__form___container h4 {
    padding: 1rem;
  }

  #sign-up__form {
    display: flex;
    flex-direction: column;
    max-width: 90%;
    margin: auto;
    padding: 1rem;
    border: #664646;
    border-style: solid;
    border-width: 1px;
    border-radius: 4px;
  }

  #sign-up__form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  #sign-up__form input[type="text"],
  #sign-up__form input[type="email"] {
    padding: 0.5rem;
    border-radius: 4px;
    border: none;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    font-size: 1rem;
  }

  #sign-up__form input[type="submit"] {
    padding: 0.5rem;
    border-radius: 4px;
    border: none;
    background-color: #94c566;
    font-family: 'Caveat', cursive;
    color: black;
    font-weight: bold;
    font-size: 1.3rem;
    cursor: pointer;
  }

  #sign-up__form input[type="submit"]:hover {
    background-color: #664646;
  }

  /* alert modal styling */

  .alert-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background-color: rgba(59, 38, 24, 0.493); 
  }

  .alert-modal__content {
    margin: 10% auto; 
    padding: 20px;
    border: #000;
    border-width: 2px;
    border-radius: 5px;
    width: 90%;
    max-width: 700px;
    height: 50%;
    text-align: center;
    font-size: large;
  }

  .alert-modal__content h2 {
  background-color: rgba(148, 197, 102, 1);
  border-radius: 5px;
  padding: 1rem;
  }

  .alert-close {
    position: relative;
    top: 5%;
    left: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    font-weight: bold;
    color: #f44336;
    cursor: pointer;
  }

  .alert-close:hover {
    color: black;
  }