/* LinkedIn showcase layer for the standalone Automation Lab demo. */
.brand-symbol {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #102733;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.analytics-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(115deg, rgba(12, 59, 77, .98), rgba(7, 42, 58, .98));
  border: 1px solid rgba(87, 220, 199, .18);
}

.analytics-hero h3,
.showcase-chart h3 {
  margin: .25rem 0 0;
}

.analytics-hero p {
  margin: .45rem 0 0;
  color: rgba(231, 244, 248, .72);
}

.analytics-period {
  min-width: 190px;
  padding: .75rem 1rem;
  border-left: 3px solid #ffd33d;
  background: rgba(255, 255, 255, .06);
}

.analytics-period span,
.analytics-period strong {
  display: block;
}

.analytics-period span {
  color: rgba(231, 244, 248, .65);
  font-size: .72rem;
  text-transform: uppercase;
}

.analytics-period strong {
  margin-top: .25rem;
  font-size: .92rem;
}

.analytics-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}

.analytics-score-card {
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(113, 204, 197, .14);
  background: rgba(7, 42, 58, .88);
}

.analytics-score-card strong {
  display: block;
  margin-top: .45rem;
  color: #f8fbfc;
  font-size: 1.75rem;
  line-height: 1;
}

.analytics-score-card p {
  margin: .5rem 0 0;
  color: rgba(226, 240, 243, .62);
  font-size: .76rem;
}

.score-change {
  display: inline-block;
  margin-top: .65rem;
  color: #58d6ad;
  font-size: .72rem;
  font-weight: 800;
}

.showcase-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.showcase-chart {
  min-height: 280px;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(113, 204, 197, .14);
}

.showcase-chart.chart-wide {
  grid-column: span 2;
}

.showcase-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.trend-good {
  color: #58d6ad;
  font-size: .75rem;
  font-weight: 800;
}

.daily-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: .75rem;
  height: 185px;
  padding-top: .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.daily-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  min-width: 0;
  height: 100%;
}

.daily-column strong {
  color: #eef8fa;
  font-size: .72rem;
}

.daily-bar {
  width: min(34px, 65%);
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #ffd33d, #e8a912);
  box-shadow: 0 0 20px rgba(255, 211, 61, .18);
}

.daily-column span {
  color: rgba(225, 240, 244, .55);
  font-size: .68rem;
}

.result-mix {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1.25rem;
}

.result-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#45d6a4 0 var(--pass), #ef6f78 var(--pass) var(--fail), #f0bc3e var(--fail) 100%);
}

.result-donut::after {
  content: "";
  position: absolute;
  width: 102px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #082b3a;
}

.result-donut strong,
.result-donut span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.result-donut strong {
  font-size: 1.55rem;
}

.result-donut span {
  color: rgba(229, 241, 244, .6);
  font-size: .68rem;
  text-transform: uppercase;
}

.chart-legend {
  display: grid;
  gap: .65rem;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: .55rem;
  color: rgba(231, 244, 247, .72);
  font-size: .76rem;
}

.legend-row i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-row strong {
  color: #f4fafb;
}

.coverage-stack,
.failure-bars,
.duration-list,
.scenario-list {
  display: grid;
  gap: .9rem;
}

.metric-row-head,
.duration-row,
.scenario-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.metric-row-head span,
.duration-row span,
.scenario-row span {
  color: rgba(229, 241, 244, .72);
  font-size: .76rem;
}

.metric-row-head strong,
.duration-row strong,
.scenario-row strong {
  color: #f5fbfc;
  font-size: .78rem;
}

.metric-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #46d3a7;
}

.coverage-row:nth-child(2) .metric-track span { background: #f0bc3e; }
.coverage-row:nth-child(3) .metric-track span { background: #5b91c9; }
.failure-row .metric-track span { background: linear-gradient(90deg, #ef6f78, #f0a247); }

.duration-row,
.scenario-row {
  padding: .72rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.duration-row:last-child,
.scenario-row:last-child {
  border-bottom: 0;
}

.rank-chip {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(255, 211, 61, .12);
  color: #ffd33d;
  font-size: .72rem;
  font-weight: 800;
}

.scenario-row-copy {
  flex: 1;
  min-width: 0;
}

.scenario-row-copy strong,
.scenario-row-copy span {
  display: block;
}

.execution-timeline-wrap {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(111, 205, 199, .14);
  background: rgba(4, 31, 43, .55);
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
}

.execution-timeline {
  display: grid;
  gap: .7rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: .7rem;
}

.timeline-item i {
  width: 10px;
  height: 10px;
  border: 2px solid #082b3a;
  border-radius: 50%;
  background: #46d3a7;
  box-shadow: 0 0 0 2px rgba(70, 211, 167, .28);
}

.timeline-item strong {
  font-size: .76rem;
}

.timeline-item span {
  color: rgba(227, 240, 243, .55);
  font-size: .68rem;
}

.execution-modal[hidden] { display: none; }

.execution-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.execution-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 15, 23, .82);
  backdrop-filter: blur(10px);
}

.execution-modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid rgba(107, 217, 194, .26);
  border-radius: 8px;
  background: #082b3a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.execution-modal-head,
.execution-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.execution-modal-head h2 {
  margin: .25rem 0;
  font-size: 1.35rem;
}

.execution-modal-head p {
  margin: 0;
  color: rgba(230, 242, 245, .65);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #58d6ad;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #58d6ad;
  box-shadow: 0 0 0 5px rgba(88, 214, 173, .12);
  animation: live-pulse 1.4s infinite;
}

.execution-progress {
  height: 8px;
  margin: 1.25rem 0;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
}

.execution-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd33d, #55d6ad);
  transition: width .45s ease;
}

.execution-steps {
  display: grid;
  gap: .55rem;
}

.execution-step {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .025);
}

.execution-step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: rgba(235, 245, 247, .62);
  font-size: .7rem;
  font-weight: 800;
}

