/* ============================================================
   28. COMPONENT: Try-it overlay
   ============================================================ */

.ov {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(var(--dark-rgb), .68);
  backdrop-filter: blur(3px);
}
.ov.open { display: flex; }

.ov-modal {
  background: var(--white);
  width: min(1120px, 100%);
  height: min(700px, 92vh);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 50px 120px -30px rgba(var(--dark-rgb), .65);
  transform: translateY(8px) scale(.99);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  margin-bottom: 5vh;
}
.ov.open .ov-modal { transform: none; opacity: 1; }

.ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.ov-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.ov-title span { color: var(--muted); font-weight: 500; }

.ov-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.ov-close:hover { background: var(--paper); color: var(--ink); }

.ov-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ov-pane { display: flex; flex-direction: column; min-height: 0; }
.ov-pane.right { border-left: 1px solid var(--line); background: var(--paper); }

.ov-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 24px 12px;
  flex: 0 0 auto;
}

.ov-input {
  flex: 1;
  min-height: 0;
  border: 0;
  resize: none;
  padding: 0 24px 24px;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  outline: none;
  background: transparent;
}

.ov-actions {
  flex: 0 0 auto;
  padding: 6px 24px 22px;
  display: flex;
  justify-content: flex-end;
}

.ov-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--white);
  background: var(--action);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  cursor: pointer;
  transition: background .15s;
}
.ov-go:hover { background: var(--action-hover); }
.ov-go:disabled { cursor: wait; opacity: .68; }

.ov-ph { color: var(--muted); font-family: "Inter", sans-serif; font-size: 14.5px; line-height: 1.6; }

.ov-out {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 24px 24px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 17px;
  line-height: 1.42;
  color: var(--ink);
}
.ov-out[aria-busy="true"] { opacity: .7; }
.ov-status { color: var(--ink); font-family: "Inter", sans-serif; font-size: 14.5px; line-height: 1.6; }
.ov-out .cascade_paragraph + .cascade_paragraph { margin-top: 1.5em; }
.ov-out .cascade_sentence + .cascade_sentence { margin-top: 1em; }
.ov-out .cascade-node { position: relative; display: block; margin-left: 25px; }
.ov-out .cascade-node.has-children::after {
  content: ''; position: absolute;
  top: 1.8rem; bottom: .4rem;
  left: .1rem;
  width: 1px; background: var(--line);
}

.ov-foot {
  flex: 0 0 auto;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ov-foot .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-circle);
  background: var(--accent-l);
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.ov-ext-banner {
  flex: 0 0 auto;
  padding: 20px 24px;
  background: var(--dark);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ov-ext-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-muted);
  letter-spacing: -.01em;
  line-height: 1.3;
}

.ov-ext-link {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(var(--white-rgb),.3);
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color .15s;
}
.ov-ext-link:hover { border-color: rgba(var(--white-rgb),.7); }

@media (max-width: 780px) {
  /* Full-screen takeover — a floating card with backdrop margin
     (the desktop treatment) doesn't work at this size; edge-to-edge
     is the standard mobile modal pattern and gives the tool the most
     room to actually be usable. */
  .ov { padding: 0; }
  .ov-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    margin-bottom: 0;
  }

  .ov-head { padding: 14px 16px; }
  .ov-title { font-size: 14px; }
  /* Subtitle drops to its own line under the title instead of
     competing for horizontal space next to it and the close button. */
  .ov-title { display: flex; flex-direction: column; gap: 2px; }
  .ov-title span { font-size: 12.5px; }
  /* 44px matches the minimum recommended touch-target size (was 34px,
     comfortable on desktop with a mouse, tight for a thumb). */
  .ov-close { width: 44px; height: 44px; }

  /* Vertical flow instead of the desktop grid split. Input gets a
     fixed, comfortable height rather than fighting output for an
     even 50/50 share of already-limited screen space — output is
     where the actual "aha" moment happens and needs the room more. */
  .ov-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .ov-pane.left { flex: 0 0 auto; }
  .ov-pane.right {
    flex: 1 1 0;
    min-height: 220px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .ov-label { padding: 14px 16px 10px; }
  .ov-input {
    min-height: 130px;
    padding: 0 16px 16px;
    font-size: 16px; /* 16px avoids iOS Safari's auto-zoom-on-focus */
  }
  .ov-actions { padding: 16px 16px 18px; }
  /* Full-width primary action — easier to hit reliably with a thumb
     than a right-aligned button, and reads as the obvious next step
     in a single-column flow. */
  .ov-go { width: 100%; justify-content: center; padding: 14px 22px; }
  .ov-out { padding: 0 16px 20px; font-size: 16px; }

  .ov-foot { padding: 10px 16px; }

  /* Promotional extension banner — removed entirely on mobile per
     direct instruction. Competing for space with the actual tool was
     already a poor tradeoff before the rest of this rework; doubly so
     now that every remaining pixel matters more. */
  .ov-ext-banner { display: none; }
}


