/* Foenix Showcase Widget — Frontend Styles v2.6.02 */

:root {
  --fw-bg:        #0A0A0A;
  --fw-card:      #1A1A1A;
  --fw-border:    rgba(255,255,255,0.08);
  --fw-accent:    #FF7B0F;
  --fw-text:      #FFFFFF;
  --fw-muted:     rgba(255,255,255,0.5);
  --fw-font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --fw-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Keyframes ── */
@keyframes fw-glow-pulse {
  0%,100% { box-shadow: -4px 0 24px rgba(255,123,15,.3), 0 0 0 0 rgba(255,123,15,0); }
  50%      { box-shadow: -6px 0 36px rgba(255,123,15,.6), 0 0 0 4px rgba(255,123,15,.1); }
}
@keyframes fw-dot-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.7); }
}
@keyframes fw-flame-flicker {
  0%,100% { transform:scaleY(1) rotate(-1deg); }
  33%      { transform:scaleY(1.05) rotate(1deg); }
  66%      { transform:scaleY(.97) rotate(-.5deg); }
}
@keyframes fw-pointer-float {
  0%,100% { transform: translate(0px,  0px) rotate(  0deg); }
  25%      { transform: translate(1px, -2px) rotate(  5deg); }
  50%      { transform: translate(0px, -3px) rotate(  2deg); }
  75%      { transform: translate(-1px,-1px) rotate( -4deg); }
}

/* ══════════════════════════════════════════
   TRIGGER BUTTON
══════════════════════════════════════════ */
.foenix-widget-trigger {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  width: 48px;
  min-height: 170px;
  height: auto;
  background: var(--fw-bg);
  border: 1.5px solid var(--fw-accent);
  border-right: none;
  border-radius: 14px 0 0 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  box-shadow: -4px 0 24px rgba(255,123,15,.3);
  animation: fw-glow-pulse 3s ease-in-out infinite;
  transition: width .2s ease;
  outline: none;
  color: var(--fw-text);
  text-decoration: none;
}

.foenix-widget-trigger:hover {
  width: 54px;
  animation: fw-glow-pulse 1s ease-in-out infinite;
}

.foenix-widget-trigger:hover .fw-trigger-icon {
  animation: fw-flame-flicker .5s ease-in-out infinite;
}

.fw-trigger-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--fw-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fw-accent);
  line-height: 1;
  user-select: none;
  white-space: nowrap;
  margin-left: 3px;
}

.fw-trigger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-origin: center bottom;
}
.fw-trigger-icon svg { width: 26px; height: 26px; }

.fw-trigger-divider {
  width: 20px;
  height: 1px;
  background: rgba(255,123,15,.3);
  flex-shrink: 0;
}

.fw-trigger-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fw-accent);
  flex-shrink: 0;
  animation: fw-dot-pulse 2s ease-in-out infinite;
}

/* ── Backdrop ── */
.foenix-widget-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.foenix-widget-backdrop.fw-active { opacity: 1; pointer-events: all; }

/* ══════════════════════════════════════════
   DEMO SITE LABEL — circular badge
══════════════════════════════════════════ */
.fw-view-site-label {
  position: fixed;
  top: 50%;
  left: calc((100vw - 600px) / 2);
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;

  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  user-select: none;
  text-decoration: none;
}
.fw-view-site-label.fw-visible { opacity: 1; pointer-events: all; }
.fw-view-site-label:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.3);
}

.fw-vsl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-origin: top left;
}
.fw-view-site-label:hover .fw-vsl-icon {
  animation: fw-pointer-float 2.5s ease-in-out infinite;
}
.fw-vsl-icon svg {
  width: 24px;
  height: 24px;
}

.fw-vsl-text {
  font-family: var(--fw-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  display: block;
  white-space: nowrap;
  line-height: 1;
}

/* ══════════════════════════════════════════
   PANEL — 600px wide
══════════════════════════════════════════ */
.foenix-widget-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 600px;
  max-width: 100vw;
  z-index: 9999;
  background: var(--fw-bg);
  border-left: 1px solid var(--fw-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  font-family: var(--fw-font-sans);
  color: var(--fw-text);
}
.foenix-widget-panel.fw-open { transform: translateX(0); }

/* ── Topbar ── */
.fw-panel-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  height: 52px;
  border-bottom: 1px solid var(--fw-border);
  background: var(--fw-bg);
  gap: 12px;
}

.fw-header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px 0;
  height: 36px;
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  flex: 1;
  justify-content: flex-start;
  transition: opacity .2s;
}
.fw-header-eyebrow:hover { opacity: .75; text-decoration: none; }
.fw-header-eyebrow:hover .fw-eyebrow-flame {
  animation: fw-flame-flicker .5s ease-in-out infinite;
}

.fw-eyebrow-flame {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-origin: center bottom;
  margin-right: 8px;
}
.fw-eyebrow-flame svg { width: 18px; height: 18px; }

