#gallery .download {
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  margin: 8px 0 2px;
  padding: 8px 18px;
  border: 1px solid #b8b8b8;
  border-radius: 20px;
  background: linear-gradient(#fff, #eee);
  color: #222;
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
#gallery .download:hover,
#gallery .download:focus {
  border-color: #8b1d1d;
  color: #710909;
  outline: none;
}
#gallery .download:focus-visible {
  box-shadow: 0 0 0 3px rgba(113, 9, 9, .18);
}
#gallery .download.is-downloading,
#gallery .download:disabled {
  cursor: wait;
  opacity: .58;
}
.gallery-download-status {
  box-sizing: border-box;
  display: none;
  width: calc(100% - 24px);
  max-width: 540px;
  margin: 14px auto 22px;
  padding: 16px 18px;
  border: 1px solid #d4d4d4;
  border-left: 4px solid #710909;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #f6f6f6 100%);
  color: #222;
  text-align: left;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .09);
}
.gallery-download-status.is-visible {
  display: block;
  animation: gallery-download-enter .18s ease-out;
}
.gallery-download-status.is-complete {
  border-left-color: #2d7a48;
}
.gallery-download-status.is-complete .gallery-download-status__icon,
.gallery-download-status.is-complete .gallery-download-status__bar {
  background: #2d7a48;
}
.gallery-download-status.is-error {
  border-left-color: #b3261e;
}
.gallery-download-status.is-error .gallery-download-status__icon,
.gallery-download-status.is-error .gallery-download-status__bar {
  background: #b3261e;
}
.gallery-download-status.is-preparing .gallery-download-status__icon:after,
.gallery-download-status.is-downloading .gallery-download-status__icon:after,
.gallery-download-status.is-building .gallery-download-status__icon:after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(113, 9, 9, .18);
  border-top-color: #710909;
  border-radius: 50%;
  animation: gallery-download-spin .8s linear infinite;
}
.gallery-download-status__header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.gallery-download-status__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #710909;
  color: #fff;
  font-size: 15px;
}
.gallery-download-status__copy {
  min-width: 0;
}
.gallery-download-status__title,
.gallery-download-status__detail {
  display: block;
}
.gallery-download-status__title {
  overflow: hidden;
  color: #161616;
  font-size: 14px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-download-status__detail {
  min-height: 16px;
  margin-top: 2px;
  color: #686868;
  font-size: 11px;
  font-weight: normal;
  line-height: 16px;
}
.gallery-download-status__percent {
  min-width: 42px;
  color: #710909;
  font-size: 13px;
  line-height: 18px;
  text-align: right;
}
.gallery-download-status__track {
  overflow: hidden;
  height: 8px;
  margin-top: 14px;
  border-radius: 4px;
  background: #dedede;
}
.gallery-download-status__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #710909, #d23b32);
  transition: width .22s ease;
}
.gallery-download-retry,
.gallery-download-save {
  display: none;
  min-height: 38px;
  margin-top: 13px;
  padding: 7px 16px;
  border-radius: 4px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.gallery-download-retry {
  border: 1px solid #9d211b;
  background: #fff;
  color: #8e1e18;
}
.gallery-download-retry:hover,
.gallery-download-retry:focus {
  background: #fff2f1;
  outline: none;
}
.gallery-download-save {
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid #25683d;
  border-radius: 5px;
  background: #2d7a48;
  color: #fff;
}
.gallery-download-save:hover,
.gallery-download-save:focus {
  background: #25683d;
  outline: none;
}
.gallery-download-save:focus-visible {
  box-shadow: 0 0 0 3px rgba(45, 122, 72, .22);
}
.gallery-download-save:disabled {
  cursor: wait;
  opacity: .65;
}
[dir="rtl"] .gallery-download-status {
  border-right: 4px solid #710909;
  border-left-width: 1px;
  text-align: right;
}
[dir="rtl"] .gallery-download-status__percent {
  text-align: left;
}
@media screen and (max-width: 659px) {
  #gallery .download {
    min-height: 44px;
    padding: 10px 20px;
  }
  .gallery-download-status {
    margin-top: 12px;
    padding: 14px;
    border-radius: 6px;
  }
  .gallery-download-status__header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .gallery-download-status__icon {
    width: 30px;
    height: 30px;
  }
  .gallery-download-status__title {
    font-size: 13px;
  }
  .gallery-download-status__detail {
    font-size: 12px;
  }
  .gallery-download-retry {
    width: 100%;
    min-height: 44px;
  }
  .gallery-download-save {
    width: 100%;
    min-height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-download-status.is-visible {
    animation: none;
  }
  .gallery-download-status__bar {
    transition: none;
  }
  .gallery-download-status__icon:after {
    animation: none !important;
  }
}
@keyframes gallery-download-enter {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes gallery-download-spin {
  to {
    transform: rotate(360deg);
  }
}