/* WordPress/Elementor isolation: preserve the static source's computed UI. */
.cascade-component.cascade-try-overlay-component {
  line-height: normal;
}

.cascade-try-overlay-component .ov-body {
  margin: 0;
  padding: 0;
  border: 0;
}

.cascade-try-overlay-component .ov-out .cascade-reader-signup {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cascade-try-overlay-component .ov-title,
.cascade-try-overlay-component .ov-title span,
.cascade-try-overlay-component .ov-label,
.cascade-try-overlay-component .ov-foot {
  line-height: normal;
}

.cascade-try-overlay-component .ov-close {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  min-width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--muted);
  box-shadow: none;
  text-shadow: none;
  font-family: Arial, sans-serif;
  font-size: 13.3333px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
}
.cascade-try-overlay-component .ov-close:hover,
.cascade-try-overlay-component .ov-close:focus,
.cascade-try-overlay-component .ov-close:active {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  text-shadow: none;
}
.cascade-try-overlay-component .ov-close:focus {
  outline: none;
}
.cascade-try-overlay-component .ov-close:focus-visible {
  border-color: var(--line);
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.cascade-try-overlay-component .ov-close svg {
  display: block;
  width: 16px;
  min-width: 16px;
  max-width: none;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
}
.cascade-try-overlay-component .ov-close svg path {
  fill: none;
  stroke: currentColor;
}

.cascade-try-overlay-component .ov-go {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--action);
  color: var(--white);
  box-shadow: none;
  text-shadow: none;
  font-family: Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
}
.cascade-try-overlay-component .ov-go:hover,
.cascade-try-overlay-component .ov-go:focus,
.cascade-try-overlay-component .ov-go:active {
  border: 0;
  background: var(--action-hover);
  color: var(--white);
  box-shadow: none;
  text-shadow: none;
}
.cascade-try-overlay-component .ov-go:focus {
  outline: none;
}
.cascade-try-overlay-component .ov-go:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

.cascade-try-overlay-component .ov-input,
.cascade-try-overlay-component .ov-input:focus {
  appearance: auto;
  width: auto;
  margin: 0;
  padding: 0 24px 24px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
  text-transform: none;
}

.cascade-try-overlay-component .ov-ext-headline {
  margin: 0;
}
.cascade-try-overlay-component .ov-ext-link,
.cascade-try-overlay-component .ov-ext-link:visited {
  margin: 0;
  padding: 9px 20px;
  border: 1.5px solid rgba(var(--white-rgb),.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--white);
  box-shadow: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
}
.cascade-try-overlay-component .ov-ext-link:hover,
.cascade-try-overlay-component .ov-ext-link:focus {
  border-color: rgba(var(--white-rgb),.7);
  background: transparent;
  color: var(--white);
  text-decoration: none;
}

@media (max-width: 780px) {
  .cascade-try-overlay-component .ov-close {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .cascade-try-overlay-component .ov-input,
  .cascade-try-overlay-component .ov-input:focus {
    width: auto;
    min-height: 130px;
    padding: 0 16px 16px;
    font-size: 16px;
  }
  .cascade-try-overlay-component .ov-go {
    width: 100%;
    padding: 14px 22px;
  }
}
