/* =========================
   Base Styles
   ========================= */

/* Base */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f0f0f0;   /* light gray everywhere */
}

/* Header stays white */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #fff;       /* keep header white */
  border-bottom: 4px solid #FFD200;
}


.logo {
  font-weight: bold;
}

.logo-img {
  height: 40px;
}

/* =========================
   Tabs
   ========================= */
.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* =========================
   Navigation Buttons
   ========================= */
nav button {
  margin-left: 5px;
  padding: 6px 12px;
  border: 1px solid #ffd100;
  border-radius: 8px;
  cursor: pointer;
}

nav button.active {
  background: #ffd100;
}

/* =========================
   Execution Lines
   ========================= */
.execs-line {
  margin: 10px 0;
  padding: 6px;
  white-space: nowrap;
  overflow-x: auto;
}

.execs-line a {
  margin: 0 6px;
  text-decoration: none;
  color: #000;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.execs-line a:hover {
  border: 1px solid #ffd100;
}

.execs-line a.active {
  background: #ffd100;
  border: 1px solid #ffd100;
  border-radius: 6px;
}

/* Execution link styled like nav buttons */
.exec-link {
  display: inline-block;
  margin: 4px 0;
  padding: 6px 12px;
  border: 1px solid #FFD200;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  color: #000;
  transition: background 0.2s, border-color 0.2s;
}

.exec-link:hover {
  background: rgba(255, 210, 0, 0.15); /* soft yellow hover */
}

.exec-link.active {
  background: #FFD200;
  font-weight: bold;
}


/* =========================
   Step Boxes
   ========================= */
.step-box {
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 80%;
  border: 2px solid #ffd100;   /* yellow border */
  margin-left: 10px;
  background: #fff;
}

.step-box.passed {
  background: #fff !important;
  border-left: 6px solid #2e7d32;
}

.step-box.running {
  background: #ccc;
  border-left: 6px solid #ffd100;
}

.step-box.pending {
  background: #fff;
  border-left: 6px solid #999;
}

.step-box.running { border-left: 3px solid #3b82f6; } /* blue */
.step-box.pending { border-left: 3px solid #9ca3af; } /* gray */
.step-box.passed  { border-left: 3px solid #10b981; } /* green */
.step-box.failed  { border-left: 3px solid #ef4444; } /* red */

/* =========================
   Fade Animation
   ========================= */
.fade {
  animation: fade 1.5s infinite alternate;
}

@keyframes fade {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

/* =========================
   Details Panel
   ========================= */
.details {
  margin-left: 10px;
}

.details-column {
  min-width: 0; /* prevent overflow */
}

.details-card {
  background: #fff;
  border: 1px solid #eee;
  border-left: 4px solid #FFD200;
  border-radius: 8px;
  padding: 12px;
}

.running-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

/* =========================
   Completed Test Boxes
   ========================= */
.test-box {
  border: 2px solid #ffd100;
  max-width: 80%;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0 8px 10px;
  background: #fff;
  cursor: pointer;
}

.test-toggle {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
}

.test-toggle .chev {
  font-size: 0.9em;
  color: #555;
}

.test-step {
  border: 1px solid #999;
  border-radius: 6px;
  padding: 4px 8px;
  margin: 4px 0;
  background: #f9f9f9;
}

/* =========================
   Utility
   ========================= */
[hidden] {
  display: none !important;
}

/* =========================
   Blink Animation for Status
   ========================= */
.status-blink {
  animation: blink-animation 2s steps(2, start) infinite;
}

@keyframes blink-animation {
  to { visibility: hidden; }
}

/* =========================
   Icons
   ========================= */
.icon-running {
  color: green;
  width: 18px;
  height: 18px;
}

/* =========================
   Control Buttons (Play / Pause)
   ========================= */
.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid #FFD200;
  border-radius: 6px;
  background: transparent;
  font-weight: bold;
  cursor: pointer;
  color: black;
  line-height: 1;
}

.control-btn svg {
  stroke: #FFD200;
  width: 18px;
  height: 18px;
}

.control-btn:hover {
  background: rgba(255, 210, 0, 0.15);
}

/* =========================
   Slider (Level Filter)
   ========================= */
#max-level {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  outline: none;
  margin-right: 10px;
}

/* WebKit Track */
#max-level::-webkit-slider-runnable-track {
  height: 4px;
  background: #FFD200;
  border-radius: 2px;
}

/* Firefox Track */
#max-level::-moz-range-track {
  height: 4px;
  background: #FFD200;
  border-radius: 2px;
}

/* WebKit Thumb */
#max-level::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFD200;
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: -5px;
}

/* Firefox Thumb */
#max-level::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFD200;
  border: 2px solid #fff;
  cursor: pointer;
}

/* =========================
   Two-Column Layout
   ========================= */
.pane {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
  background: #f0f0f0;
  padding: 12px;
  border-radius: 8px;  
}

.list-column {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}

.pane-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

/* =========================
   Login Page
   ========================= */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 80px);
}

.login-box {
  width: 320px;
  padding: 20px;
  background: #fff;
  border: 2px solid #FFD200;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.login-box h2 {
  margin-top: 0;
  text-align: center;
  color: #333;
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.login-box button {
  width: 100%;
  margin-top: 10px;
}

.messages {
  margin-top: 12px;
  padding: 0;
  list-style: none;
  font-size: 0.9em;
  color: red;
}
