/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root{

/* colors */

--primary: #41228e; 
--on-primary: #EAE6F2; 
--background: #131214;
--on-background: #EAE6F2;
--surface: #1D1C1F;
--on-surface: #DDDAE5;
--on-surface-variant: #7B7980; 
--on-surface-variant-2: #B9B6BF;
--outline: #3E3D40;
--bg-aqi-1: #00ff6a;
--on-bg-aqi-1: #1F331F;
--bg-aqi-2: #fbff00;
--on-bg-aqi-2: #33311F;
--bg-aqi-3: #ff9d00;
--on-bg-aqi-3: #332B1F;
--bg-aqi-4: #ff3700;
--on-bg-aqi-4: #331F1F;
--bg-aqi-5: #ff0073;
--on-bg-aqi-5: #331F29;
--white: hsl(0, 0%, 100%);
--white-alpha-4: hsla(0, 0%, 100%, 0.04);
--white-alpha-8: hsla(0, 0%, 100%, 0.08);
--black-alpha-10: hsla(0, 0%, 0%, 0.1);

/* gradient-colors */

--gradient-1: linear-gradient(180deg, hsla(270, 5%, 7%, 0) 0%, hsla(270, 5%, 7%, 0.8) 65%, hsl(270, 5%, 7%) 100%);
--gradient-2: linear-gradient(180deg, hsla(260, 5%, 12%, 0) 0%, hsla(260, 5%, 12%, 0.8) 65%, hsl(260, 5%, 12%) 100%);

/* font-family */

--ff-nunito-sans: 'Nunito Sans', sans-serif;

/* font-size  */

--heading: 5.6rem;
--title-1: 2rem;
--title-2: 1.8rem;
--title-3: 1.6rem;
--body-1: 2.2rem;
--body-2: 2rem;
--body-3: 1.6rem;
--label-1: 1.4rem;
--label-2: 1.2rem;

/* font-weight  */

--weight-regular: 400;
--weight-semiBold: 600;

/* shadow  */

--shadow-1: 0px 1px 3px hsla(0, 0%, 0%, 0.5);
--shadow-2: 0px 3px 6px hsla(0, 0%, 0%, 0.4);

/* border-radius  */

--radius-28: 28px;
--radius-16: 16px;
--radius-pill: 500px;
--radius-circle: 50%;

/* Transition */

--transition-short: 100ms ease;

}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

li{
  list-style: none;
}

a
,img
,button
,span
,input{
  display: block;
}

a{
  color: inherit;
  text-decoration: none;
}

img{
  height: auto;
}

input,button{
  background:none;
  border: none;
  color: inherit;
  font: inherit;
}

input{
  width: 100%;
}

button{
  cursor: pointer;
}

html{
  font-family: var(--ff-nunito-sans);
  font-size: 10px;
  scroll-behavior: smooth;
}

body{
  color: var(--on-background);
  background-color: var(--background);
  font-size: var(--body-3);
  overflow: hidden;
  height: 100vh;
  display: grid;
  place-items: center;
}

:focus-visible{
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

::selection{
  background-color: var(--white-alpha-8);
}

::-webkit-scrollbar{
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb{
  background-color: var(--white-alpha-8);
  border-radius: var(--radius-pill);
}

/*-----------------------------------*\
  #MATERIAL ICON
\*-----------------------------------*/

@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/font/material-symbol-rounded.woff2') format('woff2');
}

.icon{
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing:antialiased;
  height: 1em;
  width: 1em;
  overflow: hidden;
}

/*-----------------------------------*\
  #Card
\*-----------------------------------*/

.container {
  background-color: var(--surface);
  color: var(--on-surface);
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 470px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  padding: 32px;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.card{
  width: 100%;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: #e8e8e8;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

.search-bar{
  display: flex;
  align-items: center;
  gap: 16px;
}

.span{
  width: 48px;
  height: 48px;
  background-color: var(--surface);
  border: 2px solid var(--background);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.span:hover{
  background-color: #0000002e;
}

.span:active{
  background-color: #0000003c;
}

input[type='search']{
  border: 2px solid var(--background);
  padding: 10px 20px;
  border-radius: 500px;
  outline: none;
  overflow: hidden;
}

input[type='search']::-webkit-search-cancel-button{
  display: none;
}

input[type='search']:focus,input[type='search']:hover{
  background-color: #0000002e;
}

.weather-details{
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.humidity,.wind-speed{
  margin-top: 10px;
  display: flex;
  align-items: start;
  justify-content: flex-start;
  gap: 16px;
  text-align: left;
}

h1{
  font-size: 70px;
  font-weight: 500;
}

h2{
  font-size: 45px;  
  font-weight: 400;
  margin-top: -5px;
  margin-bottom: 30px;
}

.percentage-2{
  margin-top: 5px;
}

.percentage-2,.percentage-1{
  font-size: 20px;
  font-weight: 500;
}

.text{
  font-size: 14px;
  color: var(--on-surface-variant-2);
}

.weather-img{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.hidden{
  visibility: hidden;
  opacity: 0;
  display: none;
}

.error{
  color: var(--on-surface-variant-2);
  font-style: normal;
  font-weight: 400;
}

i{
  font-size: 16px;
  color: var(--on-surface-variant-2);
}

@media screen and (max-width: 500px) {

  .weather-details {
    gap: 30px;
  }

  .percentage-2,.percentage-1{
  font-size: 18px;
  font-weight: 400;
  text-wrap: nowrap;
  }

  .text{
    text-wrap: nowrap;
  }

  h1{
  font-size: 60px;
  font-weight: 500;
}

  h2{
    font-size: 35px;  
    font-weight: 400;
    margin-top: -5px;
    margin-bottom: 30px;
  }
  
}
