.tipitaly-service-popup,
.tipitaly-service-popup * {
  box-sizing: border-box;
}

.tipitaly-service-popup[hidden] {
  display: none !important;
}

.tipitaly-service-popup .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.tipitaly-popup-is-open {
  overflow: hidden;
}

.tipitaly-service-popup {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  color: #173226;
}

.tipitaly-service-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 25, 18, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.tipitaly-service-popup__dialog {
  position: relative;
  display: grid;
  width: min(920px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #f9f7f0;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .36);
  animation: tipitaly-popup-enter .38s cubic-bezier(.2, .8, .2, 1) both;
}

.tipitaly-service-popup--with-image .tipitaly-service-popup__dialog {
  grid-template-columns: minmax(290px, 42%) minmax(0, 1fr);
}

.tipitaly-service-popup__media {
  min-height: 480px;
  overflow: hidden;
  background: #123124;
  border-radius: 25px 0 0 25px;
}

.tipitaly-service-popup__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.tipitaly-service-popup__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(36px, 5vw, 64px);
}

.tipitaly-service-popup__eyebrow {
  margin: 0 0 14px;
  color: #9b7436;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tipitaly-service-popup__title {
  margin: 0;
  color: #123124;
  font-family: Philosopher, Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.03;
}

.tipitaly-service-popup__content {
  margin-top: 22px;
  color: #405148;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.65;
}

.tipitaly-service-popup__content > :first-child {
  margin-top: 0;
}

.tipitaly-service-popup__content > :last-child {
  margin-bottom: 0;
}

.tipitaly-service-popup__content a {
  color: #123124;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tipitaly-service-popup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 30px;
}

.tipitaly-service-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 26px;
  color: #fff;
  background: #123124;
  border: 1px solid #123124;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease;
}

.tipitaly-service-popup__button:hover,
.tipitaly-service-popup__button:focus-visible {
  color: #fff;
  background: #234c39;
  transform: translateY(-2px);
}

.tipitaly-service-popup__dismiss {
  padding: 8px 0;
  color: #53645b;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tipitaly-service-popup__close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #123124;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(18, 49, 36, .12);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(18, 49, 36, .12);
  cursor: pointer;
}

.tipitaly-service-popup__close span::before,
.tipitaly-service-popup__close span::after {
  position: absolute;
  top: 21px;
  left: 13px;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  content: "";
}

.tipitaly-service-popup__close span::before {
  transform: rotate(45deg);
}

.tipitaly-service-popup__close span::after {
  transform: rotate(-45deg);
}

.tipitaly-service-popup__close:focus-visible,
.tipitaly-service-popup__dismiss:focus-visible,
.tipitaly-service-popup__button:focus-visible {
  outline: 3px solid #d6b46f;
  outline-offset: 3px;
}

@keyframes tipitaly-popup-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 720px) {
  .tipitaly-service-popup {
    align-items: end;
    padding: 12px;
  }

  .tipitaly-service-popup__dialog,
  .tipitaly-service-popup--with-image .tipitaly-service-popup__dialog {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 22px;
  }

  .tipitaly-service-popup__media {
    min-height: 0;
    height: clamp(180px, 32vh, 270px);
    border-radius: 21px 21px 0 0;
  }

  .tipitaly-service-popup__image {
    min-height: 0;
  }

  .tipitaly-service-popup__panel {
    padding: 30px 24px 28px;
  }

  .tipitaly-service-popup__title {
    padding-right: 28px;
    font-size: clamp(30px, 9vw, 42px);
  }

  .tipitaly-service-popup__content {
    margin-top: 16px;
  }

  .tipitaly-service-popup__actions {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tipitaly-service-popup__dialog {
    animation: none;
  }

  .tipitaly-service-popup__button {
    transition: none;
  }
}
