.arzbf-popup {
  --arzbf-navy: #001042;
  --arzbf-blue: #1c40f2;
  --arzbf-cyan: #0082f8;
  position: fixed;
  right: 24px;
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 99998;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 32px));
  padding: 25px;
  overflow: hidden;
  border: 1px solid #d7e5ff;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 55px rgb(0 16 66 / 20%);
  color: var(--arzbf-navy);
  font-family: Urbanist, Arial, sans-serif;
  text-align: left;
  opacity: 0;
  transform: translateY(calc(100% + 50px));
  transition: transform 450ms ease, opacity 450ms ease;
}

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

.arzbf-popup--visible {
  opacity: 1;
  transform: translateY(0);
}

.arzbf-popup::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--arzbf-cyan), var(--arzbf-blue));
  content: '';
}

.arzbf-popup__close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f6f9ff;
  color: var(--arzbf-navy);
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.arzbf-popup__close:hover,
.arzbf-popup__close:focus-visible {
  background: #d7e5ff;
}

.arzbf-popup__badge {
  display: inline-block;
  margin-bottom: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #eaf3ff;
  color: var(--arzbf-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.arzbf-popup__title {
  max-width: 290px;
  margin: 0 0 5px;
  color: var(--arzbf-navy);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.18;
}

.arzbf-popup__offer {
  margin: 0 0 18px;
  color: var(--arzbf-blue);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.arzbf-popup__timer-label {
  margin: 0 0 7px;
  color: var(--arzbf-navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.arzbf-popup__timer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 11px 15px 9px;
  border-radius: 10px;
  background: #f6f9ff;
  font-variant-numeric: tabular-nums;
}

.arzbf-popup__time-unit {
  display: flex;
  min-width: 52px;
  flex-direction: column;
  align-items: center;
}

.arzbf-popup__time-value,
.arzbf-popup__time-separator {
  color: var(--arzbf-navy);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.arzbf-popup__time-caption {
  margin-top: 5px;
  color: #57678e;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.arzbf-popup__button {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--arzbf-cyan), var(--arzbf-blue));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: filter 150ms ease;
}

.arzbf-popup__button:hover,
.arzbf-popup__button:focus-visible {
  color: #fff;
  filter: brightness(1.08);
  text-decoration: none;
}

.arzbf-popup__button-arrow {
  font-size: 19px;
  line-height: 1;
}

.arzbf-popup__close:focus-visible,
.arzbf-popup__button:focus-visible {
  outline: 3px solid var(--arzbf-cyan);
  outline-offset: 3px;
}

/* Keep the card readable on phones and small tablets, including narrow screens. */
@media (max-width: 767px), (max-device-width: 767px) {
  .arzbf-popup {
    right: auto;
    top: 50%;
    bottom: auto;
    left: 50%;
    width: min(380px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
    padding: clamp(18px, 5vw, 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translate(-50%, calc(-50% + 24px));
  }

  .arzbf-popup--visible {
    transform: translate(-50%, -50%);
  }

  .arzbf-popup__close {
    top: 12px;
    right: 12px;
    z-index: 1;
    width: 36px;
    height: 36px;
    background: var(--arzbf-navy);
    color: #fff;
  }

  .arzbf-popup__title {
    max-width: calc(100% - 30px);
    margin-bottom: 6px;
    font-size: clamp(19px, 5.4vw, 23px);
  }

  .arzbf-popup__offer {
    margin-bottom: 16px;
    font-size: clamp(23px, 6.4vw, 27px);
  }

  .arzbf-popup__badge {
    margin-bottom: 10px;
    padding: 6px 9px;
  }

  .arzbf-popup__timer {
    margin-bottom: 16px;
    padding: 10px 12px 8px;
    gap: 4px;
  }

  .arzbf-popup__time-unit {
    min-width: 0;
    flex: 1 1 0;
  }

  .arzbf-popup__time-value,
  .arzbf-popup__time-separator {
    font-size: clamp(22px, 6.5vw, 27px);
  }

  .arzbf-popup__button {
    min-height: 48px;
  }
}

@media (max-width: 360px), (max-device-width: 360px) {
  .arzbf-popup {
    padding: 18px;
  }

  .arzbf-popup__timer {
    padding-right: 8px;
    padding-left: 8px;
  }

  .arzbf-popup__time-value,
  .arzbf-popup__time-separator {
    font-size: 21px;
  }

  .arzbf-popup__time-caption {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arzbf-popup,
  .arzbf-popup__button {
    transition: none;
  }
}