.fw-eyebrow-hdiv {
  width: 1px;
  height: 18px;
  background: rgba(255,123,15,.35);
  flex-shrink: 0;
  margin-right: 9px;
}

.fw-eyebrow-text {
  font-family: var(--fw-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fw-accent);
  line-height: 1;
  white-space: nowrap;
  margin-top: 3px;
}

.fw-panel-close {
  background: var(--fw-card);
  border: 1px solid var(--fw-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--fw-muted);
  transition: color .15s, border-color .15s;
  outline: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fw-panel-close:hover { color: var(--fw-text); border-color: var(--fw-accent); }

.fw-panel-close-desktop {
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.fw-panel-close-mobile {
  display: none;
  font-family: var(--fw-font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 16px;
  height: auto;
  border-radius: 100px;
}

/* ── Panel body ── */
.fw-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--fw-card) transparent;
}
.fw-panel-body::-webkit-scrollbar { width: 6px; }
.fw-panel-body::-webkit-scrollbar-track { background: transparent; }
.fw-panel-body::-webkit-scrollbar-thumb { background: #333; border-radius: 20px; }

/* ── Panel footer — scroll progress / CTA ── */
.fw-panel-footer {
  flex-shrink: 0;
  position: relative;
  padding: 14px 24px 18px;
  background: var(--fw-bg);
  border-top: 1px solid var(--fw-border);
  box-shadow: 0 -8px 24px rgba(0,0,0,.6);
  border-radius: 100px;
  margin: 0 16px 16px;
  height: 56px;
  overflow: hidden;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a1a;
}

/* Progress fill bar */
.fw-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--fw-accent);
  width: 0%;
  transition: width 150ms ease-out;
  border-radius: 100px;
}

/* Text layer above progress bar */
.fw-cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.fw-progress-label {
  font-family: var(--fw-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  letter-spacing: .05em;
  white-space: nowrap;
}

.fw-cta-text {
  font-family: var(--fw-font-sans);
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  letter-spacing: .05em;
  white-space: nowrap;
  display: none;
  text-shadow: none;
}

.fw-cta-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  color: #000000;
  transition: transform .2s ease;
}
.fw-cta-arrow svg {
  width: 18px;
  height: 18px;
  stroke: #000000;
  filter: none;
}

/* When completed — enable click */
.fw-footer-complete {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fw-footer-complete:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255,123,15,.35);
}
.fw-footer-complete:hover .fw-cta-arrow {
  transform: translateX(3px);
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.fw-section-header {
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.fw-widget-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--fw-text);
  letter-spacing: -.03em;
}

/* ── Why text — 16px, original muted color ── */
.fw-why-text {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  margin: 0;
  white-space: pre-line;
}

/* ══════════════════════════════════════════
   META TAGS
══════════════════════════════════════════ */
.fw-meta-tags-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 16px;
}

.fw-meta-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fw-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  border-width: 1px;
  border-style: solid;
  font-family: var(--fw-font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.fw-meta-tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  flex-shrink: 0;
}
.fw-meta-tag-icon svg {
  width: 12px;
  height: 12px;
}

.fw-meta-tag-label {
  font-family: var(--fw-font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  user-select: none;
  flex-shrink: 0;
}

.fw-meta-tag-value {
  font-family: var(--fw-font-mono);
  font-size: 13px;
  font-weight: 700;
}

.fw-meta-tag-values {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.fw-meta-tag-sep {
  font-family: var(--fw-font-sans);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.4;
  margin: 0 6px;
}

/* ── Credits tag — Emerald (#10B981) ── */
.fw-meta-tag--credits {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

/* ── Time tag — Gray (#9CA3AF) ── */
.fw-meta-tag--time {
  background-color: rgba(156, 163, 175, 0.1);
  border-color: rgba(156, 163, 175, 0.2);
  color: #9CA3AF;
}

/* ── Safety tag — Purple (#C084FC) ── */
.fw-meta-tag--safety {
  background-color: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  color: #C084FC;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

/* ── Model tag — Orange (#FF7B0F) ── */
.fw-meta-tag--model {
  background-color: rgba(255, 123, 15, 0.1);
  border-color: rgba(255, 123, 15, 0.2);
  color: #FF7B0F;
}

.fw-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--fw-accent) 0%, transparent 80%);
  margin-top: 20px;
  opacity: .5;
}

/* ══════════════════════════════════════════
   CONTENT / STEPS
══════════════════════════════════════════ */
.fw-section-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Body text — 16px, original muted color ── */
.fw-desc-text {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  margin: 0 0 10px;
  white-space: pre-line;
}
.fw-desc-text:last-child { margin-bottom: 0; }

/* ── Green text block (#g...#g) ── */
.fw-desc-text--green {
  color: #22C55E;
}

/* ── Footnote / metadata note (~text) ── */
.fw-desc-note {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,0.25);
  margin: 4px 0 10px;
  font-family: var(--fw-font-mono);
  letter-spacing: .02em;
  white-space: pre-line;
}

