/**
 * T-Connect SMART package welcome popup (homepage)
 */

.TConnect-smart-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
  box-sizing: border-box;
}

.TConnect-smart-popup.is-visible {
  display: flex;
}

.TConnect-smart-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.TConnect-smart-popup__frame {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: min(920px, calc(100vw - 48px));
}

.TConnect-smart-popup__box {
  position: relative;
  line-height: 0;
  background: transparent;
}

.TConnect-smart-popup__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(920px, calc(100vw - 48px));
  max-height: min(82vh, 820px);
  max-height: min(82dvh, 820px);
  object-fit: contain;
  vertical-align: top;
}

.TConnect-smart-popup__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #173768;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.TConnect-smart-popup__link {
  display: block;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

@media (max-width: 767px) {
  .TConnect-smart-popup {
    padding: 44px 12px 12px;
  }

  .TConnect-smart-popup__frame {
    width: fit-content;
    max-width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
  }

  .TConnect-smart-popup__image {
    max-width: min(100%, calc(100vw - 24px));
    max-height: min(68vh, 520px);
    max-height: min(68dvh, 520px);
  }

  .TConnect-smart-popup__close {
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }
}
