/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* CSS VARIABLES FOR MARGIN, FONTS AND COLOROS */
:root {
  /* SPACING */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;

  /* COLORS */
  --electric-aqua: #00649e9f;
  --graphite: #363635ff;
  --ebony: rgb(41, 38, 38);
  --vibrant-coral: rgba(255, 142, 255, 0.774);
  --cloudy-aqua: #3aa0d8;

  --color-bg: #f7f7f7;
  --color-surface: #f5f5f5;
  --color-text: var(--graphite);
  --color-text-muted: var(--ebony);
  --color-primary: var(--electric-aqua);
  --color-secondary: var(--vibrant-coral);
  --color-primary-compliment: var(var(--cloudy-aqua));
  --color-border: #e2e2e2;

  /* FONTS */
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
}

@font-face {
  font-family: "logo-font";
  src: url(./src/Permanent_Marker/PermanentMarker-Regular.ttf);
}

@font-face {
  font-family: "base-font";
  src: url(./src/Montserrat/Montserrat-VariableFont_wght.ttf);
}
body {
  background-color: var(--color-bg);

  font-family: "base-font", Arial, Helvetica, sans-serif;
  color: rgb(46, 45, 45);
}

html {
  font-size: 15px;
}

.main-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.border-angled {
  border: 1px solid var(--color-border);
  border-radius: var(--space-2);
}

.drop-shadow {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.muted-text {
  color: var(--color-text-muted);
}

.grid-card {
  background-color: var(--color-bg);
  padding: var(--space-3);
}

.logo-wrapper {
  margin: 0;
  display: flex;
  justify-content: center;
  background: linear-gradient(135deg, #00649e, #0a7bbd, #3aa0d8);
  width: 100%;
}

.logo {
  font-family: "base-font";
  display: flex;
  justify-content: center;
  font-size: var(--fs-2xl);
  letter-spacing: 6px;
  font-weight: 600;
  padding: var(--fs-sm);
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    var(--color-secondary),
    rgba(0, 247, 255, 0.897)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo.border-angled {
  border: 0px;
}

.page-content {
  width: 100vw;
  flex: 1;
  overflow: auto;
  background-color: var(--color-surface);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) minmax(0, 5fr);
  gap: var(--space-3);
  padding: var(--space-3);
}

.home-city-section {
  grid-area: 1/4/1/4;
  background: linear-gradient(
    45deg,
    var(--vibrant-coral),
    rgb(255, 104, 187) 70%
  );
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-1);
  flex-direction: column;
  flex-shrink: 1;
}

.search-section {
  grid-area: 1/1/1/4;
  background: linear-gradient(-90deg, var(--vibrant-coral), var(--cloudy-aqua)),
    rgba(255, 217, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
}

.weather-section {
  grid-area: 2/1/2/4;
  background: linear-gradient(
    315deg,
    var(--electric-aqua),
    var(--cloudy-aqua),
    #7fc4eb
  );

  display: grid;
  gap: var(--space-3);
  grid-template-rows: 5fr 2fr;
  grid-template-columns: 4fr 1fr;
}

.places-listed {
  background: linear-gradient(
    210deg,
    rgb(255, 104, 187) 10%,
    var(--electric-aqua) 60%
  );
  grid-area: 2/4/2/4;
  display: flex;
  align-items: center;
  /* justify-content: center; */
  flex-direction: column;
  flex: 0;
  gap: clamp(8px, 0.75vw, var(--space-3));
}

#weather-form {
  min-width: 70%;
}

.search-bar {
  display: flex;
  padding: var(--space-1);
  background-color: var(--color-bg);
  font-size: var(--fs-xl);
}

input {
  all: unset;
  border: none;
  background-color: var(--color-bg);
  width: 100%;
}

input::placeholder {
  transition: opacity 0.2s;
}

input:focus::placeholder {
  opacity: 0;
}

.search-bar-btn {
  border: none;
  background-color: var(--color-bg);
  transition: all 0.3s;

  border-radius: 8px;
  padding: var(--space-1) var(--space-2);
  margin-right: var(--space-1);
}

.search-bar-btn:hover {
  background-color: #dddddd;
  cursor: pointer;
}

.search-icon {
  width: 1.5rem;
}

.listed-place {
  display: flex;
  width: 90%;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-1) 0;
  font-size: var(--fs-xl);
}

