/* "Stay In The Loop" newsletter card (built by js/newsletter.js) */

.uls-loop {
  --loop-navy: #032f64;
  --loop-blue: #0064c0;
  --loop-yellow: #f9d04b;
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9990;
  display: flex;
  width: 540px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  background: #fff;
  border-top: 4px solid var(--loop-yellow);
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(1, 30, 58, 0.28);
  font-family: "Poppins", Arial, sans-serif;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.uls-loop.is-open {
  opacity: 1;
  transform: none;
}

.uls-loop[hidden] {
  display: none;
}

.uls-loop__media {
  flex: 0 0 160px;
  background: #6b6b6b;
}

.uls-loop__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uls-loop__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 22px 22px 18px;
}

.uls-loop__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.uls-loop__close:hover,
.uls-loop__close:focus-visible {
  color: var(--loop-navy);
  background: #eef2f7;
}

.uls-loop__title {
  margin: 0 32px 6px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--loop-navy);
}

.uls-loop__text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
}

.uls-loop__form {
  display: flex;
  gap: 8px;
}

.uls-loop__form[hidden] {
  display: none;
}

.uls-loop__trap,
.uls-loop__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.uls-loop__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: #111;
  background: #fff;
  border: 1px solid #c9d1db;
  border-radius: 4px;
}

.uls-loop__input:focus {
  outline: none;
  border-color: var(--loop-blue);
  box-shadow: 0 0 0 3px rgba(0, 100, 192, 0.18);
}

.uls-loop__submit {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--loop-blue);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.uls-loop__submit:hover,
.uls-loop__submit:focus-visible {
  background: var(--loop-navy);
}

.uls-loop__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.uls-loop__status {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.uls-loop__status:not(:empty) {
  margin-top: 8px;
}

.uls-loop__status.is-error {
  color: #b42318;
}

.uls-loop__status.is-success {
  font-size: 15px;
  font-weight: 600;
  color: var(--loop-navy);
}

.uls-loop__note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
}

.uls-loop__note a {
  color: var(--loop-blue);
  text-decoration: underline;
}

/* Round email button that reopens the card (mirrors the chat button). */
.uls-loop-bubble {
  position: fixed;
  left: 20px;
  bottom: 50px;
  z-index: 9989;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  color: #fff;
  background: var(--loop-navy, #032f64);
  border: 3px solid #0070c0;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s, background-color 0.2s ease;
}

.uls-loop-bubble.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s, background-color 0.2s ease;
}

.uls-loop-bubble:hover,
.uls-loop-bubble:focus-visible {
  background: #0064c0;
}

.uls-loop-bubble__fill {
  fill: #032f64;
  transition: fill 0.2s ease;
}

.uls-loop-bubble:hover .uls-loop-bubble__fill,
.uls-loop-bubble:focus-visible .uls-loop-bubble__fill {
  fill: #0064c0;
}

.uls-loop-bubble:focus-visible {
  outline: 3px solid #f9d04b;
  outline-offset: 3px;
}

/* Phones: full width along the bottom, photo hidden to keep it short. It sits
   above the chat button while open (the card is short-lived and dismissible). */
@media (max-width: 575.98px) {
  .uls-loop {
    z-index: 100000;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }

  .uls-loop__media {
    display: none;
  }

  .uls-loop__body {
    padding: 18px 16px 14px;
  }

  .uls-loop__title {
    font-size: 19px;
  }

  .uls-loop__text {
    font-size: 13px;
  }

  .uls-loop__submit {
    padding: 0 14px;
  }

  .uls-loop-bubble {
    left: 15px;
    bottom: 40px;
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uls-loop,
  .uls-loop-bubble {
    transition: none;
  }
}
