/* Dynamic Popup for Thapanee
   Controlled from /popup-admin/
*/
.tt-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 18, 13, 0.58);
  backdrop-filter: blur(4px);
}

.tt-popup-overlay.is-active {
  display: flex;
}

.tt-popup-card {
  width: min(92vw, 720px);
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background-color: #fff7ef;
  background-size: cover;
  background-position: center;
  box-shadow: 0 28px 80px rgba(35, 22, 14, 0.34);
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}

.tt-popup-overlay.is-active .tt-popup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tt-popup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,247,239,.96) 0%, rgba(255,247,239,.86) 48%, rgba(255,247,239,.34) 100%);
}

.tt-popup-content {
  position: relative;
  z-index: 1;
  max-width: 470px;
  padding: 54px 46px;
  color: var(--tt-popup-text-color, #4b3427);
}

.tt-popup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(199, 138, 107, .16);
  color: #a86f54;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tt-popup-title {
  margin: 0 0 14px;
  color: inherit;
  font-family: "Marcellus", serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 400;
}

.tt-popup-subtitle {
  margin: 0 0 14px;
  color: inherit;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.35;
  font-weight: 700;
}

.tt-popup-body {
  margin: 0 0 24px;
  color: inherit;
  font-size: 16px;
  line-height: 1.65;
}

.tt-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 25px;
  border-radius: 999px;
  background: #c98a6b;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(201, 138, 107, .32);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.tt-popup-button:hover {
  background: #a86f54;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(168, 111, 84, .36);
}

.tt-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: #6b4b3b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(35, 22, 14, .16);
}

.tt-popup-close:hover {
  background: #fff;
}

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

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

  .tt-popup-card {
    width: 100%;
    min-height: 0;
    border-radius: 22px;
    background-position: center top;
  }

  .tt-popup-card::before {
    background: linear-gradient(180deg, rgba(255,247,239,.96) 0%, rgba(255,247,239,.9) 65%, rgba(255,247,239,.78) 100%);
  }

  .tt-popup-content {
    max-width: none;
    padding: 44px 24px 30px;
    text-align: center;
  }

  .tt-popup-button {
    width: 100%;
  }
}