.listed-place div {
  display: flex;
  align-items: center;
}

.listed-weather-icon {
  width: 4rem;
  height: auto;
}

.footer {
  width: 100%;
  height: 5vh;
  background: linear-gradient(135deg, #00649e, #0a7bbd, #3aa0d8);
}

.current-home-city {
  font-size: var(--fs-xl);
}

.homeIcon {
  height: var(--fs-2xl);
  opacity: 0.7;
  margin-left: 0.75rem;
}

.flex-container-home {
  display: flex;
  justify-content: center;
  align-items: baseline;
}

.change-current-city-btn {
  border: none;
  background-color: rgba(236, 236, 236, 0.445);
  transition: all 0.3s;
  border-radius: 8px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--fs-lg);
  width: 100%;
  color: var(--color-text-muted);
  cursor: pointer;
}

.change-current-city-btn:hover {
  background-color: rgba(132, 213, 250, 0.589);
}

.main-weather-card {
  display: flex;

  justify-content: center;
}

.main-weather-card-info-container {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-2xl);
  gap: var(--fs-base);
}
.card-title {
  font-size: var(--fs-3xl);

  text-transform: uppercase;
  letter-spacing: -3px;
}

.flex-container-weather {
  display: flex;
  flex-grow: 1;
  justify-content: space-around;
  align-items: center;
}

.main-weather-icon {
  height: clamp(150px, 20vw, 400px);
}

.dailyWrapper {
  grid-area: 1/2/3/3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  background-color: rgba(0, 0, 0, 0.034);
  border-radius: 16px;
  position: relative;
  padding-bottom: 40px;
}

.dailyWrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;

  height: 50px;
  pointer-events: none;

  background: linear-gradient(
    to top,
    var(--background-color, rgba(255, 255, 255, 0.219)),
    transparent
  );
}

.daily-weather-card {
  display: grid;
  width: 80%;
  grid-auto-flow: row;
  grid-auto-rows: 80px;
  overflow-y: auto;
  font-size: var(--fs-lg);
}

.daily-grid-card {
  padding: var(--space-1);
  flex: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hourlyWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  height: 100%;
  scroll-snap-type: x mandatory;
  background-color: rgba(0, 0, 0, 0.034);
  border-radius: 16px;
}

.hourly-weather-card {
  display: grid;
  grid-auto-flow: column;
  justify-content: flex-start;
  align-items: center;
  grid-auto-columns: 120px;
  height: 100%;
  width: 1080px;
  max-width: 100%;

  padding: var(--space-1);
  font-size: var(--fs-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.hourly-grid-card {
  padding: var(--space-1);
  display: flex;
  flex-shrink: 0;
  min-height: max-content;
  min-width: 90px;
  scroll-snap-align: start;
  flex-direction: column;
  gap: var(--space-1);
  justify-content: space-between;
  align-items: center;
}

.navBtnHourly {
  height: fit-content;
  transition: all 0.3s;
  border: none;
  background-color: rgba(0, 0, 0, 0.021);
  height: 100%;
  cursor: pointer;
}

.navBtnHourly:hover {
  background-color: rgba(0, 0, 0, 0.041);
}

.navBtnHourly:active .navHourlyBtnIcon {
  transform: translateX(1px);
}

.navBtnHourly:active .iconPrev {
  transform: translateX(-1px) rotate(180deg);
}

.navHourlyBtnIcon {
  transition: all 0.3s;
  height: 2rem;
  stroke: white;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.iconPrev {
  transform: rotate(180deg);
}

.hourly-weather-card::-webkit-scrollbar,
.daily-weather-card::-webkit-scrollbar {
  display: none;
}

.loadingAnim {
  width: 100%;
  filter: blur(0.3px);
  opacity: 0.9;

  background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* 
zrobic fajne tlo z gradientu
zrobic tak ze jest ten search bar
napisac skrypt ktory bierze arg
w zaleznosci od pogody wybiera ikonke i tekst
zrobic tak zeby design byl ladny
search bar na srodku do pierwszego uzycia a po nim zmiana struktury strony i przeniesienie searchbara */
