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

main {
  width: 100vw;
  height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  width: 420px;
  margin: 0 auto;
  padding: 20px;
}

.btn {
  margin-bottom: 20px;
  padding: 8px 16px;
  font-size: 1.2em;
  color: whitesmoke;
  background-color: #00d6d6;
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 4px -4px gray;
  cursor: pointer;
  outline: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover,
.btn:focus {
  background-color: #01bebe;
  box-shadow: 0 5px 4px -4px black;
}

.btn:active {
  background-color: #00d6d6;
  box-shadow: 0 5px 4px -4px gray;
}

.btn-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  box-shadow: none;
}

.btn-close > svg {
  fill: #97a3ad;
}

.btn-close:hover,
.btn-close:focus {
  box-shadow: none;
}

.btn-close:hover > svg {
  fill: white;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 50vw;
  height: 50vh;
  background-color: white;
  border-radius: 8px;
  z-index: 2;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.2);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease,
    z-index 0.3s ease;
}

.modal__inner {
  padding: 10px 16px;
}

.js-modal-show {
  transform: scale(1) translate(-50%, -50%);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.overlay {
  position: fixed;
  display: none;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.4);
}

.js-overlay-show {
  display: block;
}

@media (max-width: 768px) {
  .modal {
    width: 90%;
  }
}
