/* ============================================
   PIPELINE LAYOUT
   CI/CD pipeline visualization components
   ============================================ */

.pipeline {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.pipeline-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2.5rem;
  gap: 2.5rem;
}


/* ============================================
   JOB CARDS
   Individual pipeline job display
   ============================================ */

.job {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 0.625rem;
  background: var(--color-bg-darker);
  color: var(--text-color);
  width: 7.5rem;
  border: 0.125rem solid var(--pipeline-job-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.job:hover {
  box-shadow: 0 0.25rem 0.75rem var(--pipeline-box-shadow);
}


/* ============================================
   ICONS
   Job status icons with animations
   ============================================ */

.icon-wrapper {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
}

.icon {
  font-size: 1.5rem;
  position: relative;
  z-index: 2;
  color: var(--pipeline-job-icon);
}

/* Loading ring animation */
.icon-wrapper::before {
  content: '';
  position: absolute;
  top: -0.375rem;
  left: -0.375rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 0.1875rem solid transparent;
  border-top-color: var(--pipeline-job-border);
  animation: spin 1s linear infinite;
  z-index: 1;
  display: none;
}

.icon-wrapper.running::before {
  display: block;
}

@keyframes spin {
  0% { 
    transform: rotate(0deg); 
  }
  100% { 
    transform: rotate(360deg); 
  }
}


/* ============================================
   LABELS & ARROWS
   Job labels and connectors
   ============================================ */

.label {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.arrow {
  font-size: 2rem;
  color: var(--text-color);
}


/* ============================================
   STATUS COLORS
   Job status indicators
   ============================================ */

.success { 
  color: var(--color-primary); 
}

.failed { 
  color: #ff0033; 
}

.pending { 
  color: var(--color-primary); 
}


/* ============================================
   FILE BROWSER
   Repository file tree
   ============================================ */

.file-tree {
  list-style: none;
  padding-left: 1rem;
  color: var(--text-color);
  font-family: 'Montserrat', monospace;
}

.file-tree li {
  cursor: pointer;
  margin-bottom: 0.3125rem;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.file-tree li:hover {
  text-decoration: underline;
  color: var(--job-border-color);
}

#back-to-browser {
  margin-bottom: 0.625rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  padding: 0.125rem 0.3125rem;
  transition: all 0.3s ease;
}

#back-to-browser:hover {
  background-color: var(--highlight-paragraph-bg);
  color: var(--job-border-color);
}


/* ============================================
   CODE HIGHLIGHTING
   Syntax highlighting overrides
   ============================================ */

.token {
  background: none !important;
  box-shadow: none !important;
}


/* ============================================
   RESPONSIVE DESIGN
   Mobile pipeline layout
   ============================================ */

/* Tablet: up to 1024px */
@media (max-width: 64rem) {
  .pipeline {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: space-evenly;
  }

  .pipeline-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .job {
    width: 9.375rem;
    align-items: center;
    display: flex;
    justify-content: space-evenly;
  }

  .icon {
    font-size: 1rem;
  }

  .icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
  }

  .label {
    font-size: 1rem;
    text-align: center;
  }

  .arrow {
    display: none;
  }

  .file-tree li {
    font-size: 0.8rem;
  }

  #back-to-browser {
    font-size: 0.8rem;
  }
}

/* Mobile: up to 768px */
@media (max-width: 48rem) {
  .pipeline {
    flex-direction: column;
    align-items: center;
  }

  .job {
    width: 100%;
    margin-bottom: 1rem;
  }

  .icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
  }

  .icon {
    font-size: 2rem;
  }

  .label {
    font-size: 0.5rem;
  }

  .arrow {
    display: none;
  }
}
