/**
 * Wizard üst bar — stepper + özet şeridi
 */

.case-wizard-header {
  flex-shrink: 0;
  background: var(--color-workspace);
  border-bottom: 1px solid var(--color-border-light);
}

.case-wizard-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.875rem;
}

.case-wizard-stepper {
  flex: 1;
  min-width: 0;
}

.case-wizard-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.case-wizard-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.case-wizard-step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}

.case-wizard-step-btn:hover:not(:disabled) .case-wizard-step-label {
  color: #2563eb;
}

.case-wizard-step-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.case-wizard-step-btn:disabled {
  cursor: default;
}

.case-wizard-step--locked .case-wizard-step-btn {
  cursor: not-allowed;
}

.case-wizard-step-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  flex-shrink: 0;
  z-index: 1;
}

.case-wizard-step-marker--done {
  background: #22c55e;
  color: #fff;
}

.case-wizard-step-marker--done svg {
  width: 1rem;
  height: 1rem;
}

.case-wizard-step-marker--active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.case-wizard-step-marker--pending {
  background: #f3f4f6;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
}

.case-wizard-step-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.25;
  color: #9ca3af;
  font-weight: var(--font-weight-medium);
  max-width: 7rem;
}

.case-wizard-step--active .case-wizard-step-label {
  color: #2563eb;
  font-weight: var(--font-weight-semibold);
}

.case-wizard-step--done .case-wizard-step-label {
  color: #6b7280;
}

.case-wizard-step-connector {
  position: absolute;
  top: 1rem;
  left: calc(50% + 1rem);
  width: calc(100% - 2rem);
  height: 2px;
  transform: translateY(-50%);
  z-index: 0;
}

.case-wizard-step-connector--done {
  background: #22c55e;
}

.case-wizard-step-connector--active {
  background: linear-gradient(90deg, #2563eb 0%, #e5e7eb 100%);
}

.case-wizard-step-connector--pending {
  background: #e5e7eb;
}

.case-wizard-summary {
  display: flex;
  align-items: stretch;
  margin: 0 1.25rem 1rem;
  padding: 0.875rem 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.case-wizard-summary-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 1rem;
  min-width: 7.5rem;
  flex: 1 0 auto;
}

.case-wizard-summary-label {
  font-size: 0.625rem;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.case-wizard-summary-value {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.3;
  white-space: nowrap;
}

.case-wizard-summary-value--transport {
  color: #2563eb;
}

.case-wizard-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #9ca3af;
}

.case-wizard-summary-icon svg {
  width: 100%;
  height: 100%;
}

.case-wizard-summary-icon--transport {
  color: #2563eb;
}

.case-wizard-summary-icon--transport svg {
  width: 1.125rem;
  height: 1.125rem;
}

.case-wizard-summary-divider {
  align-self: stretch;
  width: 1px;
  background: var(--color-border-light);
  flex-shrink: 0;
}

.case-workspace .case-workspace-close {
  flex-shrink: 0;
}

.case-workspace .case-detail-header,
.case-workspace .case-detail-tabs {
  display: none;
}

.case-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.case-wizard-nav-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.case-decl-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.case-wizard-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.case-wizard-nav-prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: #374151;
  font-family: inherit;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.case-wizard-nav-prev:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
}

.case-wizard-nav-prev:active {
  background: #f3f4f6;
}

.case-wizard-nav-prev-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
}

.case-wizard-nav-prev-icon svg {
  width: 100%;
  height: 100%;
}

.case-wizard-nav-next {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0 2rem;
  border: none;
  border-radius: var(--radius-lg);
  background: #2563eb;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.case-wizard-nav-next:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.34);
}

.case-wizard-nav-next:active {
  transform: translateY(1px);
}

.case-wizard-nav-next-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
}

.case-wizard-nav-next-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .case-wizard-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .case-wizard-nav-actions {
    width: 100%;
    margin-left: 0;
    flex-direction: column-reverse;
  }

  .case-wizard-nav-prev,
  .case-wizard-nav-next {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .case-wizard-step-label {
    font-size: 0.625rem;
    max-width: 4.25rem;
  }

  .case-wizard-summary-item {
    min-width: 6.5rem;
    padding: 0 0.75rem;
  }
}

@media (max-width: 900px) {
  .case-wizard-header-top {
    flex-wrap: wrap;
  }

  .case-wizard-stepper {
    order: 1;
    width: 100%;
  }

  .case-workspace .case-workspace-close {
    order: 0;
    margin-left: auto;
  }
}
