html.modal-active,
body.modal-active {
  overflow: hidden;
}

.modal {
  width: auto !important;
  height: auto !important;
  z-index: 9999 !important;
}

#modal-container {
  position: fixed;
  display: table;
  height: 100vh;
  width: 100%;
  top: 0;
  left: 0;
  transform: scale(0);
  z-index: 1;
}
#modal-container.five {
  transform: scale(1);
}

#modal-container.five .modal-background {
  background: rgba(0, 0, 0, 0);
  animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.five .modal-background .modal {
  transform: translateX(-1500px);
  animation: roadRunnerIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.five.out {
  animation: quickScaleDown 0s 0.5s linear forwards;
}

#modal-container.five.out .modal-background {
  animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.five.out .modal-background .modal {
  animation: roadRunnerOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-background {
  display: table-cell;
  background: rgba(0, 0, 0, 0.8) !important;
  text-align: center;
  vertical-align: middle;
}

.modal-background .modal {
  background: transparent;
  padding: 0px;
  display: inline-block;
  border-radius: 9px;
  font-weight: 300;
  position: relative;
}

.modal {
  box-shadow: 0px 2px 25px -3px lavender;
}

.modal-background .modal .modal-svg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 3px;
}

.modal-background .modal .modal-svg rect {
  stroke: #fff;
  stroke-width: 2px;
  stroke-dasharray: 778;
  stroke-dashoffset: 778;
}

.content {
  height: auto;
  display: inline-block;
  position: relative;
  z-index: 0;
}

.content .buttons {
  display: inline-block;

  text-align: center;
}

.content .buttons .button {
  display: inline-block;
  text-align: center;
  background: red;
  font-size: 18px;
  background-color: transparent;
  border-radius: 3px;
  cursor: pointer;
}

/* .content .buttons .button:hover {
  color: white;
  background: #009bd5;
} */

@keyframes unfoldIn {
  0% {
    transform: scaleY(0.005) scaleX(0);
  }
  50% {
    transform: scaleY(0.005) scaleX(1);
  }
  100% {
    transform: scaleY(1) scaleX(1);
  }
}

@keyframes unfoldOut {
  0% {
    transform: scaleY(1) scaleX(1);
  }
  50% {
    transform: scaleY(0.005) scaleX(1);
  }
  100% {
    transform: scaleY(0.005) scaleX(0);
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes zoomOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}

@keyframes fadeIn {
  0% {
    background: rgba(0, 0, 0, 0);
  }
  100% {
    background: rgba(0, 0, 0, 0.7);
  }
}

@keyframes fadeOut {
  0% {
    background: rgba(0, 0, 0, 0.7);
  }
  100% {
    background: rgba(0, 0, 0, 0);
  }
}

@keyframes scaleUp {
  0% {
    transform: scale(0.8) translateY(1000px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0px);
    opacity: 1;
  }
}

@keyframes scaleDown {
  0% {
    transform: scale(1) translateY(0px);
    opacity: 1;
  }
  100% {
    transform: scale(0.8) translateY(1000px);
    opacity: 0;
  }
}

@keyframes scaleBack {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.85);
  }
}

@keyframes scaleForward {
  0% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes quickScaleDown {
  0% {
    transform: scale(1);
  }
  99.9% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}

@keyframes slideUpLarge {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes slideDownLarge {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0%);
  }
}

