/* LS Slide-Ins: structural + card styling. Uses theme design tokens where
   available, with sane fallbacks so the box degrades gracefully. */
.ls-slidein {
  position: fixed;
  right: var(--space-md, 24px);
  bottom: var(--space-md, 24px);
  z-index: 9000;
  max-width: 360px;
  background: var(--white, #fff);
  border-radius: var(--card-radius, 12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding: var(--space-lg, 32px);
  /* Starts fully below the viewport edge and slides up with a decelerating
     ease (ease-out-quint). Opacity ramps quicker so it never looks ghostly. */
  transform: translateY(calc(100% + 48px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, visibility 0s linear 0.5s;
}

.ls-slidein.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.ls-slidein-heading {
  font-family: var(--bold-header, inherit);
  font-size: var(--text-xl, 22px);
  font-weight: 700;
  letter-spacing: var(--tracking-tight, -0.01em);
  line-height: var(--lh-title, 1.35);
  color: var(--blue-900, #101c24);
  margin: 0 0 var(--space-xs, 8px);
  padding-right: var(--space-lg, 32px); /* clear the close button */
}

.ls-slidein-body {
  font-size: var(--text-sm, 16px);
  line-height: var(--lh-prose, 1.6);
  color: var(--gray-600, #565e63);
  margin: 0 0 var(--space-md, 24px);
}

.ls-slidein .ls-slidein-cta {
  display: inline-block;
}

.ls-slidein-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--gray-500, #7b7f74);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--cta-radius, 8px);
}

.ls-slidein-close:hover,
.ls-slidein-close:focus-visible {
  color: var(--blue-900, #101c24);
  background: var(--gray-100, #eceae1);
}

@media (max-width: 631px) {
  .ls-slidein {
    left: var(--space-sm, 16px);
    right: var(--space-sm, 16px);
    bottom: var(--space-sm, 16px);
    max-width: none;
    padding: var(--space-md, 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ls-slidein,
  .ls-slidein.is-visible {
    transition: none;
    transform: none;
  }
}

/* Media block: an optional image at the top of a card (e.g. the deliverable) */
.ls-slidein-media {
  margin: 0 0 var(--space-sm, 16px);
  text-align: center;
}

.ls-slidein-media img {
  max-width: 70%;
  max-height: 150px;
  height: auto;
}

/* Dark (navy) variant — stands out against the cream site while staying in palette */
.ls-slidein--dark {
  background: var(--blue-800, #16242e);
}

.ls-slidein--dark .ls-slidein-heading {
  color: var(--off-white, #faf9f4);
}

.ls-slidein--dark .ls-slidein-body {
  color: var(--off-white, #faf9f4);
}

/* Dark-on-dark fix: a soft off-white glow lifts the tablet off the navy card */
.ls-slidein--dark .ls-slidein-media img {
  filter: drop-shadow(0 6px 24px rgba(250, 249, 244, 0.3));
}

/* On the dark card the CTA is off-white with navy text, brightening to white on hover */
.ls-slidein--dark .ls-slidein-cta {
  background: var(--off-white, #faf9f4);
  color: var(--blue-900, #101c24);
}

.ls-slidein--dark .ls-slidein-cta:hover,
.ls-slidein--dark .ls-slidein-cta:focus-visible {
  background: var(--white, #ffffff);
  color: var(--blue-900, #101c24);
}

.ls-slidein--dark .ls-slidein-close {
  color: var(--gray-400, #a5a396);
}

.ls-slidein--dark .ls-slidein-close:hover,
.ls-slidein--dark .ls-slidein-close:focus-visible {
  color: var(--off-white, #faf9f4);
  background: rgba(255, 255, 255, 0.12);
}

/* Photo cards go horizontal: image column left, content right (the classic
   slide-in shape — shorter, especially on mobile). Requires the box content
   to wrap its text/form in .ls-slidein-content. */
.ls-slidein:has(.ls-slidein-media--photo) {
  display: grid;
  grid-template-columns: 230px 1fr;
  padding: 0;
  overflow: hidden;
  max-width: 560px;
}

.ls-slidein-media--photo {
  margin: 0;
}

.ls-slidein-media--photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 20% center; /* keep the subject fully in frame */
}

.ls-slidein-content {
  padding: var(--space-md, 24px);
  min-width: 0;
}

/* Keep the close button legible when it sits over or near a photo */
.ls-slidein:has(.ls-slidein-media--photo) .ls-slidein-close {
  background: var(--white, #ffffff);
  color: var(--blue-900, #101c24);
}

.ls-slidein:has(.ls-slidein-media--photo) .ls-slidein-close:hover,
.ls-slidein:has(.ls-slidein-media--photo) .ls-slidein-close:focus-visible {
  background: var(--gray-100, #eceae1);
  color: var(--blue-900, #101c24);
}

/* Fluent Forms inside a card: tame the plugin's stacked bottom margins */
.ls-slidein .fluentform {
  margin-bottom: 0;
}

.ls-slidein .fluentform .ff-el-group {
  margin-bottom: 12px;
}

/* Only the submit wrapper: FF's field markup nests groups (e.g. the name
   field), so :last-child selectors don't hold across form structures. */
.ls-slidein .fluentform .ff_submit_btn_wrapper,
.ls-slidein .fluentform .ff_submit_btn_wrapper_custom,
.ls-slidein .fluentform .ff_submit_btn_wrapper_custom button {
  margin-bottom: 0 !important;
}

.ls-slidein .fluentform .ff-btn-submit {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 631px) {
  /* A landscape photo has no honest crop in a narrow tall card; small
     screens get the compact form-first card instead. */
  .ls-slidein:has(.ls-slidein-media--photo) {
    display: block;
    max-width: none;
  }

  .ls-slidein-media--photo {
    display: none;
  }

  .ls-slidein-content {
    padding: var(--space-sm, 16px);
  }
}
