/* ===== METFI Welcome Popup — variant B Editorial Split ===== */

.metfi-wp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.metfi-wp-overlay.visible {
  display: flex;
}
/* Hide the placeholder when the JS-controlled state classes are not yet applied */
.metfi-wp-overlay[hidden] {
  display: none !important;
}

.metfi-wp {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
  min-height: 380px;
}
.metfi-wp .img-side {
  background-image: url('/img/cms/promo-1.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.metfi-wp .img-side::before {
  content:'';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.6));
}
.metfi-wp .img-side .stamp {
  position: absolute;
  bottom: 14px;
  left: 14px;
  color: #fff;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
}

.metfi-wp .form-side {
  padding: 30px 30px 26px;
}
.metfi-wp .close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.metfi-wp .eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  color: #B80C09;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 10px;
}
.metfi-wp h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.metfi-wp h2 .pct {
  color: #B80C09;
  font-weight: 900;
}
.metfi-wp p.body {
  font-size: 13px;
  color: #555;
  line-height: 1.55;
  margin: 8px 0 18px;
}
.metfi-wp input[type=email] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 10px;
  box-sizing: border-box;
  color: #222;
  transition: border-color .15s;
}
.metfi-wp input[type=email]:focus {
  outline: none;
  border-color: #B80C09;
}
/* Honeypot — visually hidden but submittable by bots */
.metfi-wp input[name=website] {
  position: absolute;
  left: -9999px;
}

.metfi-wp button.cta {
  width: 100%;
  background: #1a1a1a;
  border: none;
  color: #fff;
  padding: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s;
}
.metfi-wp button.cta:hover:not(:disabled) {
  background: #B80C09;
}
.metfi-wp button.cta:disabled {
  opacity: .6;
  cursor: wait;
}
.metfi-wp .legal {
  font-size: 9.5px;
  color: #888;
  margin-top: 12px;
  line-height: 1.5;
}
.metfi-wp .legal a {
  color: #B80C09;
  text-decoration: none;
}

/* State alternates */
.metfi-wp .state-success-content,
.metfi-wp .state-error-content {
  padding: 32px 28px;
  text-align: center;
  display: none;
}
.metfi-wp .state-success-content h3 {
  font-size: 22px;
  color: #2ecc71;
  margin: 0 0 10px;
}
.metfi-wp .state-error-content h3 {
  font-size: 22px;
  color: #B80C09;
  margin: 0 0 10px;
}
.metfi-wp .state-success-content p,
.metfi-wp .state-error-content p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}
.metfi-wp .state-success-content .close-btn,
.metfi-wp .state-error-content .close-btn {
  margin-top: 14px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 10px 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 4px;
}

/* When state class set, swap visible block */
.metfi-wp.state-success .state-form-content { display: none; }
.metfi-wp.state-success .state-success-content { display: block; }
.metfi-wp.state-error .state-form-content { display: none; }
.metfi-wp.state-error .state-error-content { display: block; }

/* Responsive — mobile: image becomes a banner above the form */
@media (max-width: 768px) {
  .metfi-wp {
    grid-template-columns: 1fr;
    max-width: 420px;
    min-height: auto;
  }
  .metfi-wp .img-side {
    height: 110px;
  }
  .metfi-wp .form-side {
    padding: 18px 18px 16px;
  }
  .metfi-wp h2 {
    font-size: 20px;
  }
  .metfi-wp p.body {
    font-size: 12px;
    margin: 6px 0 12px;
  }
}
