/** @format */

.ahrix-popup {
  --ahrix-blue: #1b78ff;
  --ahrix-cyan: #67ddff;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 8, 22, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ahrix-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.ahrix-popup__dialog {
  position: relative;
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(132, 204, 255, 0.28);
  border-radius: 28px;
  background: #07152d;
  box-shadow: 0 40px 100px rgba(0, 24, 74, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #fff;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ahrix-popup.is-visible .ahrix-popup__dialog {
  transform: translateY(0) scale(1);
}

.ahrix-popup__link {
  display: grid;
  grid-template-columns: 46% 54%;
  min-height: 540px;
  color: inherit;
  text-decoration: none;
}

.ahrix-popup__visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: 27px 0 0 0;
  background: #eef4fb;
}

.ahrix-search-demo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 18px 16px;
  color: #101828;
}

.ahrix-search-demo__query {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #c9d6e6;
  border-radius: 10px;
  padding: 0 13px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(42, 82, 130, 0.08);
  color: #126bff;
}

.ahrix-search-demo__query span {
  color: #182230;
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 12px;
  letter-spacing: -0.035em;
}

.ahrix-search-demo__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.ahrix-product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(31, 64, 105, 0.07);
}

.ahrix-product-card__image {
  position: relative;
  height: 128px;
  border-bottom: 1px solid #edf1f6;
  background: #faf9f6;
}

.ahrix-product-card__image::before {
  position: absolute;
  inset: 0;
  width: 128px;
  height: 128px;
  margin: auto;
  background-image: url("/assets/images/ahrix-popup-visual.png");
  background-repeat: no-repeat;
  background-size: 200% 200%;
  content: "";
}

.ahrix-product-card__image--1::before {
  background-position: 0 0;
}

.ahrix-product-card__image--2::before {
  background-position: 100% 0;
}

.ahrix-product-card__image--3::before {
  background-position: 0 100%;
}

.ahrix-product-card__image--4::before {
  background-position: 100% 100%;
}

.ahrix-product-card__info {
  display: grid;
  gap: 3px;
  padding: 8px 9px 9px;
}

.ahrix-product-card__info strong,
.ahrix-product-card__info b,
.ahrix-product-card__info p,
.ahrix-product-card__info em {
  color: #182230;
  font-family: "NanumSquareNeo", sans-serif;
  font-style: normal;
}

.ahrix-product-card__info strong {
  overflow: hidden;
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ahrix-product-card__info b {
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

.ahrix-product-card__info p {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ahrix-product-card__info em {
  margin-right: 3px;
  color: #126bff;
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 8px;
}

.ahrix-popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 52px 48px;
  background:
    radial-gradient(circle at 90% 5%, rgba(35, 126, 255, 0.22), transparent 38%),
    linear-gradient(145deg, #0b1c3a 0%, #07152d 70%);
}

.ahrix-popup__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 22px;
  border: 1px solid rgba(103, 221, 255, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ahrix-cyan);
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.ahrix-popup__content h2 {
  margin: 0;
  font-family: "NanumSquareNeoExtraBold", sans-serif;
  font-size: clamp(26px, 2.1vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.055em;
  color: #fff;
}

.ahrix-popup__content h2 > span {
  display: block;
  font: inherit;
  color: inherit;
  white-space: nowrap;
}

.ahrix-popup__content h2 strong {
  color: var(--ahrix-cyan);
  font: inherit;
}

.ahrix-popup__description {
  margin: 20px 0 0;
  color: rgba(231, 242, 255, 0.72);
  font-family: "NanumSquareNeo", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -0.025em;
}

.ahrix-popup__features {
  display: grid;
  gap: 9px;
  margin: 27px 0 0;
}

.ahrix-popup__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.88);
  font-family: "NanumSquareNeo", sans-serif;
  font-size: 13px;
}

.ahrix-popup__features li span {
  color: var(--ahrix-cyan);
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ahrix-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 10px;
  margin-top: 30px;
  border-radius: 12px;
  padding: 15px 20px;
  background: linear-gradient(110deg, #176cff, #00a9ff);
  box-shadow: 0 12px 30px rgba(18, 107, 255, 0.3);
  color: #fff;
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ahrix-popup__link:hover .ahrix-popup__cta {
  transform: translateX(3px);
  box-shadow: 0 16px 36px rgba(18, 107, 255, 0.42);
}

.ahrix-popup__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(4, 14, 34, 0.65);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.ahrix-popup__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 1px;
  background: #fff;
}

.ahrix-popup__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ahrix-popup__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ahrix-popup__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #050f23;
}

.ahrix-popup__controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-family: "NanumSquareNeo", sans-serif;
  font-size: 9px;
  cursor: pointer;
}

.ahrix-popup__controls label span {
  display: inline-block;
  line-height: 1;
  transform: scale(0.5);
  transform-origin: left center;
}

.ahrix-popup__today-checkbox {
  width: 9px;
  height: 9px;
  accent-color: var(--ahrix-blue);
}

.ahrix-popup__footer-close {
  border: 0;
  padding: 6px 0 6px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: "NanumSquareNeoBold", sans-serif;
  font-size: 9px;
  cursor: pointer;
}

body.ahrix-popup-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .ahrix-popup {
    align-items: flex-end;
    padding: 14px;
  }

  .ahrix-popup__dialog {
    width: 100%;
    max-height: calc(100vh - 28px);
    border-radius: 22px;
  }

  .ahrix-popup__link {
    display: block;
    min-height: 0;
  }

  .ahrix-popup__visual {
    height: 390px;
    border-radius: 21px 21px 0 0;
  }

  .ahrix-search-demo {
    gap: 8px;
    padding: 12px;
  }

  .ahrix-search-demo__query {
    flex-basis: 32px;
    border-radius: 8px;
    padding: 0 10px;
  }

  .ahrix-search-demo__query span {
    font-size: 10px;
  }

  .ahrix-search-demo__grid {
    gap: 7px;
  }

  .ahrix-product-card__image {
    height: 100px;
  }

  .ahrix-product-card__image::before {
    width: 100px;
    height: 100px;
  }

  .ahrix-product-card__info {
    gap: 2px;
    padding: 6px 7px 7px;
  }

  .ahrix-product-card__info strong {
    font-size: 10px;
  }

  .ahrix-product-card__info b {
    font-size: 10px;
  }

  .ahrix-product-card__info p,
  .ahrix-product-card__info em {
    font-size: 7px;
  }

  .ahrix-popup__content {
    padding: 27px 22px 24px;
  }

  .ahrix-popup__eyebrow {
    margin-bottom: 14px;
    padding: 6px 10px;
    font-size: 9px;
  }

  .ahrix-popup__content h2 {
    font-size: clamp(19px, 4.6vw, 22px);
    letter-spacing: -0.065em;
  }

  .ahrix-popup__description {
    margin-top: 13px;
    font-size: 13px;
  }

  .ahrix-popup__desktop-break {
    display: none;
  }

  .ahrix-popup__features {
    gap: 7px;
    margin-top: 18px;
  }

  .ahrix-popup__features li {
    padding: 10px 12px;
    font-size: 12px;
  }

  .ahrix-popup__cta {
    width: 100%;
    margin-top: 20px;
    padding: 14px 18px;
  }

  .ahrix-popup__close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .ahrix-popup__controls {
    min-height: 34px;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ahrix-popup,
  .ahrix-popup__dialog,
  .ahrix-popup__visual img,
  .ahrix-popup__cta {
    transition: none;
  }
}
