/* ** TABLE OF CONTENT ** */
/* ********************** */
/* ** FONTS            ** */
/* ** VARIABLES        ** */
/* ** RESETS           ** */
/* ** DARKMODE         ** */
/* ** ACCESSIBILITY    ** */
/* ** DIEXPLORER       ** */
/* ** COMPONENTS       ** */
/* ** HEADER           ** */
/* ** GENERAL STYLING  ** */
/* ********************** */
/**/
/* ** FONTS ** */
@font-face {
  font-family: "Josefin Sans";
  src: url("../assets/fonts/JosefinSans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Josefin Sans";
  src: url("../assets/fonts/JosefinSans-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}
/* ** VARIABLES ** */
:root {
  --clr-primary: hsl(220, 98%, 61%);
  --clr-gradient: linear-gradient(135deg, hsl(192, 100%, 67%), hsl(280, 87%, 65%));
  --clr-text-hover: hsl(235, 19%, 35%);
  --clr-text: hsl(235, 19%, 35%);
  --clr-secondary-200: hsl(236, 9%, 61%);
  --clr-text-inactive: hsl(233, 11%, 84%);
  --clr-secondary-400: hsl(236, 33%, 92%);
  --clr-list-bg: hsl(0, 0%, 100%);
  --clr-body-bg: hsl(0, 0%, 98%);
  --box-shadow: 0px 0px 110px -10px rgba(125, 125, 125, 0.65);
  --header-bg-desktop: url(../img/bg-desktop-light.jpg);
  --header-bg-mobile: url(../img/bg-mobile-light.jpg);
}

[data-theme=dark] {
  --clr-text-hover: hsl(236, 33%, 92%);
  --clr-text: hsl(234, 39%, 85%);
  --clr-secondary-200: hsl(234, 11%, 52%);
  --clr-text-inactive: hsl(233, 14%, 35%);
  --clr-secondary-400: hsl(237, 14%, 26%);
  --clr-list-bg: hsl(235, 24%, 19%);
  --clr-body-bg: hsl(235, 21%, 11%);
  --box-shadow: 0px 0px 110px -10px rgba(31, 31, 31, 0.65);
  --header-bg-desktop: url(../img/bg-desktop-dark.jpg);
  --header-bg-mobile: url(../img/bg-mobile-dark.jpg);
}

/* ** RESET ** */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1;
}

/* 
 * USAGE: Add role="list" to lists that doesn't look like lists. 
 * Remove padding on a per-context basis.
 * Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed
 */
ul[role=list],
ol[role=list] {
  list-style: none;
}

/* Set core root defaults */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Prevent font scaling in iOS landscape while allowing user zoom */
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  -webkit-text-decoration-skip: ink;
          text-decoration-skip-ink: auto;
}

:-webkit-any-link {
  color: inherit;
}

:-moz-any-link {
  color: inherit;
}

:link,:visited {
  color: inherit;
}

:-webkit-any-link {
  color: inherit;
}

:-moz-any-link {
  color: inherit;
}

:any-link {
  color: inherit;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  background-color: transparent;
}

/* Restore address element to have normal font-style */
address {
  font-style: normal;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after {
    -webkit-animation-duration: 0.01ms !important;
            animation-duration: 0.01ms !important;
    -webkit-animation-iteration-count: 1 !important;
            animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Cred: Andy Bell @hankchizljaw https://github.com/hankchizljaw/modern-css-reset */
/* ** DARKMODE ** */
:root {
  --dm-icon-color: black;
  --dm-tooltip-bg: rgba(0,0,0,0.8);
  --dm-tooltip-text: white;
  --dm-fs-tooltip: 14px;
  --dm-box-size: 4rem;
  --dm-ggs: 1;
}

[data-theme=dark] {
  --dm-icon-color: white;
  --dm-tooltip-bg: rgba(255,255,255,0.8);
  --dm-tooltip-text: black;
}

.temp-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

#dark-mode {
  cursor: pointer;
}

#dark-mode span {
  transform: rotateY(0deg);
  transition: transform 250ms linear;
}

#dark-mode span.active {
  transform: rotateY(90deg);
}