@keyframes moveUp {
  0% {
    transform: translateY(150px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes moveDown {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(150px);
  }
}

@keyframes blowUpContent {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  99.9% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(0);
  }
}

@keyframes blowUpContentTwo {
  0% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes blowUpModal {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes blowUpModalTwo {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes roadRunnerIn {
  0% {
    transform: translateX(-1500px) skewX(30deg) scaleX(1.3);
  }
  70% {
    transform: translateX(30px) skewX(0deg) scaleX(0.9);
  }
  100% {
    transform: translateX(0px) skewX(0deg) scaleX(1);
  }
}

@keyframes roadRunnerOut {
  0% {
    transform: translateX(0px) skewX(0deg) scaleX(1);
  }
  30% {
    transform: translateX(-30px) skewX(-5deg) scaleX(0.9);
  }
  100% {
    transform: translateX(1500px) skewX(30deg) scaleX(1.3);
  }
}

@keyframes sketchIn {
  0% {
    stroke-dashoffset: 778;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes sketchOut {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 778;
  }
}

@keyframes modalFadeIn {
  0% {
    background-color: transparent;
  }
  100% {
    background-color: white;
  }
}

@keyframes modalFadeOut {
  0% {
    background-color: white;
  }
  100% {
    background-color: transparent;
  }
}

@keyframes modalContentFadeIn {
  0% {
    opacity: 0;
    top: -20px;
  }
  100% {
    opacity: 1;
    top: 0;
  }
}

@keyframes modalContentFadeOut {
  0% {
    opacity: 1;
    top: 0px;
  }
  100% {
    opacity: 0;
    top: -20px;
  }
}

@keyframes bondJamesBond {
  0% {
    transform: translateX(1000px);
  }
  80% {
    transform: translateX(0px);
    border-radius: 75px;
    height: 75px;
    width: 75px;
  }
  90% {
    border-radius: 3px;
    height: 182px;
    width: 247px;
  }
  100% {
    border-radius: 3px;
    height: 162px;
    width: 227px;
  }
}

@keyframes killShot {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(300px) rotate(45deg);
    opacity: 0;
  }
}

@keyframes fadeToRed {
  0% {
    background-color: rgba(black, 0.6);
  }
  100% {
    background-color: rgba(red, 0.8);
  }
}

@keyframes slowFade {
  0% {
    opacity: 1;
  }
  99.9% {
    opacity: 0;
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}

/* посик внутри */

:root {
  --hue: 223;
  --bg: hsl(var(--hue), 90%, 90%);
  --fg: hsl(var(--hue), 90%, 10%);
  --trans-dur: 0.3s;
  --trans-timing: cubic-bezier(0.65, 0, 0.35, 1);
  font-size: calc(20px + (40 - 20) * (100vw - 320px) / (2560 - 320));
}

.search,
.search__icon,
.search__input {
  color: black;
}
.search {
  margin: auto;
  width: 12em;
}
.search__button,
.search__input {
  outline: transparent;
}
.search__button {
  background-color: transparent;
  cursor: pointer;
  display: block;
  position: absolute;
  top: 0;
  right: 0.125em;
  width: 2.25em;
  height: 2.25em;
  border: 0px !important;
  -webkit-tap-highlight-color: transparent;
}
[dir="rtl"] .search__button {
  right: auto;
  left: 0.125em;
  transform: scaleX(-1);
}
.search__icon {
  display: block;
  margin: auto;
  transition: color 0.15s linear;
  width: 2.25em;
  height: 2.25em;
}
.search__button:focus-visible .search__icon,
.search__button:hover .search__icon {
  color: hsl(220, 90%, 80%);
}
.search__icon-ellipse {
  transition: ry 0.3s ease;
}
.search__icon-g,
.search__icon-line2,
.search__icon-line3 {
  transition: transform 0.3s ease;
}
.search__icon-g {
  transform: translate(6px, 6px);
  transform-origin: 12px 12px;
}
.search__icon-line2,
.search__icon-line3 {
  transform-origin: 21px 21px;
}
.search__input {
  background-color: hsl(220, 90%, 60%);
  border-radius: 0.5em;
  padding: 0.125em 0.75em;
  padding-inline-end: 2.375em;
  transition: background-color 0.3s ease, box-shadow 0.15s linear;
  width: 100%;
  height: 2.25em;
  border: 0px !important;
}
.search__input::placeholder {
  color: hsl(220, 90%, 80%);
  transition: color 0.3s ease;
}
.search__input-wrap {
  position: relative;
}
.search__label {
  position: absolute;
  width: 1px;
  height: 1px;
}

/* :focus state */
.search__button:focus .search__icon-ellipse,
.search__button:hover .search__icon-ellipse,
.search__input:focus + .search__button .search__icon-ellipse {
  ry: 0.01px;
}
.search__button:focus .search__icon-g,
.search__button:hover .search__icon-g,
.search__input:focus + .search__button .search__icon-g {
  transform: translate(6px, 6px) rotate(-45deg);
}
.search__button:focus .search__icon-line2,
.search__button:hover .search__icon-line2,
.search__input:focus + .search__button .search__icon-line2 {
  transform: rotate(-45deg);
}
.search__button:focus .search__icon-line3,
.search__button:hover .search__icon-line3,
.search__input:focus + .search__button .search__icon-line3 {
  transform: rotate(45deg);
}

/* “searched” state */
.search--searched .search__button {
  animation: search-icon-bounce 0.3s ease;
}
[dir="rtl"] .search--searched .search__button {
  animation: search-icon-bounce-rtl 0.3s ease;
}
.search--searched .search__icon-ellipse,
.search--searched .search__icon-g,
.search--searched .search__icon-line2,
.search--searched .search__icon-line3 {
  transition-delay: 0.3s;
}

.search {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dark theme */

  .search__input {
    background-color: aliceblue;
  }
  .search__input::placeholder {
    color: hsl(220, 90%, 70%);
  }


/* Animations */
@keyframes search-icon-bounce {
  from,
  to {
    animation-timing-function: cubic-bezier(0.65, 0, 1, 1);
    transform: translateX(0);
  }
  50% {
    animation-timing-function: cubic-bezier(0, 0, 0.35, 1);
    transform: translateX(12.5%);
  }
}
@keyframes search-icon-bounce-rtl {
  from,
  to {
    animation-timing-function: cubic-bezier(0.65, 0, 1, 1);
    transform: scaleX(-1) translateX(0);
  }
  50% {
    animation-timing-function: cubic-bezier(0, 0, 0.35, 1);
    transform: scaleX(-1) translateX(12.5%);
  }
}
