/* Declare variables ----------------- */

:root {
  --dark: hsl(20, 7%, 65%);
  --darker: hsl(20, 7%, 35%);
  --light: hsl(20, 7%, 85%);
  --bggrey: #eee;
  --highlight: #fff;
  --accent: #0075b0;

  --stripeGrad: linear-gradient(-90deg, black 0%, var(--darker) 40%, var(--darker) 60%, var(--dark) 90%, black 100%);
  --StripeSize: 10px 20px;

  --fCastColLtCol: rgba(61, 165, 255, 0.5) ;
  --fCastColDkCol: rgba(0, 0, 150, 0.5) ;

  --fCastColLt: white;
  --fCastColDk: white ;
  
  --fCastBg:linear-gradient(180deg, var(--fCastColLt) 40%, var(--fCastColDk) 90%);

  --stRadius: 0 6px 0 6px;

  /* Unit suffixes */
  --deg: '°';
  --degT: '°C';
  --speed: 'm/s';
  --pressure: 'hPa';
  --length: 'm';
}


/* Common ----------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: Calibri, 'Trebuchet MS', sans-serif;
  text-align: center;
  line-height: 1.3;
  /* font-size: 14px; */
}

/* Tags ----------------- */
html,
body,
.wrapper {
  height: 100%;
  margin: 0;
  padding: 0;
  background-image: linear-gradient(var(--light) 70%, var(--darker) 100%);
  position: relative;
}

body {
  background-color: #f9fbfd;
}

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

#header-panel {
  background-image: var(--stripeGrad);
  background-size: var(--StripeSize);
  max-width: 1200px;
  width: 90%;
  margin: auto;
  position: relative;

}

#prefsPanel {
  position: absolute;
  right: 0;
  top: 0;

  z-index: 1;
  /* Sit on top */
  padding: 3px 10px;
  font-size: 25px;

  margin-top: 3px;
  /* margin-bottom: 5% ; */

  width: min-content;
  height: min-content;
  background-color: var(--darker);
  background-color: var(--darker);
}

#prefsPanel:hover {
  background-color: black;

}

.pref-choice {
  display: none;
  position: absolute;
  top: 0;
  right: 100%;

}

.pref-choice li {
  z-index: 1;
  font-size: 16px;
  color: var(--highlight);
  background-color: var(--darker);
  padding: 3px 5px;
  border-bottom: 2px solid var(--light);
}

.pref-choice li:hover {
  background-color: black;

}

.pref-choice-modal {
  display: none;
  text-align: center;
  /*background-color: var(--dark) ;
  margin:5px;
  border-radius: var(--stRadius) ;
  border: 3px solid var(--highlight);
  width: 70%;
  padding: 2px 5px; */
}


.pref-choice-modal li {

  text-align: center;
  background-color: var(--dark);
  margin: 5px auto;
  border-radius: var(--stRadius);
  border: 3px solid var(--highlight);
  width: 70%;
  padding: 2px 5px;
}

h1 {
  color: white;
  font-size: 2rem;
  text-shadow: 3px 3px 4px var(--darker);
  max-width: 80%;
  margin: auto;
}

#main-page {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 1200px;
  width: 90%;
  margin: auto;
}

.fullWidth {
  width: 100%;
  margin:2px auto;
} 

/* LHS-------------------------------------- */
#search-panel {
  width: 25%;
  background-color: var(--highlight);
}

#cityInput {
  width: 95%;
  margin: 3px auto;
  border-radius: var(--stRadius);
  border: 1px solid var(--darker);
}
#search-panel>hr{
  width: 95%;
margin:3px auto;

}

.collapse {
  color: var(--highlight);
  background-color: var(--darker);
  width: 95%;
  margin: 5px auto;
}

.btnSearch {
  background-color: var(--accent);
}

.btnCity {
  background-color: var(--dark);
}

/* Weather Panels----------------------------------- */

#info-panel {
  width: 75%;
  background-color: var(--highlight);
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: space-evenly;
padding: 3px;
}

