﻿.adspop {
  position: fixed;
  inset: 0;
  z-index: 9998;
}

.adspop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.adspop .popup-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9999;
  padding-top: 15vh;
  box-sizing: border-box;
}

.adspop .popup-container .popup-content {
  max-width: 80vw;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.adspop .popup-container .popup-close {
  width: 42px;
  height: 42px;
  margin-bottom: 30px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.adspop .popup-container .popup-close img {
  width: 100%;
  height: 100%;
}

.adspop .popup-container .popup-picture {
  max-width: 25rem;
  max-height: 70vh;
  width: 100%;
  box-sizing: border-box;
  padding: 15px 10px;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adspop .popup-container .popup-picture img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media screen and (max-width: 768px) {
  .adspop .popup-container .popup-picture {
    max-width: 80vw;
    width: 100%;
  }

  .adspop .popup-container .popup-picture img {
    width: 100%;
  }
}

.adspop .application-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9999;
  padding-top: 15vh;
  box-sizing: border-box;
}

.adspop .application-popup .application-content {
  max-width: 80vw;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.adspop .application-popup .popup-close {
  width: 42px;
  height: 42px;
  margin-bottom: 30px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.adspop .application-popup .popup-close img {
  width: 100%;
  height: 100%;
}

.adspop .application-popup .application-list {
  max-width: 25rem;
  width: 100%;
  height: 26rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  row-gap: 6px;
  column-gap: 10px;
  align-content: start;
  background: linear-gradient(-45deg, #000, #313131);
  padding: 10px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  touch-action: pan-y;
}

.adspop .application-popup .application-list a {
  text-decoration: none;
  box-sizing: border-box;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.adspop .application-popup .application-list a img {
  width: 3.8rem;
  height: 3.8rem;
  flex-shrink: 0;
  position: relative;
  border-radius: 9px;
  display: block;
  margin: 0 auto;
  background-color: #353535;
}

.adspop .application-popup .application-list a p {
  font-size: 12px;
  white-space: nowrap;
  margin: 0.25rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .adspop .application-popup .application-list {
    grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr));
    max-width: 80vw;
    width: 100%;
    height: 26rem;
  }
}
