/* ============================================================
   Pipeline Minimal Theme — Clean, sparse, typography-focused
   ============================================================ */

body.pipeline-page.theme-minimal footer,
.pipeline-main ~ footer,
footer.site-footer {
  position: static !important;
}

body.pipeline-page.theme-minimal main,
main.pipeline-main {
  padding-bottom: 2rem !important;
}

/* ---------- Minimal loader ---------- */
.theme-minimal .pipeline-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
}

.theme-minimal .pipeline-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.theme-minimal .pipeline-loader-ring {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #374151;
  border-radius: 50%;
  animation: pipeline-spin-minimal 0.8s linear infinite;
}

@keyframes pipeline-spin-minimal {
  to { transform: rotate(360deg); }
}

.theme-minimal .pipeline-loader-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0;
}

/* ---------- Minimal phase filter ---------- */
.theme-minimal .phase-filter-sticky {
  position: sticky;
  top: 60px;
  z-index: 95;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.theme-minimal .phase-filter-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  white-space: nowrap;
}

.theme-minimal .phase-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.theme-minimal button.phase-chip-btn,
.theme-minimal .phase-chip-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  line-height: 1.25;
  transition: all 0.15s ease;
}

.theme-minimal button.phase-chip-btn:hover,
.theme-minimal .phase-chip-btn:hover {
  border-color: #9ca3af;
  background: #f3f4f6;
  color: #111827;
}

.theme-minimal button.phase-chip-btn.active,
.theme-minimal .phase-chip-btn.active {
  background: #374151;
  color: #fff;
  border-color: #374151;
}

/* Remove color coding from phases in minimal mode */
.theme-minimal .phase-chip-btn.phase-procurement,
.theme-minimal .phase-chip-btn.phase-design,
.theme-minimal .phase-chip-btn.phase-construction,
.theme-minimal .phase-chip-btn.phase-testing,
.theme-minimal .phase-chip-btn.phase-operation {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

.theme-minimal .phase-chip-btn.phase-procurement.active,
.theme-minimal .phase-chip-btn.phase-design.active,
.theme-minimal .phase-chip-btn.phase-construction.active,
.theme-minimal .phase-chip-btn.phase-testing.active,
.theme-minimal .phase-chip-btn.phase-operation.active {
  background: #374151 !important;
  color: #fff !important;
}

/* ---------- Minimal stats ---------- */
.theme-minimal .pipeline-stats-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #6b7280;
}

.theme-minimal .pipeline-stats-strip strong {
  font-weight: 600;
  color: #111827;
}

.theme-minimal .pipeline-stats-strip .stats-cta {
  margin-left: auto;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.theme-minimal .pipeline-stats-strip .stats-cta:hover {
  color: #111827;
}

/* ---------- Minimal container ---------- */
.theme-minimal .pipeline-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  padding: 1.25rem !important;
  background: #fff !important;
  border-radius: 8px !important;
  border: 1px solid #e5e7eb !important;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.theme-minimal .pipeline-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.theme-minimal .toolbar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-minimal .toolbar-title-row h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0;
  line-height: 1.25;
}

.theme-minimal .results-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

/* ---------- Minimal filters ---------- */
.theme-minimal .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.theme-minimal .filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.theme-minimal .filter-field > span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.theme-minimal .filter-field select,
.theme-minimal .filter-field input {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  background: #fff;
  min-height: 36px;
  max-width: 160px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.theme-minimal .filter-field select:focus,
.theme-minimal .filter-field input:focus {
  outline: none;
  border-color: #9ca3af;
}

.theme-minimal .filter-field.filter-search {
  flex: 1 1 200px;
  min-width: 160px;
}

.theme-minimal .filter-field.filter-search input {
  max-width: none;
  width: 100%;
  min-width: 160px;
}

.theme-minimal .filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.theme-minimal .btn-tool {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s ease;
}

.theme-minimal .btn-tool:hover {
  border-color: #9ca3af;
  color: #374151;
  background: #f9fafb;
}

.theme-minimal .zoom-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  min-width: 2.5rem;
}

/* ---------- Minimal Gantt container ---------- */
.theme-minimal .gantt-container {
  position: relative;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafbfc;
}

.theme-minimal .gantt-wrapper {
  display: flex;
  min-width: min-content;
  font-size: 13px;
  line-height: 1.4;
}

/* Minimal gantt labels */
.theme-minimal .gantt-labels {
  flex: 0 0 280px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
}

.theme-minimal .gantt-label-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  min-height: 50px;
}

.theme-minimal .gantt-label-item a {
  color: #4b5563;
  text-decoration: none;
  font-weight: 600;
}

.theme-minimal .gantt-label-item a:hover {
  color: #111827;
}

/* Minimal gantt bars */
.theme-minimal .gantt-bars {
  flex: 1;
  overflow-x: auto;
  background: #fafbfc;
}

.theme-minimal .gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
  min-height: 50px;
  position: relative;
}

.theme-minimal .gantt-bar-container {
  position: relative;
  height: 28px;
  margin: auto 0;
  flex: 1;
  min-width: 400px;
}

.theme-minimal .gantt-bar {
  position: absolute;
  height: 100%;
  background: #9ca3af;
  border-radius: 3px;
  opacity: 0.7;
  transition: all 0.15s ease;
}

.theme-minimal .gantt-bar:hover {
  opacity: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-minimal .gantt-bar-label {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/* Guest blur in minimal mode */
.theme-minimal .gantt-label-item.guest-locked,
.theme-minimal .gantt-row.guest-locked {
  filter: blur(4px);
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
}

.theme-minimal .project-card.guest-locked {
  position: relative;
  overflow: hidden;
  filter: blur(4px);
  opacity: 0.6;
}

.theme-minimal .project-card .guest-lock-badge {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  filter: none;
  pointer-events: auto;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7280;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.95) 35%);
  padding: 1.5rem 0.75rem 0.5rem;
}

/* Gate messaging */
.theme-minimal .pipeline-guest-gate {
  grid-column: 1 / -1;
  margin: 0.75rem 0;
}

.theme-minimal .pipeline-guest-gate-inner {
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  box-shadow: none;
}

.theme-minimal .pipeline-guest-gate-inner strong {
  display: block;
  font-size: 1rem;
  color: #111827;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.theme-minimal .pipeline-guest-gate-inner p {
  margin: 0 0 0.75rem;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.theme-minimal .pipeline-guest-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.theme-minimal .btn-gate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: all 0.15s ease;
}

.theme-minimal .btn-gate.primary {
  background: #374151;
  color: #fff;
  border: 1px solid #374151;
}

.theme-minimal .btn-gate.primary:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.theme-minimal .btn-gate.secondary {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.theme-minimal .btn-gate.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .theme-minimal .phase-filter-sticky {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .theme-minimal .phase-filter-label {
    width: 100%;
    text-align: center;
  }

  .theme-minimal .filter-bar {
    width: 100%;
    gap: 0.5rem;
  }

  .theme-minimal .filter-field select,
  .theme-minimal .filter-field input {
    max-width: none;
    width: 100%;
  }

  .theme-minimal .filter-actions {
    margin-left: 0;
    width: 100%;
  }

  .theme-minimal .gantt-labels {
    flex: 0 0 200px;
  }
}