/* Color of Tooltip arrow */
#dark-mode::before {
  border-left-color: rgba(0,0,0,0.8);
  border-left-color: var(--dm-tooltip-bg);
}

[title] {
  position: relative;
}

.dark-mode--span {
  transition: all 350ms cubic-bezier(0.215, 0.61, 0.355, 1);
  display: flex;
  width: auto;
  height: 4rem;
  height: var(--dm-box-size);
  justify-content: center;
  align-items: center;
  color: black;
  color: var(--dm-icon-color);
}

@-webkit-keyframes tooltip {
  to {
    opacity: 0.9;
    transform: translate(0, -50%);
  }
}

@keyframes tooltip {
  to {
    opacity: 0.9;
    transform: translate(0, -50%);
  }
}
[title][data-flow^=left]:hover::before,
[title][data-flow^=left]:hover::after,
[title][data-flow^=right]:hover::before,
[title][data-flow^=right]:hover::after {
  -webkit-animation: tooltip 300ms ease-out forwards;
          animation: tooltip 300ms ease-out forwards;
}

[title]::before,
[title]::after {
  text-transform: none;
  font-size: 14px;
  font-size: var(--dm-fs-tooltip);
  line-height: 1;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  pointer-events: none;
  position: absolute;
  display: none;
  opacity: 0;
}

[title]::before {
  content: "";
  border: 5px solid transparent;
  z-index: 1001;
}

[title][data-flow^=left]::after {
  top: 50%;
  right: calc(100% + 10px);
  transform: translate(-0.5em, -50%);
}

[title][data-flow^=right]::after {
  top: 50%;
  left: calc(100% + 5px);
  transform: translate(0.5em, -50%);
}

[title]::after {
  content: attr(title);
  text-align: center;
  min-width: 3rem;
  max-width: 21rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1.4ch 2.5ch;
  border-radius: 0.8ch;
  box-shadow: 0 0.1rem 0.2rem -0.5em rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

[title]:hover::before,
[title]:hover::after {
  display: block;
}

[title][data-flow^=left]::before {
  top: 50%;
  border-right-width: 0;
  left: calc(0em - 11px);
  transform: translate(-0.5em, -50%);
}

[title][data-flow^=right]::before {
  top: 50%;
  border-left-width: 0;
  border-right-color: rgba(0,0,0,0.8);
  border-right-color: var(--dm-tooltip-bg);
  right: calc(0em - 5px);
  transform: translate(0.5em, -50%);
}

#dark-mode::after {
  background: rgba(0,0,0,0.8);
  background: var(--dm-tooltip-bg);
  color: white;
  color: var(--dm-tooltip-text);
}

.icon-sun {
  content: url(../img/icon-sun.svg);
  width: 20px;
}
@media (min-width: 33.75em) {
  .icon-sun {
    width: unset;
  }
}

.icon-moon {
  content: url(../img/icon-moon.svg);
  width: 20px;
}
@media (min-width: 33.75em) {
  .icon-moon {
    width: unset;
  }
}

@supports (-webkit-touch-callout: none) {
  #dark-mode::before,
#dark-mode::after {
    display: none;
  }
}
a[target=_blank]::after {
  content: url(/assets/External_link_font_awesome.svg);
  display: inline-block;
  margin-left: 0.2em;
  width: 1em;
  height: 1em;
  vertical-align: sub;
  filter: invert(25%) sepia(3%) saturate(7145%) hue-rotate(198deg) brightness(100%) contrast(81%);
}

[data-theme=dark] a[target=_blank]::after {
  filter: invert(92%) sepia(45%) saturate(6876%) hue-rotate(180deg) brightness(97%) contrast(87%);
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.dIExplorer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-size: 2rem;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  background-color: #16bdee;
  color: #fff;
  text-align: center;
}
.dIExplorer .browsers > * {
  float: left;
  margin: 1em;
}
.dIExplorer img {
  width: 2.5em !important;
  filter: invert(100%) sepia(0%) saturate(1%) hue-rotate(120deg) brightness(104%) contrast(100%);
}

