:root {
  --bows-perk-desktop-height: 140px;
  --bows-perk-tablet-height: 120px;
  --bows-perk-mobile-height: 100px;
  --bows-perk-brown: #A35B41;
  --bows-perk-dark: #333333;
  --bows-perk-orange: #F05323;
}

.bows-perk-system,
.bows-perk-system * {
  box-sizing: border-box;
}

/* The plugin marks the closest Elementor container as the sticky host. */
.bows-perk-host {
  position: sticky !important;
  position: -webkit-sticky !important;
  top: 0 !important;
  z-index: 99990 !important;
  overflow: visible !important;
  align-self: flex-start;
}

body.admin-bar .bows-perk-host {
  top: 32px !important;
}

/* Fallback when the shortcode is not inside an Elementor section/container. */
.bows-perk-host-self {
  position: sticky !important;
  position: -webkit-sticky !important;
  top: 0 !important;
  z-index: 99990 !important;
}

body.admin-bar .bows-perk-host-self {
  top: 32px !important;
}

/* Keep Elementor editing usable. Live frontend remains sticky. */
body.elementor-editor-active .bows-perk-host,
body.elementor-editor-active .bows-perk-host-self {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
}

.bows-perk-banner {
  position: relative;
  width: 100%;
  height: var(--bows-perk-desktop-height);
  padding: 0;
  margin: 0;
  overflow: hidden;
  z-index: 1;
}

.bows-perk-banner-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #F8EEE6;
}

.bows-perk-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  pointer-events: none;
}

.bows-perk-default {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

/* The default banner ignores clicks except on an explicitly linked logo. */
.bows-perk-default .bows-perk-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  max-width: 100%;
}

.bows-perk-default .bows-perk-logo-link img {
  max-width: 100%;
}

.bows-perk-default.is-hidden {
  display: none !important;
}

.bows-perk-default img {
  display: block;
  width: 150px;
  max-width: 40%;
  height: auto;
}

.bows-perk-countdown-state {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 30px;
  text-align: center;
  pointer-events: none;
}

.bows-perk-countdown-state[hidden] {
  display: none !important;
}

.bows-perk-headline {
  margin: 0 !important;
  color: #A35B41;
  font-family: "EB Garamond", serif !important;
  font-size: 44px;
  font-style: normal;
  font-weight: 600;
  line-height: 52px;
  text-align: center;
}

.bows-perk-countdown-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.bows-perk-countdown-prefix {
  color: #333;
  font-family: "EB Garamond", serif !important;
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
}

.bows-perk-countdown {
  color: #A35B41;
  font-family: "EB Garamond", serif !important;
  font-size: 44px;
  font-style: normal;
  font-weight: 400;
  line-height: 44px;
  font-variant-numeric: tabular-nums;
}

/* Popup */
.bows-perk-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}

.bows-perk-modal[hidden] {
  display: none !important;
}

.bows-perk-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bows-perk-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
}

.bows-perk-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100vw - 80px));
  aspect-ratio: 1240 / 620;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 80px 110px 60px;
  margin: 0;
  overflow: hidden;
  background-color: #FFF9F4;
  background-image: var(--bows-popup-bg, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  border: 0;
  box-shadow: 0 20px 70px rgba(0,0,0,.30);
  text-align: center;
}

.bows-perk-modal-title,
.bows-perk-modal-message,
.bows-perk-modal-button {
  margin: 0 !important;
}

.bows-perk-modal-title {
  margin-top: 48px !important;
  color: #333 !important;
  text-align: center;
  font-family: "EB Garamond", serif !important;
  font-size: 56px !important;
  font-style: normal;
  font-weight: 600 !important;
  line-height: 64px !important;
  text-transform: uppercase;
}

.bows-perk-modal-message {
  width: 100%;
  max-width: 950px;
  color: #A35B41 !important;
  text-align: center;
  font-family: "EB Garamond", serif !important;
  font-size: 30px !important;
  font-style: normal;
  font-weight: 500 !important;
  line-height: 38px !important;
  text-transform: uppercase;
}