.fw-bold-accent  { color: var(--fw-accent); font-weight: 700; }
.fw-white-accent { color: var(--fw-text);   font-weight: 700; }
.fw-inline-link  {
  color: var(--fw-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: opacity .15s;
}
.fw-inline-link:hover { opacity: .75; color: var(--fw-accent); }

/* H2 (##) — white large */
.fw-heading-h2 {
  font-family: var(--fw-font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--fw-text);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 24px 0 10px;
  padding: 0;
}
.fw-heading-h2:first-child { margin-top: 0; }

/* H3 (#) — orange */
.fw-heading-h3 {
  font-family: var(--fw-font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--fw-accent);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 24px 0 10px;
  padding: 0;
}
.fw-heading-h3:first-child { margin-top: 0; }

/* H3g (#g ) — green heading */
.fw-heading-h3-green {
  font-family: var(--fw-font-sans);
  font-size: 24px;
  font-weight: 700;
  color: #22C55E;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 24px 0 10px;
  padding: 0;
}
.fw-heading-h3-green:first-child { margin-top: 0; }

/* ── Inline images ── */
.fw-inline-image {
  margin: 14px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--fw-border);
  cursor: pointer;
  position: relative;
  transition: border-color .15s;
}
.fw-inline-image:hover { border-color: var(--fw-accent); }
.fw-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}
.fw-step-image-zoom {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.7);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--fw-muted);
  font-family: var(--fw-font-mono);
  pointer-events: none;
}

/* ── Lightbox ── */
.fw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fw-lightbox.fw-lb-open { opacity: 1; pointer-events: all; }
.fw-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
  object-fit: contain;
}
.fw-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--fw-card);
  border: 1px solid var(--fw-border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fw-muted);
  font-size: 20px;
  outline: none;
  padding: 0;
  transition: color .15s;
}
.fw-lightbox-close:hover { color: var(--fw-text); }

/* ══════════════════════════════════════════
   RUN DETAILS TABLE
══════════════════════════════════════════ */
.fw-run-table-wrap {
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--fw-border);
}

.fw-run-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--fw-font-sans);
  font-size: 13px;
}

/* ── Table header with icons — brighter ── */
.fw-run-th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--fw-border);
}

.fw-run-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fw-run-th-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  flex-shrink: 0;
}
.fw-run-th-icon svg {
  width: 11px;
  height: 11px;
}

/* ── Column-specific header icon colors ── */
.fw-run-th--credits .fw-run-th-icon { color: #10B981; }
.fw-run-th--time    .fw-run-th-icon { color: #9CA3AF; }
.fw-run-th--safety  .fw-run-th-icon { color: #C084FC; }
.fw-run-th--model   .fw-run-th-icon { color: #FF7B0F; }

.fw-run-tr {
  border-bottom: 1px solid var(--fw-border);
  transition: background .15s;
}
.fw-run-tr:last-child { border-bottom: none; }
.fw-run-tr:hover { background: rgba(255,255,255,0.03); }

.fw-run-td {
  padding: 10px 12px;
  vertical-align: middle;
  color: rgba(255,255,255,0.9);
}

/* ── All cell content — white ── */
.fw-run-td-cost    { color: rgba(255,255,255,0.9); font-family: var(--fw-font-mono); font-size: 12px; white-space: nowrap; }
.fw-run-td-time    { color: rgba(255,255,255,0.9); font-family: var(--fw-font-mono); font-size: 12px; white-space: nowrap; }
.fw-run-td-safety  { color: rgba(255,255,255,0.9); font-size: 12px; }
.fw-run-td-models  { color: rgba(255,255,255,0.9); font-size: 12px; font-family: var(--fw-font-mono); }

/* Legacy status classes (kept for backward compat) */
.fw-run-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}
.fw-run-dot--success { background: #10B981; box-shadow: 0 0 6px rgba(16,185,129,.6); }
.fw-run-dot--failed  { background: #EF4444; box-shadow: 0 0 6px rgba(239,68,68,.6); }
.fw-run-dot--pending { background: #9CA3AF; }
.fw-run-dot--running { background: #F59E0B; box-shadow: 0 0 6px rgba(245,158,11,.4); animation: fw-dot-pulse 1.5s ease-in-out infinite; }

.fw-run-status-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
  vertical-align: middle;
  color: var(--fw-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .foenix-widget-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--fw-border);
    height: 92vh;
    top: auto;
    bottom: 0;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
  }
  .foenix-widget-panel.fw-open { transform: translateY(0); }
  .foenix-widget-trigger {
    top: auto;
    bottom: 80px;
    right: 0;
    transform: none;
    min-height: 150px;
  }
  .fw-panel-body           { padding: 16px 20px 12px; }
  .fw-panel-close-desktop  { display: none; }
  .fw-panel-close-mobile   { display: flex; }
  .fw-view-site-label      { display: none; }
  .fw-run-td-time,
  .fw-run-td-safety        { display: none; }
}

/* ── Utility ── */
.fw-hidden { display: none !important; }