@supports (grid-area: auto) {
  .dIExplorer {
    visibility: hidden;
    display: none;
  }
}
/* ** COMPONENTS ** */
.container {
  margin-left: max(2rem, env(safe-area-inset-left));
  margin-right: max(2rem, env(safe-area-inset-right));
  width: calc(100% - 4rem);
  max-width: 33.75rem;
}
@media (min-width: 33.75em) {
  .container {
    margin: 0 auto;
  }
}

.center {
  text-align: center;
}

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

.grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: (50%)[2];
  grid-template-columns: repeat(2, 50%);
}

.new-item,
.items {
  grid-column: 1/-1;
}

@media (min-width: 33.75rem) {
  .grid {
    -ms-grid-columns: (33.333333%)[3];
    grid-template-columns: repeat(3, 33.333333%);
  }
}
/* ** HEADER ** */
header {
  background-image: url(../img/bg-mobile-light.jpg);
  background-image: var(--header-bg-mobile);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top 20%;
  padding-top: 2rem;
  padding-bottom: 6rem;
}
@media (min-width: 33.75em) {
  header {
    background-image: url(../img/bg-desktop-light.jpg);
    background-image: var(--header-bg-desktop);
    padding-bottom: 10.5rem;
    padding-top: 4rem;
  }
}

.site-title {
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: -5px;
}
@media (min-width: 33.75em) {
  .site-title {
    font-size: 1.8rem;
  }
}

/* ** GENERAL STYLING ** */
body {
  font-family: "Josefin Sans", Sans-serif;
  background-color: hsl(0, 0%, 98%);
  background-color: var(--clr-body-bg);
  color: hsl(235, 19%, 35%);
  color: var(--clr-text);
  font-size: 0.7rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

h1 {
  color: white;
}

a[class] {
  color: black;
}

main.container {
  margin-top: -5rem;
}
@media (min-width: 33.75em) {
  main.container {
    margin-top: -9rem;
  }
}

.attribution {
  margin-top: auto;
  font-size: 0.7rem;
}

/* Form */
.new-item {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: -webkit-min-content 1fr;
  -ms-grid-columns: min-content 1fr;
  grid-template-columns: -webkit-min-content 1fr;
  grid-template-columns: min-content 1fr;
  align-items: center;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
  background-color: hsl(0, 0%, 100%);
  background-color: var(--clr-list-bg);
  border-radius: 5px;
}
.new-item input {
  height: 2.6em;
  padding: 0;
}
.new-item input.focus-visible {
  outline: none;
}
.new-item input:focus-visible {
  outline: none;
}

input[type=text] {
  border: none;
  max-width: 80%;
  background: transparent;
  color: inherit;
}

input[type=checkbox] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  height: 0;
  margin: 0;
  width: 0;
  display: none;
}

.existing-items {
  grid-column: 1/-1;
  border-radius: 5px;
  box-shadow: 0px 0px 110px -10px rgba(125, 125, 125, 0.65);
  box-shadow: var(--box-shadow);
}

.items {
  display: flex;
  flex-direction: column;
  background-color: hsl(0, 0%, 100%);
  background-color: var(--clr-list-bg);
  border-radius: 5px 5px 0 0;
}
.items label {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: -webkit-min-content 1fr -webkit-min-content;
  -ms-grid-columns: min-content 1fr min-content;
  grid-template-columns: -webkit-min-content 1fr -webkit-min-content;
  grid-template-columns: min-content 1fr min-content;
  align-items: center;
  padding-top: 0.7em;
  padding-bottom: 0.4em;
  cursor: pointer;
  transition: all 100ms linear;
  width: 100%;
}
.items input:checked + label {
  color: hsl(233, 11%, 84%);
  color: var(--clr-text-inactive);
  text-decoration: line-through;
}
.items input:checked + label::before {
  background: linear-gradient(135deg, hsl(192, 100%, 67%), hsl(280, 87%, 65%));
  background: var(--clr-gradient);
}

