/* Mobile sticky "Join the list" bar — hidden on desktop */

.sticky-capture {
  display: none;
}

@media (max-width: 860px) {
  .sticky-capture {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 251, 245, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(16, 42, 67, 0.08);
    box-shadow: 0 -8px 28px -16px rgba(16, 42, 67, 0.28);
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
  }

  .sticky-capture.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sticky-capture-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
  }

  .sticky-capture-toggle {
    flex: 1;
    justify-content: center;
    width: 100%;
    background: var(--navy, #102A43);
    color: #fff;
    border: 1.5px solid var(--navy, #102A43);
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 15px 28px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
  }

  .sticky-capture-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -14px rgba(16, 42, 67, 0.5);
  }

  .sticky-capture-form {
    display: none;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .sticky-capture-form input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(16, 42, 67, 0.18);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink, #102A43);
  }

  .sticky-capture-form input[type="email"]:focus {
    outline: none;
    border-color: var(--gold, #DAA520);
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.15);
  }

  .sticky-capture-form .sticky-capture-submit {
    flex: none;
    background: var(--navy, #102A43);
    color: #fff;
    border: 1.5px solid var(--navy, #102A43);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 18px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
  }

  .sticky-capture-form .sticky-capture-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .sticky-capture-collapse {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(16, 42, 67, 0.06);
    color: var(--navy, #102A43);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .sticky-capture-collapse:hover {
    background: rgba(16, 42, 67, 0.12);
  }

  .sticky-capture.is-expanded .sticky-capture-toggle {
    display: none;
  }

  .sticky-capture.is-expanded .sticky-capture-form {
    display: flex;
  }

  .sticky-capture.is-expanded .sticky-capture-collapse {
    display: flex;
  }

  body.sticky-capture-visible {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  /* Only lift the toast when it's actually showing — otherwise raising
     `bottom` peeks the default "You're on the list" copy into view. */
  body.sticky-capture-visible .toast.show {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-capture {
    transition: none;
  }
}
