/* Importa fonte */
@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'NotoSans';
  src: url('../fonts/NotoSans-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Reset */
* {
  padding: 0;
  margin: 0;
  outline: 0;
  text-decoration: 0;
  box-sizing: border-box;
}

/* Variáveis */
:root {

  /* Neutro */
--Neutro-900: hsl(227, 75%, 14%);
--Neutro-800: hsl(226, 25%, 17%);
--Neutro-700: hsl(225, 23%, 24%);
--Neutro-600: hsl(226, 11%, 37%);
--Neutro-300: hsl(0, 0%, 78%);
--Neutro-200: hsl(217, 61%, 90%);
--Neutro-100: hsl(0, 0%, 93%);
--Neutro-0: hsl(200, 60%, 99%);

/* Vermelho */
--Vermelho-400: hsl(3, 86%, 64%);
--Vermelho-500: hsl(3, 71%, 56%);
--Vermelho-700: hsl(3, 77%, 44%);

/* Gradiente */
--Gradiente-claro: linear-gradient(180deg, #EBF2FC 0%, #EEF8F9 100%);
--Gradiente-escuro: linear-gradient(180deg, #040918 0%, #091540 100%);
}

html {
  color-scheme: light;
}

/* Body */
body {
  background: var(--Gradiente-escuro) center / cover no-repeat;
  padding: 2rem 1rem;
  font-family: 'NotoSans';
  font-style: normal;
  min-height: 100vh;
}

/* Header */
.header {
  background-color: var(--Neutro-800);
  padding: .8rem;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  line-height: 0;
}

.header__logo-icon {
  fill: #FF0000;
}

.header__theme-toggle {
  background-color: var(--Neutro-700);
  border: none;
  line-height: 0;
  padding: .5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease-in-out;
  position: relative;
}

.header__theme-toggle:focus {
  box-shadow: 
  0px 0px 0px 1px var(--Neutro-900), 
  0px 0px 0px 2px var(--Vermelho-400);
}

.header__theme-toggle:hover {
  background-color: var(--Neutro-600);
}

.header__theme-toggle input {
  width: 100%;
  height: 100%;
  opacity: 0;
  left: 0;
  top: 0;
  cursor: pointer;
  position: absolute;
}

/* main */
.extensions {
  margin-top: 2rem;
  
}

.extensions__header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.extensions__title {
  color: var(--Neutro-0);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.extensions__filters {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.extensions__filters-button {
  background-color: var(--Neutro-800);
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: 2px solid var(--Neutro-700);
  color: var(--Neutro-0);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 500;
  transition: background .2s ease-in-out, box-shadow .2s ease-in-out;
}

.extensions__filters-button:focus {
  box-shadow:
  0px 0px 0px 2px var(--Neutro-800),
  0px 0px 0px 5px var(--Vermelho-400);
}

.extensions__filters-button:hover {
  background-color: var(--Neutro-600);
}

.extensions__filters-button--active {
  background-color: var(--Vermelho-500);
  border-color: var(--Vermelho-500);
  color: var(--Neutro-800);
}

.extensions__filters-button--active:hover {
  background-color: var(--Vermelho-500);
}

.cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 2rem;
}

.card {
  height: 13rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--Neutro-800);
  border: 1px solid var(--Neutro-600);
  border-radius: 20px;
  padding: 1rem;
  color: var(--Neutro-0);
}

.card__information {
  display: flex;
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.card__name {
  margin-bottom: .5rem;
}

.card__description {
  color: var(--Neutro-100);
}

.card__buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__buttons button {
  cursor: pointer;
}

.card__button-remove {
  background-color: transparent;
  color: var(--Neutro-0);
  border: 2px solid var(--Neutro-600);
  padding: .7rem 1rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 500;
}

.card__button-remove:focus {
  box-shadow:
  0px 0px 0px 2px var(--Neutro-800),
  0px 0px 0px 3px var(--Vermelho-400);
  border: 2px solid var(--Neutro-700);
  background-color: var(--Neutro-700);
}

.card__button-remove:hover {
  background-color: var(--Vermelho-500);
  border-color: var(--Vermelho-500);
  color: var(--Neutro-800);
}

.card__button-status {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.card__button-status input {
  opacity: 0;
  width: 0;
  height: 0;
}

.card__button-status .slider {
  position: absolute;
  cursor: pointer;
  background-color: var(--Neutro-600);
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: background-color .4s;
}

.slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background-color:white;
  left: 3px;
  bottom: 3px;
  transition: transform .4s;
}

.card__button-status input:checked + .slider {
  background-color: var(--Vermelho-500);
}

.card__button-status input:checked + .slider::before {
  transform: translateX(24px);
}

@media screen and (min-width: 800px) {
  .header, main {
    max-width: 90%;
    margin: 0 auto;
  }

  .extensions {
    margin-top: 3rem;
  }

  .extensions__header {
    flex-direction: row;
    justify-content: space-between;
  }

  .extensions__title {
    margin-bottom: 0;
  }

  .extensions__filters {
    width: auto;
  }

  .extensions__filters-button {
    padding: .8rem 1.5rem;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    width: auto;
  }
}

@media screen and (min-width: 1200px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --Gradiente-escuro: linear-gradient(180deg, #EBF2FC 0%, #EEF8F9 100%);
    --Neutro-800: hsl(200, 60%, 99%); /* Neutro-0 */
    --Neutro-0: hsl(226, 25%, 17%); /* Neutro-800 */
    --Neutro-700: hsl(0, 0%, 93%); /* Neutro-100 */
    --Neutro-100: hsl(226, 11%, 37%); /* Neutro-600 */
    --Neutro-600: hsl(0, 0%, 78%); /* Neutro-300 */
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --Gradiente-escuro:   linear-gradient(180deg, #040918 0%, #091540 100%);
    --Neutro-800: hsl(226, 25%, 17%);
    --Neutro-0: hsl(200, 60%, 99%);
    --Neutro-700: hsl(225, 23%, 24%);
    --Neutro-100: hsl(0, 0%, 93%);
    --Neutro-600: hsl(226, 11%, 37%);
  }

  html {
    color-scheme: dark;
  }
}

[mode-light-dark="light"] {
  color-scheme: light;
  --Gradiente-escuro: linear-gradient(180deg, #EBF2FC 0%, #EEF8F9 100%);
  --Neutro-800: hsl(200, 60%, 99%); /* Neutro-0 */
  --Neutro-0: hsl(226, 25%, 17%); /* Neutro-800 */
  --Neutro-700: hsl(0, 0%, 93%); /* Neutro-100 */
  --Neutro-100: hsl(226, 11%, 37%); /* Neutro-600 */
  --Neutro-600: hsl(0, 0%, 78%); /* Neutro-300 */
}

[mode-light-dark="dark"] {
  color-scheme: dark;
  --Gradiente-escuro:   linear-gradient(180deg, #040918 0%, #091540 100%);
  --Neutro-800: hsl(226, 25%, 17%);
  --Neutro-0: hsl(200, 60%, 99%);
  --Neutro-700: hsl(225, 23%, 24%);
  --Neutro-100: hsl(0, 0%, 93%);
  --Neutro-600: hsl(226, 11%, 37%);
}