#forecastPanel {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;
  padding:3px;
}

.fCastMain {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;

  border: 1px solid var(--darker);
  border-radius: var(--stRadius);
  min-width: 100%;
  background-image:  var(--fCastBg) ;
  padding:3px;

}

.fCast {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-around;
  gap: 5px;
  /* margin: 3px; */
  padding: 5px 3px;
  border: 1px solid var(--darker);
  border-radius: var(--stRadius);
  min-width: 160px;
  max-width: 700px;
  width: min-content;
  background-image: var(--fCastBg);

}


.fcastHeader,
#info-panel-header {
  color: var(--highlight);
  background-color: var(--accent);
  padding: 2px 10px;
  width: 100%;
}

#Day0 {
  width: 100%;
}

.location {
  white-space: nowrap;
}

.iconDesc {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

.iconDesc>div {
  min-width: 50%;
}

/* .highlightInfo{
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  width:fit-content;

} */

/* .highlightInfo>div{
  min-width: 50%;
} */

.stdInfo {
  /* width: 100%; */
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  width:min-content; 
  /* min-width:150px; */
  white-space: nowrap; 
}

.stdInfo>div{
  min-width:49%;
}

.extraInfo {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;

}

.extraInfo>div {
  min-width: 33%;
  font-size: .8rem;
}

/* .dayForecast {
  margin: 3px;
  padding: 3px 10px;
} */

.smaller {
  font-size: 0.7rem;
}

.iconImg {
  width: 50px;
  object-fit: cover;
}

.iconDiv {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* ----------Special formats----------------- */
#tempToday {
  font-size: 2rem;
}

.uvi {
  /* background-color: #FF0000; */
  padding: 1px 6px;
  border-radius: var(--stRadius);
  color: var(--highlight);
  width: fit-content;
}

/* -------Buttons------------------------------- */

.btn {
  width: 95%;
  border-radius: var(--stRadius);
  color: var(--highlight);
  box-shadow: inset -2px -2px 4px var(--darker);
  margin: 3px;
  border: none;
}

.btn:hover {
  color: black;
  filter: brightness(120%);
}

.btn:active {
  color: white;
  filter: brightness(80%);
}

.btnClose {
  color: var(--darkest);
  float: right;
  padding: 0 5px 0 2px;
}
.btnClose::before {
  content: '𝘅';
  /* font-size: .8rem;  */
  color: var(--darker);
  font-weight:900;
 

}

/* Modal  ----------------- */
/* The Modal (background) */
.windowModal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1;
  /* Sit on top */
  padding-top: 100px;
  /* Location of the box */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: var(--darker);
  /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
}

/* Modal Text Content */
.modal-content {
  background-color: var(--highlight);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--darker);
  width: 60%;
}

/* Modal Close Button */
.closeSpan {
  color: var(--dark);
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.closeSpan:hover,
.closeSpan:focus {
  color: var(--darker);
  text-decoration: none;
  cursor: pointer;
}

/* -----Units of measure ----------  */
.day-info,
.today-info {
  text-align: left;
}

[data-key]:before {
  content: attr(data-key);
  font-size: .8rem;
}


/* ------- Suffixes ---------- */
.degT::after {
  content: var(--degT);
}

.deg::after {
  content: var(--deg);
}

.presr::after {
  content: var(--pressure);
}

.perc::after {
  content: '%';
}

.length::after {
  content: var(--length);
}

.spd::after {
  content: var(--speed);
}

/* Media Sizes ----------------- */

@media (max-width: 690px) {
  .btn {
    font-size: 1rem;
  }

  .extraInfo>div {
    min-width: 50%;
  }
}

@media (max-width: 450px) {

  #main-page {
    flex-direction: column;
    width: 95%;
  }

  #search-panel {
    width: 95%;
  }

  #cityInput placeholder {
    /* color:var(--light); */
    font-size: .7rem;
  }

  #info-panel {
    flex-direction: column;
    width: 95%;
  }
  .fCast {
    width:100%;
  }
}