/* ─────────────────────────────
   NEWSLETTER.CSS — footer signup form feedback
   wp-content/themes/twentytwentyfive-child/styles/newsletter.css
   ───────────────────────────── */

/* ─────────────────────────────
   NEWSLETTER MODAL — replaces the old inline message, which sat
   next to the form and reserved its own width (min-width: 260px)
   even when empty, leaving a permanent gap on the right of the
   newsletter band. This is a fixed-position overlay instead, so it
   has zero footprint in the footer layout until it's shown.
   ───────────────────────────── */

.lc-newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lc-newsletter-modal[hidden] {
  display: none;
}

.lc-newsletter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 47, 27, 0.35);
  animation: lc-newsletter-fade-in 0.2s ease;
}

.lc-newsletter-modal-box {
  --lc-newsletter-gold: #b68235;
  position: relative;
  max-width: 720px;
  width: 100%;
  background: var(--lc-bg);
  border: 1px solid var(--lc-border-default);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(74, 47, 27, 0.25);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  text-align: left;
  animation: lc-newsletter-scale-in 0.2s ease;
}

/* Error responses (bad email, server hiccup) have no photo/coupon to
   show — single centered column, same simple layout the modal always
   used before this redesign. */
.lc-newsletter-modal-box.is-error {
  grid-template-columns: 1fr;
  max-width: 420px;
  text-align: center;
}

.lc-newsletter-modal-media {
  position: relative;
  min-height: 320px;
  background: var(--lc-surface);
}

.lc-newsletter-modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-newsletter-modal-box.is-error .lc-newsletter-modal-media {
  display: none;
}

.lc-newsletter-modal-content {
  padding: 36px 32px 30px;
  display: flex;
  flex-direction: column;
}

.lc-newsletter-modal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.lc-newsletter-modal-kicker {
  font-family: var(--lc-font-display);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lc-newsletter-gold);
}

.lc-newsletter-modal-close {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin: -4px -4px -4px 0;
  color: var(--lc-text);
  opacity: 0.55;
  font-size: 18px;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.lc-newsletter-modal-close:hover {
  opacity: 1;
}

.lc-newsletter-modal-title {
  font-family: var(--lc-font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 20px 0 0;
  color: var(--lc-text);
}

.lc-newsletter-modal-divider {
  height: 1px;
  background: var(--lc-border-default);
  margin: 22px 0 0;
}

.lc-newsletter-modal-message {
  margin: 20px 0 0;
  font-family: var(--lc-font-serif);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--lc-text);
  opacity: 0.85;
}

.lc-newsletter-modal.is-error .lc-newsletter-modal-message {
  color: #B33A3A;
  opacity: 1;
}

.lc-newsletter-modal-code {
  margin: 22px 0 0;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--lc-newsletter-gold);
  border-radius: 4px;
}

.lc-newsletter-modal-code[hidden] {
  display: none;
}

.lc-newsletter-modal-code-value {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-family: var(--lc-font-serif);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--lc-newsletter-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}

.lc-newsletter-modal-code-copy {
  appearance: none;
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 1px solid var(--lc-newsletter-gold);
  color: var(--lc-newsletter-gold);
  font-family: var(--lc-font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 18px;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lc-newsletter-modal-code-copy:hover {
  background: rgba(182, 130, 53, 0.12);
}

.lc-newsletter-modal-code-copy.is-copied {
  color: var(--lc-state-success);
  border-left-color: var(--lc-state-success);
}

.lc-newsletter-modal-validity {
  margin: 14px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--lc-text);
  opacity: 0.6;
}

.lc-newsletter-modal-validity[hidden] {
  display: none;
}

.lc-newsletter-modal-continue {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 22px;
  padding: 0;
  font-family: var(--lc-font-serif);
  font-size: 12.5px;
  color: var(--lc-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.lc-newsletter-modal-box.is-error .lc-newsletter-modal-continue {
  align-self: center;
}

.lc-newsletter-modal-continue:hover {
  opacity: 0.7;
}

/* ─────────────────────────────
   ENTRY POPUP — the form is the reused .lc-footer-form component
   (same input/button look as the footer), but .lc-newsletter-modal-
   content is a flex-direction: column container, and .lc-footer-form's
   own "flex: 1 1 320px" is a WIDTH hint meant for a flex ROW — the
   same bug already fixed once in styles/footer.css. Inside a column
   container that basis/grow gets applied as a HEIGHT instead, and
   would stretch the form to fill the modal. Reset it here the same
   way.
   ───────────────────────────── */

.lc-newsletter-modal-content .lc-footer-form {
  flex: none;
  width: 100%;
  max-width: 100%;
  margin-top: 24px;
}

.lc-newsletter-modal-content .lc-newsletter-modal-continue {
  align-self: flex-start;
}

@media (max-width: 640px) {
  .lc-newsletter-modal-box {
    grid-template-columns: 1fr;
  }

  .lc-newsletter-modal-media {
    min-height: 180px;
  }

  .lc-newsletter-modal-content {
    padding: 26px 22px 26px;
  }

  .lc-newsletter-modal-title {
    font-size: 24px;
  }
}

@keyframes lc-newsletter-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lc-newsletter-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}