.execution-step strong,
.execution-step span {
  display: block;
}

.execution-step strong { font-size: .8rem; }
.execution-step span { margin-top: .18rem; color: rgba(225, 240, 243, .56); font-size: .68rem; }
.execution-step-status { color: rgba(225, 240, 243, .48); font-size: .68rem; }

.execution-step.is-running {
  border-color: rgba(255, 211, 61, .3);
  background: rgba(255, 211, 61, .05);
}

.execution-step.is-running .execution-step-index {
  background: #ffd33d;
  color: #102733;
}

.execution-step.is-complete .execution-step-index {
  background: #46d3a7;
  color: #06272f;
}

.execution-step.is-complete .execution-step-status { color: #58d6ad; }

.execution-result {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 3px solid #46d3a7;
  background: rgba(70, 211, 167, .08);
}

.execution-result strong,
.execution-result span { display: block; }
.execution-result strong { color: #72e2bd; }
.execution-result span { margin-top: .35rem; color: rgba(231, 244, 247, .7); font-size: .76rem; }

.execution-modal-actions {
  align-items: center;
  margin-top: 1.15rem;
}

.execution-modal-actions > span {
  color: rgba(229, 241, 244, .58);
  font-size: .72rem;
}

body.presentation-mode .sidebar,
body.presentation-mode #refresh-btn,
body.presentation-mode #hero-user,
body.presentation-mode .demo-ribbon,
body.presentation-mode .toolbar-group-action,
body.presentation-mode [data-run-id]:disabled,
body.presentation-mode #export-history-btn,
body.presentation-mode .script-workspace-actions,
body.presentation-mode .panel-actions .btn-secondary {
  display: none !important;
}

body.presentation-mode .app-shell {
  grid-template-columns: 1fr;
}

body.presentation-mode .main {
  width: min(1500px, 100%);
  margin: 0 auto;
}

body.presentation-mode .hero {
  position: sticky;
  top: 0;
  z-index: 40;
}

body.presentation-mode .showcase-mode-btn {
  background: #ffd33d;
  color: #102733;
  border-color: #ffd33d;
}

@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.78); opacity: .55; }
}

@media (max-width: 900px) {
  .analytics-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-chart-grid { grid-template-columns: 1fr; }
  .showcase-chart.chart-wide { grid-column: auto; }
}

@media (max-width: 620px) {
  .analytics-hero { align-items: flex-start; flex-direction: column; }
  .analytics-period { width: 100%; }
  .analytics-score-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .analytics-score-card { min-height: 104px; padding: .8rem; }
  .analytics-score-card strong { font-size: 1.35rem; }
  .showcase-chart { min-height: 0; padding: .9rem; }
  .daily-chart { gap: .3rem; height: 160px; }
  .daily-bar { width: 70%; }
  .daily-column span { font-size: .58rem; }
  .result-mix { grid-template-columns: 120px 1fr; gap: .8rem; }
  .result-donut { width: 120px; }
  .result-donut::after { width: 82px; }
  .execution-modal { padding: .5rem; }
  .execution-modal-card { max-height: calc(100vh - 1rem); padding: 1rem; }
  .execution-step { grid-template-columns: 28px 1fr; }
  .execution-step-status { grid-column: 2; }
  body.presentation-mode .hero { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .live-indicator i { animation: none; }
  .execution-progress span { transition: none; }
}

/* Fixed share view: preserve the desktop composition at every viewport. */
body.share-fixed-view {
  min-width: 1280px;
  overflow-x: auto;
}

body.share-fixed-view .app-shell {
  display: grid !important;
  grid-template-columns: 320px minmax(960px, 1fr) !important;
  min-width: 1280px;
}

body.share-fixed-view .sidebar {
  display: block !important;
  position: sticky !important;
  top: 0;
  width: 320px !important;
  min-height: 100vh;
}

body.share-fixed-view .main {
  display: block !important;
  min-width: 960px;
}

body.share-fixed-view [data-side-nav="analytics"],
body.share-fixed-view [data-lab-tab="analytics"] {
  display: none !important;
}
