/* Newsletter popup (Views/Partials/SubscribePopup.cshtml) - new site design, .cp-sub* scoped.
   Bootstrap modal for open/close/backdrop; everything visual is here. */

.cp-sub .modal-dialog {
  max-width: min(480px, calc(100vw - 24px));
}

.cp-sub__card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #3c4e5a;
  font-family: Lato, "Segoe UI", sans-serif;
  box-shadow: 0 24px 60px rgba(16, 44, 46, 0.25), inset 0 3px 0 #02aaa9;
}

.cp-sub__x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #3c4e5a;
  font: 400 24px/1 Lato, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 44, 46, 0.18);
}

.cp-sub__x:hover {
  background: #fff;
}

/* ---- Header: the CMS background image with the prize text over it ---- */
.cp-sub__hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 200px;
  background: linear-gradient(160deg, #218887, #02aaa9);
}

.cp-sub__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-sub__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 44, 46, 0.78) 0%, rgba(16, 44, 46, 0.2) 55%, transparent 100%);
}

.cp-sub__hero--plain {
  min-height: 140px;
}

.cp-sub__hero--plain::after {
  display: none;
}

.cp-sub__hero-text {
  position: relative;
  z-index: 1;
  padding: 20px 24px;
  color: #fff;
}

.cp-sub__heading {
  margin: 0;
  font-family: Montserrat, Lato, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.cp-sub__subheading {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #febb02;
  color: #3c4e5a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---- Body ---- */
.cp-sub__body {
  padding: 22px 24px 18px;
}

.cp-sub__body[hidden] {
  display: none;
}

.cp-sub__title {
  margin: 0 0 6px;
  font-family: Montserrat, Lato, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #3c4e5a;
}

.cp-sub__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #5d6b74;
}

.cp-sub__form {
  display: flex;
  gap: 8px;
}

.cp-sub__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.cp-sub__field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #218887;
  transform: translateY(-50%);
  pointer-events: none;
}

.cp-sub__field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px 0 42px;
  border: 1px solid #d8e0e0;
  border-radius: 12px;
  background: #fff;
  color: #3c4e5a;
  font: 400 15px/1.2 Lato, "Segoe UI", sans-serif;
}

.cp-sub__field input:focus {
  outline: none;
  border-color: #02aaa9;
  box-shadow: 0 0 0 3px rgba(2, 170, 169, 0.18);
}

.cp-sub__field input.is-invalid {
  border-color: #d93a3a;
}

.cp-sub__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cp-sub__btn {
  flex-shrink: 0;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #febb02;
  color: #3c4e5a;
  font: 800 15px/1 Lato, "Segoe UI", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.cp-sub__btn:hover:not(:disabled) {
  background: #f0b000;
}

.cp-sub__btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.cp-sub__error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #d93a3a;
}

.cp-sub__error[hidden] {
  display: none;
}

.cp-sub__legal {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #707070;
}

.cp-sub__legal a {
  color: #218887;
}

.cp-sub__never {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #5d6b74;
  cursor: pointer;
}

.cp-sub__never input {
  width: 16px;
  height: 16px;
  accent-color: #02aaa9;
}

/* ---- Thank you ---- */
.cp-sub__thanks {
  text-align: center;
}

.cp-sub__tick {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #dff6e1;
  color: #008009;
}

.cp-sub__tick svg {
  width: 26px;
  height: 26px;
}

.cp-sub__thanks .cp-sub__btn {
  min-width: 140px;
}

/* ---- Footer image (e.g. 100% Financial Protection) ---- */
.cp-sub__foot {
  padding: 12px 24px 16px;
  border-top: 1px solid #e6eded;
  text-align: center;
}

.cp-sub__foot img {
  display: inline-block;
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
}

@media (max-width: 520px) {
  .cp-sub__hero {
    min-height: 160px;
  }

  .cp-sub__heading {
    font-size: 19px;
  }

  .cp-sub__body {
    padding: 18px 18px 16px;
  }

  .cp-sub__title {
    font-size: 20px;
  }

  .cp-sub__form {
    flex-direction: column;
  }

  .cp-sub__btn {
    width: 100%;
  }
}
