/* ==========================================================================
   Wize AI Agent page: "See it work in your scenario." (industry pills, homepage-style customer chat + activity panel).
   Markup: template-parts/rc-v4-wize-ai-agent/explorer.php. Behaviour: js/rc-v4-wize-ai-agent/explorer.js.
   Design: .aa-explore + .ss in reve-chat-website src/creative/aiAgent.css (V4 79dae6a).
   ========================================================================== */

/* industry tabs: compact pills */
.rc-wize-explorer .rc-wize-explorer-tabs { display: flex; justify-content: safe center; gap: 6px; margin-bottom: 16px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.rc-wize-explorer .rc-wize-explorer-tabs button {
  flex: none; height: 34px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--rc-wize-line); background: #fff;
  font-family: var(--rc-font); font-size: 13.5px; font-weight: 500; line-height: 1.55; color: var(--rc-ink-2); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.rc-wize-explorer .rc-wize-explorer-tabs button:hover { border-color: rgba(20, 18, 31, 0.3); color: var(--rc-ink); }
.rc-wize-explorer .rc-wize-explorer-tabs button.is-on { background: var(--rc-ink); border-color: var(--rc-ink); color: #fff; }

/* the stage: window bar, chat (left) and agent activity (right) */
.rc-wize-ss {
  max-width: 900px; margin: 28px auto 0; overflow: hidden;
  background: #fff; border: 1px solid #e6eaed; border-radius: 20px; box-shadow: 0 24px 50px -34px rgba(50, 35, 120, 0.35);
}
.rc-wize-ss .rc-wize-ss-bar { display: flex; align-items: center; height: 38px; padding: 0 16px; border-bottom: 1px solid #e6e3f1; background: #fff; }
.rc-wize-ss .rc-wize-ss-win { display: inline-flex; gap: 6px; margin-right: 16px; }
.rc-wize-ss .rc-wize-ss-win i { width: 8px; height: 8px; border-radius: 50%; background: #d5d1e4; }
.rc-wize-ss .rc-wize-ss-bar b { font-size: 12.5px; font-weight: 600; color: #1f2a44; }
.rc-wize-ss .rc-wize-ss-bar small { margin-left: 8px; font-size: 12px; color: #6b7a90; }
.rc-wize-ss .rc-wize-ss-status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #1a7f46; }
.rc-wize-ss .rc-wize-ss-status[hidden], .rc-wize-ss .rc-wize-ss-replay[hidden] { display: none; }
.rc-wize-ss .rc-wize-ss-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rc-wize-ss .rc-wize-ss-replay {
  margin-left: auto; height: 24px; padding: 0 12px; border-radius: 999px; border: 1px solid #e0dcf0; background: #fff;
  color: #5b3fd0; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.rc-wize-ss .rc-wize-ss-replay:hover { background: #f6f3ff; }

.rc-wize-ss .rc-wize-ss-body { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.rc-wize-ss .rc-wize-ss-chat { display: flex; flex-direction: column; min-width: 0; height: 400px; padding: 14px 18px; }

/* the thread window: top-anchored column that slides up with one eased move (js) */
.rc-wize-ss .rc-wize-ss-view {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px); mask-image: linear-gradient(to bottom, transparent 0, #000 14px);
}
.rc-wize-ss .rc-wize-ss-col { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 6px; transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1); will-change: transform; }
.rc-wize-ss .rc-wize-ss-pop { display: flex; flex: none; animation: rc-wize-ss-pop 0.32s cubic-bezier(0.22, 0.8, 0.24, 1) both; }
.rc-wize-ss .rc-wize-ss-pop > * { min-width: 0; }
.rc-wize-ss .rc-wize-ss-pop-end { justify-content: flex-end; }
@keyframes rc-wize-ss-pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.rc-wize-ss .rc-wize-ss-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 84%; }
.rc-wize-ss .rc-wize-ss-msg > span { font-size: 11px; line-height: 16px; color: #6f8294; }
.rc-wize-ss .rc-wize-ss-msg > span b { font-weight: 600; color: #253748; }
.rc-wize-ss .rc-wize-ss-msg p { margin: 0; padding: 8px 13px; font-size: 13px; line-height: 19px; background: #eff2f4; color: #253748; border-radius: 3px 14px 14px 14px; }
.rc-wize-ss .rc-wize-ss-msg-c { align-items: flex-end; }
.rc-wize-ss .rc-wize-ss-msg-c p { background: #2d194f; color: #fff; border-radius: 14px 3px 14px 14px; }
.rc-wize-ss .rc-wize-ss-msg p.rc-wize-ss-dots { display: inline-flex; gap: 4px; padding: 13px 15px; }
.rc-wize-ss .rc-wize-ss-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9aa7b3; animation: rc-wize-ss-dot 1s ease-in-out infinite; }
.rc-wize-ss .rc-wize-ss-dots i:nth-child(2) { animation-delay: 0.15s; }
.rc-wize-ss .rc-wize-ss-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes rc-wize-ss-dot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.rc-wize-ss .rc-wize-ss-composer { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rc-wize-ss .rc-wize-ss-field {
  flex: 1 0 0; min-width: 0; display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 10px 10px 10px 16px;
  border: 1px solid #d3d8dd; border-radius: 82px; background: #fff; font-size: 13px; color: #909fac;
}
.rc-wize-ss .rc-wize-ss-mic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #ebeef1; }

/* activity panel: one row per tool step (spinner while running, green check + result when done) */
.rc-wize-ss .rc-wize-ss-act { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px; background: #fafbfb; border-left: 1px solid #eef0f3; }
.rc-wize-ss .rc-wize-ss-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.rc-wize-ss .rc-wize-ss-step { display: flex; align-items: flex-start; gap: 10px; animation: rc-wize-ss-pop 0.32s cubic-bezier(0.22, 0.8, 0.24, 1) both; }
.rc-wize-ss .rc-wize-ss-ic {
  flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid rgba(122, 98, 238, 0.5); color: #fff; transition: background-color 0.25s, border-color 0.25s;
}
.rc-wize-ss .rc-wize-ss-ic i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid transparent; border-top-color: #7a62ee; border-right-color: #7a62ee; animation: rc-wize-ss-spin 0.7s linear infinite; }
@keyframes rc-wize-ss-spin { to { transform: rotate(360deg); } }
.rc-wize-ss .rc-wize-ss-step.is-done .rc-wize-ss-ic { background: #1f9d55; border-color: #1f9d55; }
.rc-wize-ss .rc-wize-ss-step > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rc-wize-ss .rc-wize-ss-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.rc-wize-ss .rc-wize-ss-top b { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: #253748; }
.rc-wize-ss .rc-wize-ss-step.is-run .rc-wize-ss-top b { color: #6f8294; }
.rc-wize-ss .rc-wize-ss-top em { font-family: inherit; font-style: normal; font-weight: 400; letter-spacing: 0; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: #f2e9ff; color: #5b3fd0; }
.rc-wize-ss .rc-wize-ss-step small { font-size: 11.5px; color: #4d657c; animation: rc-wize-ss-pop 0.3s ease both; }
.rc-wize-ss .rc-wize-ss-out {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  background: #e8f6e9; color: #127a1e; font-size: 12px; font-weight: 600;
  opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s;
}
.rc-wize-ss .rc-wize-ss-out.is-on { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .rc-wize-ss .rc-wize-ss-body { grid-template-columns: minmax(0, 1fr); }
  .rc-wize-ss .rc-wize-ss-act { border-left: 0; border-top: 1px solid #eef0f3; }
}
@media (max-width: 560px) {
  .rc-wize-ss .rc-wize-ss-chat { padding: 14px 16px; }
  .rc-wize-ss .rc-wize-ss-msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-wize-ss .rc-wize-ss-pop, .rc-wize-ss .rc-wize-ss-step, .rc-wize-ss .rc-wize-ss-step small { animation: none; }
  .rc-wize-ss .rc-wize-ss-col { transition: none; }
}