.bows-perk-modal-time {
  color: #333 !important;
  font-family: "EB Garamond", serif !important;
  font-size: 30px !important;
  font-style: normal;
  font-weight: 500 !important;
  line-height: 38px !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.bows-perk-modal-close,
.bows-perk-modal-close:hover,
.bows-perk-modal-close:focus,
.bows-perk-modal-close:active {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 10;
  width: 42px !important;
  height: 42px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transform: none !important;
}

.bows-perk-modal-close img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain;
  background: transparent !important;
  pointer-events: none;
}

.bows-perk-modal-button,
.bows-perk-modal-button:hover,
.bows-perk-modal-button:focus,
.bows-perk-modal-button:active {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  width: auto !important;
  min-width: 0 !important;
  padding: 15px 27px !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 6.111px !important;
  background: #F05323 !important;
  background-color: #F05323 !important;
  color: #FFF !important;
  font-family: "EB Garamond", serif !important;
  font-size: 24px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 29.964px !important;
  letter-spacing: 2.4px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.bows-perk-modal-button:hover {
  opacity: .9;
  transform: translateY(-1px);
}

body.elementor-editor-active .bows-perk-modal {
  display: none !important;
}

@media (max-width: 1024px) {
  .bows-perk-banner {
    height: var(--bows-perk-tablet-height);
  }

  .bows-perk-default img {
    width: 130px;
  }

  .bows-perk-headline {
    font-size: 36px;
    line-height: 42px;
  }

  .bows-perk-countdown-prefix {
    font-size: 26px;
    line-height: 34px;
  }

  .bows-perk-countdown {
    font-size: 38px;
    line-height: 40px;
  }

  .bows-perk-modal {
    padding: 30px;
  }

  .bows-perk-modal-dialog {
    width: calc(100vw - 60px);
    gap: 32px;
    padding: 60px 70px 45px;
  }

  .bows-perk-modal-title {
    margin-top: 48px !important;
    font-size: 42px !important;
    line-height: 48px !important;
  }

  .bows-perk-modal-message,
  .bows-perk-modal-time {
    font-size: 24px !important;
    line-height: 31px !important;
  }

  .bows-perk-modal-button {
    padding: 13px 24px !important;
    font-size: 20px !important;
    line-height: 26px !important;
    letter-spacing: 2px !important;
  }

  .bows-perk-modal-close {
    top: 20px;
    right: 20px;
    width: 34px !important;
    height: 34px !important;
  }
}

@media (max-width: 782px) {
  body.admin-bar .bows-perk-host,
  body.admin-bar .bows-perk-host-self {
    top: 46px !important;
  }
}

@media (max-width: 767px) {
  .bows-perk-banner {
    height: var(--bows-perk-mobile-height);
  }

  .bows-perk-default img {
    width: 110px;
    max-width: 45%;
  }

  .bows-perk-countdown-state {
    padding: 8px 16px;
  }

  .bows-perk-headline {
    font-size: 24px;
    line-height: 28px;
  }

  .bows-perk-countdown-row {
    gap: 4px;
  }

  .bows-perk-countdown-prefix {
    font-size: 17px;
    line-height: 22px;
  }

  .bows-perk-countdown {
    font-size: 26px;
    line-height: 30px;
  }

  .bows-perk-modal {
    padding: 15px;
  }

  .bows-perk-modal-dialog {
    width: 100%;
    aspect-ratio: auto;
    min-height: 500px;
    gap: 28px;
    padding: 70px 34px 45px;
    background-size: 100% 100%;
  }

  .bows-perk-modal-close {
    top: 15px;
    right: 15px;
    width: 30px !important;
    height: 30px !important;
  }

  .bows-perk-modal-title {
    margin-top: 48px !important;
    font-size: 32px !important;
    line-height: 38px !important;
  }

  .bows-perk-modal-message,
  .bows-perk-modal-time {
    font-size: 18px !important;
    line-height: 25px !important;
  }

  .bows-perk-modal-button {
    padding: 12px 22px !important;
    font-size: 17px !important;
    line-height: 22px !important;
    letter-spacing: 1.7px !important;
  }
}

@media (max-width: 479px) {
  .bows-perk-modal-dialog {
    min-height: 480px;
    gap: 24px;
    padding: 60px 26px 38px;
  }

  .bows-perk-modal-title {
    margin-top: 48px !important;
    font-size: 28px !important;
    line-height: 34px !important;
  }

  .bows-perk-modal-message,
  .bows-perk-modal-time {
    font-size: 16px !important;
    line-height: 22px !important;
  }
}
