/* FYOOL email-capture coupon popup — full-background image with overlaid copy */

.fy-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 15, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fy-popup-overlay.open {
  opacity: 1;
  visibility: visible;
}

.fy-popup {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  max-height: 92vh;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  background: #dbe6ef center / cover no-repeat;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}

.fy-popup-overlay.open .fy-popup {
  transform: translateY(0) scale(1);
}

/* Light scrim so the copy stays readable over the photo (fades out to the
   right where the product sits). */
.fy-popup-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    104deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.94) 40%,
    rgba(255, 255, 255, 0.6) 60%,
    rgba(255, 255, 255, 0) 82%
  );
}

.fy-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text, #0d0f14);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

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

.fy-popup-body {
  position: relative;
  z-index: 1;
  width: 100%;
  /* Leave the right ~30% clear so part of the background photo shows, while
     the copy column stays wide enough to keep the two buttons on one row. */
  max-width: 70%;
  padding: 44px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fy-popup-eyebrow {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green, #32cd32);
  margin-bottom: 14px;
}

.fy-popup-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 42px;
  line-height: 1.0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--text, #0d0f14);
  margin: 0 0 16px;
}

.fy-popup-heading span,
.fy-popup-heading strong,
.fy-popup-heading em {
  color: var(--green, #32cd32);
  font-style: normal;
  font-weight: inherit;
}

.fy-popup-sub {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  color: #3a4756;
  margin: 0 0 22px;
}

.fy-popup-sub p {
  margin: 0 0 10px;
}

.fy-popup-sub p:last-child {
  margin-bottom: 0;
}

/* The Fluent Form sits in .fy-popup-form. */
.fy-popup-form {
  margin-top: 4px;
}

.fy-popup-form .fluentform {
  margin: 0;
}

.fy-popup-form .fluentform .ff-el-group {
  margin: 0 0 12px;
}

.fy-popup-form .fluentform .ff-el-input--label label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0d0f14);
  margin-bottom: 5px;
}

.fy-popup-form .fluentform .ff-el-form-control {
  width: 100%;
  height: auto;
  padding: 15px 18px;
  border: none !important;
  border-radius: 14px !important;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  background: #fff;
  color: var(--text, #0d0f14);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.fy-popup-form .fluentform .ff-el-form-control:focus {
  border: none !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(50, 205, 50, 0.45) !important;
}

/* Submit + dismiss share one row (the dismiss button is moved into the submit
   wrapper by popup.js). */
.fy-popup-form .fluentform .ff_submit_btn_wrapper {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.fy-popup-form .fluentform .ff-btn-submit,
.fy-popup-form .fluentform .wpf_has_custom_css.ff-btn-submit {
  min-width: 0 !important;
  width: auto;
  margin: 0;
  padding: 13px 18px !important;
  background: var(--green, #32cd32) !important;
  border: none !important;
  border-radius: 10px !important;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.2s;
}

.fy-popup-form .fluentform .ff-btn-submit:hover,
.fy-popup-form .fluentform .wpf_has_custom_css.ff-btn-submit:hover {
  background: var(--green, #32cd32) !important;
  color: #fff !important;
  opacity: 0.9;
}

/* Dismiss = ghost / outline button beside the submit. */
.fy-popup-dismiss {
  background: transparent;
  border: 1.5px solid rgba(13, 15, 20, 0.22);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text, #0d0f14);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 13px 18px;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.fy-popup-dismiss:hover {
  border-color: rgba(13, 15, 20, 0.4);
  background: rgba(13, 15, 20, 0.04);
}

/* Success / coupon reveal */
.fy-popup-state--success {
  text-align: center;
}

.fy-popup-success-icon {
  font-size: 42px;
  margin-bottom: 6px;
}

.fy-popup-coupon {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

.fy-popup-code {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border: 2px dashed var(--green, #32cd32);
  border-radius: 10px;
  background: var(--green-soft, #f0fdf4);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--green, #32cd32);
}

.fy-popup-copy {
  border: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--green, #32cd32);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.fy-popup-copy:hover {
  opacity: 0.9;
}

.fy-popup-copy.copied {
  background: var(--blue, #1e90ff);
}

/* Mobile: content spans the full popup over a lighter, top-weighted scrim. */
@media (max-width: 640px) {
  .fy-popup {
    max-width: 420px;
    aspect-ratio: auto;
    /* Content-fit height so there is no empty image area below the copy. */
    min-height: 0;
  }

  .fy-popup-scrim {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.9) 55%,
      rgba(255, 255, 255, 0.82) 100%
    );
  }

  .fy-popup-body {
    max-width: 100%;
    padding: 34px 24px 30px;
    justify-content: center;
  }

  .fy-popup-heading {
    font-size: 34px;
  }

  .fy-popup-form .fluentform .ff-btn-submit,
  .fy-popup-dismiss {
    flex: 0 0 auto;
  }

  .fy-popup-coupon {
    flex-direction: column;
  }
}
