/* Interactive sandbox demo (#/try). Reuses the portal chat + toggle classes. */

.try-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.try-topnav {
  gap: var(--sp-3);
}

.try-badge {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.try-topnav-spacer {
  flex: 1;
}

.try-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
}

.try-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-2);
}

.try-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.try-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-3);
}

.try-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: var(--sp-4);
}

.try-frame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: filter 0.24s var(--ease), opacity 0.24s var(--ease);
}

/* Brief blur while the stage switches between Live and Preview. */
.try-stage--switching .try-frame {
  filter: blur(7px);
  opacity: 0.75;
}

.try-hint {
  position: absolute;
  left: 50%;
  bottom: var(--sp-5);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #081337;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 26px -12px rgba(8, 19, 55, 0.55);
  animation: try-hint-float 2.6s var(--ease) infinite;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.try-hint--hide {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}

@keyframes try-hint-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.try-chat-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.try-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.try-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding: 0 0 var(--sp-2);
}

.try-suggestion {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--text-sm);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.try-suggestion:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.try-card-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.try-final-cta {
  margin-top: var(--sp-3);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}

.try-final-cta p {
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0;
}

.picker-chip--meta {
  position: static;
  display: inline-flex;
}

@media (max-width: 860px) {
  .try-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 46dvh) minmax(0, 1fr);
  }

  .try-chat-pane {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .try-stage {
    padding: var(--sp-2);
  }

  /* The chat pane is short here — once the conversation starts, the intro's
     job is done and the thread needs the room. */
  .try-page--started .try-chat .chat-intro {
    display: none;
  }

  .try-chat .chat-intro {
    padding-top: var(--sp-3);
  }

  .try-url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .try-bar .preview-bar-spacer {
    display: none;
  }
}

@media (max-width: 640px) {
  .try-topnav {
    gap: var(--sp-2);
    padding-left: var(--sp-3);
    padding-right: var(--sp-3);
  }

  /* Icon-only reset; the label doesn't fit next to the trial CTA. */
  .try-reset-label {
    display: none;
  }
}

@media (max-width: 420px) {
  .try-badge {
    display: none;
  }
}
