/* -------------------------------- 

File#: _1_download-list
Title: Download List
Descr: A list of downloadable files
Usage: codyhouse.co/license

-------------------------------- */

/* reset */
*, *::after, *::before {
  box-sizing: border-box;
}

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: hsl(0, 0%, 100%);
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1.125rem; /* 18px */
  line-height: 1.4;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 {
  font-size: 2.5rem; /* 40px */
}

h2 {
  font-size: 2.125rem; /* 34px */
}

h3 {
  font-size: 1.75rem; /* 28px */
}

h4 {
  font-size: 1.375rem; /* 22px */
}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  -webkit-appearance: none;
          appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}



table {
  border-collapse: collapse;
  border-spacing: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

/* -------------------------------- 

Buttons 

-------------------------------- */

.cd-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375em;
  font-size: 1em;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: 0.2s;
  will-change: transform;
}

.cd-btn:focus-visible {
  outline: none;
}

.cd-btn:active {
  transform: translateY(2px);
}

.cd-btn--primary {
  background: #445A83;

  color: hsl(0, 0%, 100%);
}

.cd-btn--primary:hover {
  background: #163C6B;
}


/* -------------------------------- 

Icons 

-------------------------------- */

.cd-icon {
  --size: 1em;
  font-size: var(--size);
  height: 1em;
  width: 1em;
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

.cd-icon--is-spinning { /* rotate the icon infinitely */
  animation: cd-icon-spin 1s infinite linear;
}

@keyframes cd-icon-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cd-icon use { /* SVG symbols - enable icon color corrections */
  color: inherit;
  fill: currentColor;
}

/* -------------------------------- 

Component 

-------------------------------- */

.dow-list {
  display: grid;
  gap: 0.75rem;
}

.dow-list__item {
  border-radius: 0.375em;
  background: hsl(0, 0%, 100%);
  box-shadow: 0 0 0 1px hsla(230, 13%, 9%, 0.05),
              0 0.3px 0.4px hsla(230, 13%, 9%, 0.02),
              0 0.9px 1.5px hsla(230, 13%, 9%, 0.045),
              0 3.5px 6px hsla(230, 13%, 9%, 0.09);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 42.5rem) {
  .dow-list__item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width:60%;
  }
}

.dow-list__file-icon {
  --size: 48px;
  margin-right: 0.5rem;
}

