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

.case-readonly-banner {
  margin: 0;
  padding: 0.55rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.case-workspace--readonly [data-action="upload-slot"],
.case-workspace--readonly [data-action="replace-slot-document"],
.case-workspace--readonly [data-action="clear-slot-document"],
.case-workspace--readonly [data-action="add-optional-slot"],
.case-workspace--readonly [data-action="add-custom-slot"],
.case-workspace--readonly [data-action="submit-evrim"],
.case-workspace--readonly [data-action="submit-tobb"],
.case-workspace--readonly .case-doc-slot-file-input {
  display: none !important;
}

.case-workspace--readonly [data-action="gtip-tariff-batch"],
.case-workspace--readonly [data-action="gtip-refresh-gv"],
.case-workspace--readonly [data-action="gtip-export-legislation"],
.case-workspace--readonly [data-action="gtip-discover"],
.case-workspace--readonly [data-action="add-product-line"],
.case-workspace--readonly [data-action="delete-product-line"],
.case-workspace--readonly [data-action="gtip-tax-edit"],
.case-workspace--readonly [data-action="gtip-tax-approve"],
.case-workspace--readonly [data-action="gtip-tax-cancel"],
.case-workspace--readonly [data-action="gtip-tax-revoke"],
.case-workspace--readonly [data-action="gtip-gv-approve"],
.case-workspace--readonly [data-action="gtip-gv-revoke"],
.case-workspace--readonly [data-action="gtip-gv-reset"],
.case-workspace--readonly [data-action="gtip-apply-gv-suggestion"],
.case-workspace--readonly [data-action="gtip-select-alt"] {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

.case-workspace--readonly .declaration-editor input,
.case-workspace--readonly .declaration-editor textarea,
.case-workspace--readonly .declaration-editor select,
.case-workspace--readonly .case-operator input,
.case-workspace--readonly .case-operator textarea,
.case-workspace--readonly .case-operator select,
.case-workspace--readonly .case-operator .new-case-picker-field,
.case-workspace--readonly .case-operator [data-action="operator-open-fx-modal"],
.case-workspace--readonly .case-operator [data-action="open-kbf-form"] {
  pointer-events: none;
  opacity: 0.85;
}

.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-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.case-workspace-repeat,
.case-workspace-assign,
.case-workspace-share,
.case-workspace .case-workspace-close {
  min-height: 2.25rem;
  border-radius: var(--radius-md);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.case-workspace-repeat {
  padding: 0 0.75rem;
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  color: #64748b;
}

.case-workspace-assign,
.case-workspace-share {
  padding: 0 0.75rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.case-workspace-assign:hover,
.case-workspace-share:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.case-workspace-repeat:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.case-workspace .case-workspace-close {
  width: auto;
  gap: 0.375rem;
  padding: 0 0.75rem;
  border-color: #fecaca;
  color: #dc2626;
}

.case-workspace .case-workspace-close:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.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-wizard-nav-country-groups {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
}

.case-wizard-nav-country-groups-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  color: var(--color-text-muted);
}

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

.case-wizard-nav-mevzuat {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  border: none;
  border-radius: var(--radius-md, 8px);
  background: #c62828;
  color: #fff;
  font-weight: 600;
  padding: 0 0.85rem;
  cursor: pointer;
}

.case-wizard-nav-mevzuat:hover {
  background: #b71c1c;
}

.case-wizard-nav-mevzuat:focus-visible {
  outline: 2px solid #ef9a9a;
  outline-offset: 2px;
}

.case-wizard-nav-mevzuat-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  color: inherit;
}

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

.case-wizard-nav-tps {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md, 8px);
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  padding: 0 0.85rem;
  cursor: pointer;
}

.case-wizard-nav-tps:hover {
  background: #eef2f7;
}

.case-wizard-nav-tps:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.case-wizard-nav-tps-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.case-wizard-nav-tps-badge--pending {
  background: #2563eb;
  min-width: 1.35rem;
}

.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-wizard-header-actions {
    order: 0;
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .case-workspace-repeat,
  .case-workspace .case-workspace-close {
    padding-inline: 0.5rem;
    font-size: 0.625rem;
  }
}

/* ── Paylaşılan kullanıcı listesi (unshare) ──────────────────────── */

.case-shared-section {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.case-shared-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.case-shared-users {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.case-shared-user {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.1rem 0.3rem;
  padding-right: 0.1rem;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 0.6875rem;
  color: #334155;
  white-space: nowrap;
}

.case-shared-user-name {
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-unshare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.12s, background 0.12s;
}

.case-unshare-btn:hover {
  color: #dc2626;
  background: #fef2f2;
}

.case-unshare-btn svg {
  width: 0.75rem;
  height: 0.75rem;
}

.case-unshare-self-btn {
  font-size: 0.6875rem !important;
  padding: 0.1rem 0.5rem !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  white-space: nowrap;
}

.case-unshare-self-btn:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
}

.case-shared-section--manager {
  gap: 0.55rem;
}

.case-share-flow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  max-width: 18rem;
}

.case-share-from,
.case-share-to {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.5rem;
}

.case-share-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}

.case-unshare-all-btn {
  font-size: 0.6875rem !important;
  padding: 0.15rem 0.55rem !important;
  border: 1px solid #fca5a5 !important;
  background: #fff !important;
  color: #dc2626 !important;
  white-space: nowrap;
}

.case-unshare-all-btn:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  color: #b91c1c !important;
}
