:root {
  --ae-wfp-highli: #f3f3f5;
  --ae-wfp-text: #3e3e3e;
  --ae-wfp-muted: #616162;
  --ae-wfp-accent: #cbb162;
  --ae-wfp-accent-dark: #b89e4f;
  --ae-wfp-white: #ffffff;
}

.ae-wfp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 28, 24, 0.55);
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* The [hidden] attribute must beat the display:flex above, otherwise the
   invisible overlay covers the page and blocks all clicks (menu included). */
.ae-wfp-overlay[hidden] {
  display: none !important;
}

/* While fading out (visible class removed, hidden not yet set) let clicks through. */
.ae-wfp-overlay:not(.ae-wfp-visible) {
  pointer-events: none;
}

/* Only the card picked for the current hour is unhidden by the JS. */
.ae-wfp-card[hidden] {
  display: none !important;
}

.ae-wfp-overlay.ae-wfp-visible {
  opacity: 1;
}

.ae-wfp-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--ae-wfp-white);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
}

.ae-wfp-overlay.ae-wfp-visible .ae-wfp-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ae-wfp-card::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--ae-wfp-accent), transparent);
  z-index: 1;
}

.ae-wfp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ae-wfp-muted);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.ae-wfp-close:hover {
  background: var(--ae-wfp-text);
  color: var(--ae-wfp-white);
}

.ae-wfp-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ae-wfp-highli);
  border-radius: 20px 20px 0 0;
  padding: 26px 26px 20px;
  min-height: 120px;
}

.ae-wfp-media img {
  max-width: 100%;
  max-height: 190px;
  height: auto;
  object-fit: contain;
  display: block;
}

.ae-wfp-media.ae-wfp-no-image {
  display: none;
}

.ae-wfp-body {
  padding: 24px 28px 26px;
  text-align: center;
}

.ae-wfp-headline {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ae-wfp-muted);
}

.ae-wfp-headline-accent {
  display: block;
  font-size: 21px;
  font-weight: 600;
  color: var(--ae-wfp-text);
  margin-bottom: 4px;
}

.ae-wfp-headline-sub {
  display: block;
}

.ae-wfp-title {
  display: block;
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ae-wfp-text) !important;
  text-decoration: none !important;
}

.ae-wfp-title:hover {
  color: var(--ae-wfp-accent-dark) !important;
}

.ae-wfp-price {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ae-wfp-accent-dark);
}

.ae-wfp-bullets {
  list-style: none;
  margin: 0 auto 20px;
  padding: 14px 0;
  border-top: 1px solid #ececee;
  border-bottom: 1px solid #ececee;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.ae-wfp-bullets li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  font-size: 14.5px;
  color: var(--ae-wfp-muted);
}

.ae-wfp-bullets svg {
  flex: 0 0 auto;
  color: var(--ae-wfp-accent);
}

.ae-wfp-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 24px;
  border-radius: 4px;
  border: 1px solid var(--ae-wfp-accent);
  background: var(--ae-wfp-accent);
  color: var(--ae-wfp-white) !important;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.2s ease;
}

.ae-wfp-btn:hover {
  background: var(--ae-wfp-accent-dark);
  border-color: var(--ae-wfp-accent-dark);
  color: var(--ae-wfp-white) !important;
}

.ae-wfp-card--message .ae-wfp-body {
  padding-top: 52px;
}

.ae-wfp-message {
  margin: 0 0 22px;
}

.ae-wfp-message p {
  margin: 0 0 12px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ae-wfp-muted);
}

.ae-wfp-message p:first-child {
  font-size: 17px;
  font-weight: 600;
  color: var(--ae-wfp-text);
}

.ae-wfp-message p:last-child {
  margin-bottom: 0;
}

button.ae-wfp-btn {
  font-family: inherit;
  cursor: pointer;
}

.ae-wfp-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ae-wfp-muted);
}

body.ae-wfp-lock {
  overflow: hidden;
}

@media (max-width: 480px) {
  .ae-wfp-overlay {
    padding: 14px;
  }

  .ae-wfp-card {
    max-width: 400px;
    border-radius: 16px;
  }

  .ae-wfp-media {
    border-radius: 16px 16px 0 0;
    padding: 20px 20px 14px;
  }

  .ae-wfp-media img {
    max-height: 150px;
  }

  .ae-wfp-body {
    padding: 20px 20px 22px;
  }

  .ae-wfp-title {
    font-size: 19px;
  }

  .ae-wfp-price {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ae-wfp-overlay,
  .ae-wfp-card {
    transition: none;
  }
}