.item {
  display: flex;
  border-bottom: 1px solid hsl(236, 33%, 92%);
  border-bottom: 1px solid var(--clr-secondary-400);
}

.action-bar {
  grid-column: 1/-1;
  font-size: 0.75rem;
  grid-auto-flow: dense;
  position: relative;
}

label span,
.new-item span {
  margin: 0.7em 1.5em 1em;
}

.select,
.new-item span {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  position: relative;
  background: hsl(236, 33%, 92%);
  background: var(--clr-secondary-400);
}

.select:hover,
input:checked + label .select {
  background: linear-gradient(135deg, hsl(192, 100%, 67%), hsl(280, 87%, 65%));
  background: var(--clr-gradient);
}

input:not(:checked) + label .select:before,
.new-item span:before {
  content: "";
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: hsl(0, 0%, 100%);
  background: var(--clr-list-bg);
  border-radius: 50%;
  height: 18px;
  width: 18px;
}

input:checked + label .select::before {
  content: url(../img/icon-check.svg);
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  border-radius: 50%;
}

.remove {
  content: url(../img/icon-cross.svg);
  display: inline-block;
  height: 1em;
  opacity: 1;
}

.action-bar.grid {
  -ms-grid-columns: -webkit-max-content 1fr -webkit-max-content;
  -ms-grid-columns: max-content 1fr max-content;
  grid-template-columns: -webkit-max-content 1fr -webkit-max-content;
  grid-template-columns: max-content 1fr max-content;
  color: hsl(236, 9%, 61%);
  color: var(--clr-secondary-200);
}

.left {
  -ms-grid-column: 1;
  -ms-grid-column-span: 1;
  grid-column: 1/2;
  background-color: hsl(0, 0%, 100%);
  background-color: var(--clr-list-bg);
  padding: 1rem 0 1rem 1rem;
  border-radius: 0 0 0 5px;
  transition: color 100ms linear;
}

.clear {
  grid-column: 2/-1;
  text-align: right;
  background-color: hsl(0, 0%, 100%);
  background-color: var(--clr-list-bg);
  padding: 1rem 1rem 1rem 0;
  border-radius: 0 0 5px 0;
  cursor: pointer;
  transition: color 100ms linear;
}
.clear:hover {
  color: hsl(235, 19%, 35%);
  color: var(--clr-text-hover);
}

.filter {
  grid-column: 1/-1;
  background-color: hsl(0, 0%, 100%);
  background-color: var(--clr-list-bg);
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  position: absolute;
  top: 4.2em;
  left: 0;
  right: 0;
  font-size: 1rem;
  transition: color 100ms linear;
}
.filter .active {
  color: hsl(220, 98%, 61%);
  color: var(--clr-primary);
}
.filter span:not(.active):hover {
  color: hsl(235, 19%, 35%);
  color: var(--clr-text-hover);
  cursor: pointer;
}
.filter span:not(:first-of-type) {
  margin-left: 1.125rem;
}

.reorder {
  margin-top: 7rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: hsl(236, 9%, 61%);
  color: var(--clr-secondary-200);
}

@media (min-width: 33.75em) {
  body {
    font-size: 1.125rem;
  }

  .remove {
    opacity: 0;
  }

  @supports (-webkit-touch-callout: none) {
    .remove {
      opacity: 1;
    }
  }
  input:checked + label .select::before {
    top: 50%;
  }

  .items label {
    padding-top: 0.4em;
    padding-bottom: 0.3em;
  }

  label:hover .remove {
    opacity: 1;
  }

  .select,
.new-item span {
    transform: scale(1.2);
  }

  .left {
    -ms-grid-column: 1;
    -ms-grid-column-span: 1;
    grid-column: 1/2;
  }

  .filter {
    -ms-grid-column: 2;
    -ms-grid-column-span: 1;
    grid-column: 2/3;
    margin-top: unset;
    border-radius: 0;
    position: static;
    font-size: 0.9rem;
  }

  .clear {
    grid-column: 3/-1;
  }

  .reorder {
    margin-top: 3rem;
  }
}
/*# sourceMappingURL=style.css.map */