.popup-container {
  position: relative;
}

.popup {
  display: none;
}

.popup.show {
  position: absolute;
  z-index: 20;
  display: grid;
  width: max-content;
  padding: 20px;
  background-color: var(--base-quaternary);
  border-radius: 8px;
  box-shadow: 0 -8px 32px 0 var(--dropdown-shadow);
}

.popup.mobile-mode {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--base-main);
  border-radius: 8px 8px 0 0;

  h3 {
    display: block;
    margin-bottom: 20px;
  }

  .popup__close-btn {
    display: flex;
    margin-top: 32px;
  }
}

.popup.top {
  bottom: calc(100% + 8px);
}

.popup.bottom {
  top: calc(100% + 8px);
}

.popup.left {
  right: 0;
}

.popup.right {
  left: 0;
}

.popup__btns {
  display: grid;
  row-gap: 12px;
}

.popup__close-btn {
  display: none;
}

.share-popup {
  h3 {
    margin-bottom: 20px;
  }
}

.share-popup__social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.contact-popup,
.card-actions-popup {
  h3 {
    display: none;
  }
}

.contact-popup:not(.mobile-mode) {
  min-width: 240px;
}

.card-actions-popup:not(.mobile-mode) {
  min-width: 348px;
}

/*tablet*/
@media (min-width: 675px) {
  .contact-popup.mobile-mode {
    .popup__btns {
      grid-template-columns: repeat(4, 1fr);
      column-gap: 8px;
    }
  }

  .card-actions-popup.mobile-mode {
    .popup__btns {
      grid-template-columns: repeat(3, 1fr);
      column-gap: 8px;
    }
  }
}
