
@font-face {
    font-family: 'first';
    src: url('/assets/fonts/Bricolage_Grotesque/static/BricolageGrotesque-Bold.ttf');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    /* DM sans */
    font-family: 'second';
    src: url('/assets/fonts/DM_Sans/DMSans-VariableFont_opsz\,wght.ttf');
    font-weight: 500;
    font-style: normal;
}


* {
    box-sizing: border-box;
    
}

/* CSS Variables for Dark Theme (Default) */
:root {
  --bg-primary: hsl(243, 96%, 9%);
  --bg-secondary: hsl(243, 27%, 20%);
  --bg-tertiary: hsl(243, 23%, 30%);
  --bg-hover: hsl(243, 23%, 24%);
  --bg-button: hsl(233, 67%, 56%);
  --bg-button-hover: hsl(248, 70%, 36%);
  --text-primary: #FFFFFF;
  --text-secondary: hsl(250, 6%, 84%);
  --text-muted: hsl(240, 6%, 70%);
  --border-color: hsl(243, 23%, 30%);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: hsla(234, 67%, 94%, 0.74);
  --bg-secondary: hsla(257, 100%, 94%, 0.644);
  --bg-tertiary:  hsl(255, 100%, 95%);
  --bg-hover: hsl(0, 0%, 85%);
  --bg-button: hsl(233, 67%, 56%);
  --bg-button-hover: hsl(248, 70%, 36%);
  --text-primary: hsl(243, 96%, 9%);
  --text-secondary: hsl(243, 27%, 20%);
  --text-muted: hsl(240, 6%, 50%);
  --border-color: hsl(0, 0%, 80%);
}

html {
   overflow-x: hidden;
   width: 100%;
   max-width: 100%;
}

body{
   margin: 2em 2em;
   background-color: var(--bg-primary);
   color: var(--text-primary);
   font-size: 16px;
   margin-bottom: 100px;
   overflow-y: auto;
   overflow-x: hidden;
   width: 100%;
   max-width: 100%;
   transition: background-color 0.3s ease, color 0.3s ease;
}

/* Remove margin on mobile (screens less than 600px wide) */
@media (max-width: 599px) {
   body {
      margin: 0;
      margin-bottom: 100px;
      overflow-y: smooth;
      overflow-x: hidden;
      width: 100%;
      max-width: 100%;
   }
   
   .main-container {
     padding: 0 12px;
   }
}

.header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 4rem; 
    gap: 12px;
}

.dropdown {
    position: relative;
}

