/* ============================================
   KNOMAD WORKFLOW GUIDE MODAL
   Professional styling with Segoe UI font
   ============================================ */

.workflow-guide-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Segoe UI', sans-serif;
}

.workflow-guide-modal.open {
  opacity: 1;
}

.workflow-guide-modal.closing {
  opacity: 0;
}

.workflow-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.workflow-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: var(--surface-panel);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.workflow-guide-modal.open .workflow-modal-content {
  transform: scale(1);
}

.workflow-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 2px solid var(--border-default);
  background: linear-gradient(135deg, var(--surface-panel) 0%, var(--surface-muted) 100%);
}

.workflow-modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}

.workflow-modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.workflow-modal-close:hover {
  background: var(--surface-muted-strong);
  color: var(--text-primary);
}

.workflow-modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.6;
}

/* Scrollbar styling */
.workflow-modal-body::-webkit-scrollbar {
  width: 8px;
}

.workflow-modal-body::-webkit-scrollbar-track {
  background: var(--surface-muted);
  border-radius: 4px;
}

.workflow-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 4px;
}

.workflow-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Section styling */
.workflow-section {
  margin-bottom: 32px;
}

.workflow-section:last-child {
  margin-bottom: 0;
}

.workflow-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-primary);
  font-family: 'Segoe UI', sans-serif;
}

.workflow-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 12px 0;
  font-family: 'Segoe UI', sans-serif;
}

.workflow-section p {
  margin: 0 0 16px 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: 'Segoe UI', sans-serif;
}

.workflow-section p:last-child {
  margin-bottom: 0;
}

/* List styling */
.workflow-list {
  margin: 0 0 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.workflow-list li {
  margin-bottom: 12px;
  line-height: 1.6;
}

.workflow-list li:last-child {
  margin-bottom: 0;
}

.workflow-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.workflow-list-compact {
  margin: 12px 0;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.workflow-list-compact li {
  margin-bottom: 6px;
  line-height: 1.5;
  font-family: 'Segoe UI', sans-serif;
}

/* References section */
.workflow-references {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.workflow-references h4 {
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.workflow-references-list {
  margin: 0;
  padding-left: 24px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.workflow-references-list li {
  margin-bottom: 12px;
  font-family: 'Segoe UI', sans-serif;
}

.workflow-references-list li:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .workflow-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .workflow-modal-header {
    padding: 16px 20px;
  }

  .workflow-modal-title {
    font-size: 18px;
  }

  .workflow-modal-body {
    padding: 16px;
  }

  /* Force all inline grid layouts to single-column on phone screens.
     The about modal uses inline style="display:grid; grid-template-columns: 1fr 1fr"
     so !important is required to override inline styles — standard pattern. */
  .workflow-modal-body [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Tables: horizontal scroll instead of breaking layout */
  .workflow-modal-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .workflow-section h3 {
    font-size: 18px;
  }

  .workflow-section h4 {
    font-size: 15px;
  }
}