.dow-list__title {
  font-size: 1.125rem;
  line-height: 1;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dow-list__metadata-list {
  display: flex;
  align-items: center;
  line-height: 1;
  font-size: 0.9375rem;
  color: hsl(225, 4%, 47%);
}

.dow-list__metadata-list > * {
  display: flex;
  align-items: center;
}

.dow-list__metadata-list > *:not(:last-child)::after {
  /* dot separator */
  content: "";
  display: block;
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: currentColor;
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* animated button */
.dow-list__btn {
  --hover-transition-duration: .3s;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

@media (min-width: 42.5rem) {
  .dow-list__btn {
    width: auto;
    margin-right: 0.25rem;
  }
}

.dow-list__btn:hover .dow-list__btn-label, .dow-list__btn.dow-list__btn--is-loading .dow-list__btn-label {
  transform: scale(0.5);
  opacity: 0;
}

.dow-list__btn:hover .dow-list__icon-wrapper, .dow-list__btn.dow-list__btn--is-loading .dow-list__icon-wrapper {
  transform: translateY(0);
}

.dow-list__btn--reset .dow-list__btn-label, .dow-list__btn--reset:hover .dow-list__btn-label {
  transform: scale(1);
  opacity: 1;
}

.dow-list__btn--reset .dow-list__icon-wrapper, .dow-list__btn--reset:hover .dow-list__icon-wrapper {
  transform: translateY(100%);
}

.dow-list__btn--reset .dow-list__icon-group *, .dow-list__btn--reset:hover .dow-list__icon-group * {
  transition: none !important;
  animation: none !important;
}

.dow-list__btn-label {
  padding: 0.5rem 1rem;
  transition: opacity var(--hover-transition-duration), transform var(--hover-transition-duration);
}

.dow-list__icon-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform var(--hover-transition-duration);
  fill:white;
}

.dow-list__icon {
  width: 20px;
  height: 20px;
  display: block;
}

.dow-list__icon .dow-list__icon-group > *:nth-child(1) {
  /* arrow main leg */
  stroke-dashoffset: 0;
  stroke-dasharray: 16;
  transition: stroke-dashoffset 0.4s 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.dow-list__icon .dow-list__icon-group > *:nth-child(2), .dow-list__icon .dow-list__icon-group *:nth-child(3) {
  /* arrow smaller legs */
  opacity: 1;
  transform: rotate(0);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0s 0.3s;
}

.dow-list__icon .dow-list__icon-group > *:nth-child(4) {
  /* loading circle */
  stroke-dashoffset: 50;
  stroke-dasharray: 50;
}

.dow-list__icon .dow-list__icon-group > *:nth-child(5) {
  /* checkmark final loading circle */
  stroke-dashoffset: 38;
  stroke-dasharray: 38;
  transition: stroke-dashoffset 0.7s;
}

.dow-list__icon .dow-list__icon-group > *:nth-child(6) {
  /* checkmark */
  stroke-dashoffset: 24;
  stroke-dasharray: 24;
  transition: stroke-dashoffset 0.5s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.dow-list__icon .dow-list__icon-group > *:nth-child(7) {
  /* exclamation point final loading circle */
  stroke-dashoffset: 25;
  stroke-dasharray: 25;
  transition: stroke-dashoffset 0.45s;
}

.dow-list__icon .dow-list__icon-group > *:nth-child(8) {
  /* exclamation point leg */
  stroke-dashoffset: 10;
  stroke-dasharray: 10;
  transition: stroke-dashoffset 0.3s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.dow-list__icon .dow-list__icon-group > *:nth-child(9) {
  /* exclamation point dot */
  transform-origin: 10px 17.5px;
  transform: scale(0);
  transition: transform 0.3s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(1) {
  stroke-dashoffset: 16;
}

.dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(2), .dow-list__btn--is-loading .dow-list__icon-group *:nth-child(3) {
  opacity: 0;
  transform-origin: 10px 18px;
}

.dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(2) {
  transform: rotate(45deg);
}

.dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(3) {
  transform: rotate(-45deg);
}

.dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(4) {
  animation: dow-list-obj-4-anim 1s 0.6s infinite;
}

@media not all and (pointer: fine) {
  /* no pointing device (e.g., touch device) */
  .dow-list__icon .dow-list__icon-group > *:nth-child(1), .dow-list__icon .dow-list__icon-group > *:nth-child(2), .dow-list__icon .dow-list__icon-group > *:nth-child(3) {
    display: none; /* hide arrow icon */
  }

  .dow-list__btn--is-loading .dow-list__icon-group > *:nth-child(4) {
    animation-delay: 0s;
  }

  .dow-list__btn:hover .dow-list__btn-label {
    /* keep button label visible */
    transform: scale(1);
    opacity: 1;
  }

  .dow-list__btn.dow-list__btn--is-loading .dow-list__btn-label {
    opacity: 0;
  }
}

@keyframes dow-list-obj-4-anim {
  from {
    stroke-dashoffset: 50;
  }
  to {
    stroke-dashoffset: 150;
  }
}

.dow-list__btn--success .dow-list__icon-group > *:nth-child(4) {
  display: none; /* hide loading circle */
}

.dow-list__btn--success .dow-list__icon-group > *:nth-child(5) {
  stroke-dashoffset: 114;
}

.dow-list__btn--success .dow-list__icon-group > *:nth-child(6) {
  stroke-dashoffset: 0;
}

.dow-list__btn--error {
  animation: dow-list-btn-error-anim 0.4s 0.5s;
}

.dow-list__btn--error .dow-list__icon-group > *:nth-child(4) {
  display: none; /* hide loading circle */
}

.dow-list__btn--error .dow-list__icon-group > *:nth-child(7) {
  stroke-dashoffset: 75;
}

.dow-list__btn--error .dow-list__icon-group > *:nth-child(8) {
  stroke-dashoffset: 0;
}

.dow-list__btn--error .dow-list__icon-group > *:nth-child(9) {
  transform: scale(1);
}

@keyframes dow-list-btn-error-anim {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(4px);
  }
  40%, 80% {
    transform: translateX(-4px);
  }
}

/* -------------------------------- 

Utilities 

-------------------------------- */

.cd-flex {
  display: flex;
}

.cd-items-center {
  align-items: center;
}