.theme-toggle {
    position: relative;
    font-family: second;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 5px 10px;
    border-radius: 25px;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background-color: var(--bg-hover);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.units{
  position: relative;
    font-family: second;
    display: flex;
    justify-content: space-between;
    background-color: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    gap: 0.5em;
    border: none;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
} 


.dropdown-content {
    display: none;
    font-family: second;
    position: absolute;
    text-align: left;
    flex-direction: column;
    min-width: 220px;
    border-radius: 12px;
    margin-top: 0.3em;
    right: 0; /* Align to right edge of button */
    top: 100%; /* Position below the button */
    transform: translateY(1%); /* Small vertical offset */
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: 1px solid;
    border-color: var(--border-color);
    padding: 5px;
    z-index: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.dropdown-content.open {
    display: flex;
}



.dropdown-content label{
   color: var(--text-muted);
   border-top: 2px solid var(--border-color); /* thickness & color */
   padding-top: 5px;           /* spacing between text and border */
   display: block;
   padding: 10px 15px;
}


.units-button{
    text-align: left;
    font-size: 1.2em;
    font-family: second;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: none;
    margin: 1px;
    border-radius: 8px;
    padding: 10px 15px;
    transition: background-color 0.3s ease;
}

.units-button:hover{
  background-color: var(--bg-hover);
}



/* Greetings */

.greetings{
    font-size:1.8em;
    font-family: first;
 
    
}
.searchbar{
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 3vh;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

input[type="text"] {
  position: relative;
  border-radius: 12px;  
  border: none;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  width: 20vw;
  height: auto;
  padding: 16px 50px;
  border: none;
  outline: none;
  transition: background-color 0.3s ease;
}
input::placeholder {
 color: var(--text-secondary);
 font-size: 20px;
  background-color: var(--bg-secondary);
}
/* Autofill fix */
input[type="text"]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-secondary) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  border-radius: 12px; /* keep corners consistent */
  transition: background-color 5000s ease-in-out 0s !important;
}




.searchicon{
  position: relative;
  transform: translate(200%,25%);
  /* width: 100px; */
  z-index:1;
}

 .searchbarbutton{
     font-family: second;
     border-radius: 12px;
     border: none;
     background-color: var(--bg-button);
     color: var(--text-primary);
     padding: 10px 24px;
     font-size: 20px;
     flex-shrink: 0;
     box-sizing: border-box;
     transition: background-color 0.3s ease;
 }
 .searchbarbutton:hover{
  background-color: var(--bg-button-hover);
 }
 /* suggestion for finding the city */
.suggestions {
  position: absolute;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-top: 5px;
  width: 20vw; /* match input width */
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

.suggestions div {
  padding: 10px;
  cursor: pointer;
}

.suggestions div:hover {
  background: var(--bg-hover);
}
 /* h  */
 h1,h2,h3{
  margin:0.3em;
 }

.image-container {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  height: clamp(220px, 30vh, 360px);
  overflow: hidden;
  border-radius: 16px;
}

.inner-container {
  position: absolute;       
  top: 0; left: 0;          
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;      
  align-items: center;      
  justify-content: space-evenly;  
  pointer-events: none;
  padding: 0 24px;
  box-sizing: border-box;
}
.bigimage{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.sunicon {
    width: clamp(56px, 8vw, 105px);
    height: auto;
    transform: translateX(4%); 
}


.degree {
    font-family: second;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 5rem);
   transform: translateX(-10%); 
   z-index: 1;
}

.location-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(1.1em, 2.5vw, 1.5em);
  gap: 0;
  max-width: 60%;
}

.city,.date{
    margin: 5px 0;
    font-family: second;
    overflow-wrap: anywhere;
}

.city{
    font-weight: 500;
    font-size: 1.8em;
}
.date{
    opacity: 80%;
    font-size: 1.2em;
}

/* main container */
.main-container{ 
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: start;
    max-height: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}
/* overall left container */

.overall-leftcontainer{
  width: 100%;
}




/* left container */
.left-container{
     display: flex; 
     flex-direction: row; 
     justify-content: space-between; 
     gap: 20px;
}
.description{
    font: second;
    font-size: 1.2em;
    font-weight: 300;
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1px solid;
    border-color: var(--border-color);
    border-radius:12px;
    margin-top: 10px;  
    color: var(--text-secondary);
    display: block;
    padding: 12px 16px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.data{
    font-size: 1.8em;
    line-height: 1.2;
    margin: 6px 0 0 0;
}

/* left last container */

.daily-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.daily{
    background-color: var(--bg-secondary);
    border: 1px solid;
    border-color: var(--border-color);
    border-radius: 12px;
    text-align: center;
    margin: 10px 0px;
    padding: 16px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.daily-day{
  margin: 0%;
}
.center-image {
  display: block;

  width: 65px;
  height: auto;
}
.bottom-row {
  display: flex;
  justify-content: space-between;
}


/* .skeleton-box {
  width: 60px;
  height: 24px;
  border-radius: 6px;
  display: inline-block;
   width: 100%;
  height: 100%;
  flex: 1;
} */


/* Right side container */
.right-container{
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    max-width: 420px;
    width: 100%;
    border-radius: 20px;
    padding: 15px;
    max-height: 67vh;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width:thin;
    scrollbar-color: var(--border-color) var(--bg-secondary);
    transition: background-color 0.3s ease;
}
/* Removed duplicate - colors now use CSS variables */

/* Chrome, Edge, Safari */
.right-container::-webkit-scrollbar {
  width: 1px;   /* thin scrollbar */
}

.right-container::-webkit-scrollbar-track {
  background: transparent;   /* no background, keeps it clean */
  margin: 10px 0;             /* little spacing at top & bottom */
}

.right-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  border: 1px solid var(--bg-secondary); /* matches container bg → makes it look inset */
}

.right-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;

}

/* Day button default */
.day-dropdown {
    /* position: relative; */
    font-family: second;
  /* display: inline-block; */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;                  /* space between text and image */
  padding: 0.5em 1em;
  background-color: hsl(243, 23%, 30%);
  border-radius: 8px;
  color: #FFFFFF;
  border: none;
  height: auto;
}
.day-dropdown > p,
.day-dropdown > img {
  margin: 0;
  padding: 0;
}



/* Dropdown button for days */
.dropdown-button{
  display: none;
  position: absolute;
  flex-direction: column;
  background-color: var(--bg-secondary);
  transform: translate(-40%,5%);
  border-radius: 8px;
  border: 1px solid;
  border-color: var(--border-color);
  min-width: 200px;
  padding: 10px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.day-button{
  font-size: 1.1em;
  font-family: second;
  font-weight: 100;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  padding: 8px 10px;
  transition: background-color 0.3s ease;
}

.day-button:hover{
  background-color: var(--bg-hover);
  border-radius: 8px;
}
.box{
   font-size: 1.4em;
}
.clouds{
  width: 50px;
  margin-right: 20px;
}
.clouds-degree{
  display: flex;
  justify-content: center;
  align-items: center;
}


.hourly-forecast-scroll{
  font-family: second;
  font-weight: 100;
  display: flex;
  background-color: var(--bg-hover);
  border-radius: 8px;
  padding:3px 15px;
  margin: 10px;
  justify-content: space-between;
  text-align: center;
  align-items: center;
  border: 1px solid;
  border-color: var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.single-side{
 display: flex;
 align-items: center;
}
h2{
  font-family: second;
font-weight: 100;
}



/* Mobile (up to 767px) */
@media (max-width: 767px) {
  body{
    margin: 0;
    margin-bottom: 100px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .bar{
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .greetings{
    font-size: 1em;
  }
  
  .searchbar{
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 12px;
    padding: 0 12px; /* Match main-container padding */
  }
  
  .searchbarbutton{
    width: auto;

  }
  
  .bar{
    flex: 1 1 100%;
    width: 100%;
  }

  .main-container{
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .right-container{
    max-width: none;
    max-height: none;
    width: 100%;
    box-sizing: border-box;
  }

  input[type="text"]{
    width: 100%;
    max-width: 100%;
    padding: 14px 44px;
    box-sizing: border-box;
  }
  
  .suggestions{ 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .searchicon{
    transform: translate(100%,170%);
  }
  
  .inner-container{
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
  }
  
  .location-info{
    font-size: 1.1em;
    max-width: 70%;
  }
  
  .city{
    font-size: 1.3em;
  }
  
  .date{
    font-size: 1.05em;
  }
  
  .inner-container{
    padding: 0 12px;
  }
  
  .degree{
    font-size: clamp(2rem, 7vw, 3.5rem);
  }
  
  .data{
    font-size: 1.5em;
  }

  .left-container{
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .daily-container{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .daily{
    margin: 10px 0px;
    padding: 16px;
    box-sizing: border-box;
  }
  
  .image-container{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .overall-leftcontainer{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .header{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 12px; /* Match main-container padding */
  }
  
  .dropdown-content {
    right: 0;
    transform: translateY(1%);
  }
}



.daily-day{
  margin: 0%;
}
.center-image {
  display: block;
  /* margin: 0 auto 12px auto; */
  width: 65px;
  height: auto;
}
.bottom-row {
  display: flex;
  justify-content: space-between;
}


/* Tablet (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  body {
    margin: 2em 0;
    margin-bottom: 100px;
  }
  
  .greetings{
    font-size: 1em;
  }
  
  .main-container{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px; /* Small internal padding for tablet */
  }
}

/* Desktop medium (<= 1200px) */
@media (max-width: 1200px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .main-container{
    grid-template-columns: 1fr 360px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Laptop / Tablet landscape (<= 992px) */
@media (max-width: 992px) {
  body{
    margin: 2em 0;
    margin-bottom: 100px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .main-container{
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px; /* Spacing for tablet/laptop */
  }
  
  .right-container{
    max-width: none;
    max-height: none;
    width: 100%;
    order: 2;
    box-sizing: border-box;
  }
}

/* Force daily forecast to one row on large screens */
@media (min-width: 992px) {
  .daily-container{
    grid-template-columns: repeat(7, minmax(110px, 1fr));
  }
}






