/* Vendor-spezifische Styles ausgelagert aus den Templates. */

/* Skalierung der Vendor-Ansicht (entspricht ~25 % Zoom-Out) */
html.vendor-view {
  --ui-scale: 0.675;
}

/* Lieferantenliste */
.vendor-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vendor-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: var(--font-size-sm-lg);
}

.language-switch__options {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.language-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid color-mix(in srgb, var(--muted) 25%, var(--border));
  background: color-mix(in srgb, var(--muted) 12%, #ffffff);
  transition: color 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

.language-switch__link:hover,
.language-switch__link:focus-visible {
  color: var(--text);
  border-color: color-mix(in srgb, var(--muted) 45%, var(--border));
  background: color-mix(in srgb, var(--muted) 18%, #ffffff);
  outline: none;
}

.language-switch__link.is-active {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent-strong);
}

.vendor-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vendor-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vendor-meta-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: flex-start;
}

.vendor-detail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vendor-address {
  margin: 0;
  color: var(--muted);
}

.vendor-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vendor-contact-details {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
  row-gap: 0.25rem;
}

.vendor-currency {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.table-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Detailansicht */
.page-hero {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 0.25rem 0 0.5rem;
  line-height: 1.5;
}

.page-hero__header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.page-title {
  font-size: 1.9rem;
  line-height: 1.15;
}

.page-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.page-title-meta {
  color: var(--muted);
  font-weight: 600;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: calc(var(--card-padding) * 1.5);
}

.hero-card__titles {
  display: grid;
  gap: 0.15rem;
  align-content: start;
  padding-bottom: 0.35rem;
}

.hero-card__titles .eyebrow,
.hero-card__titles .hero-card-title {
  margin: 0;
}

.hero-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card-title {
  margin: 0;
}

.hero-columns {
  display: grid;
  gap: 0.55rem;
}

.hero-columns--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-columns--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-columns--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hero-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
}

.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin: 0 0 0.2rem;
}

.hero-field-heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-field-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.hero-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) 1.35fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.25rem 0;
}

.hero-field-row-value {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-field-row-value .muted {
  margin-top: 0.1rem;
}

.hero-field-row-value .pill,
.hero-field .pill {
  align-self: flex-start;
}

.hero-order-number {
  font-weight: 800;
  font-size: 1.1rem;
}

.hero-total-amount {
  font-size: 1.25rem;
  font-weight: 700;
}

.section-heading > .eyebrow,
.section-heading h1,
.section-heading h2,
.section-heading h3,
.section-heading .order-title {
  margin: 0;
}

.section-heading {
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.company-footer {
  margin: 0;
  line-height: 1.5;
}

.company-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
  padding: calc(var(--card-padding) * 1.5);
  gap: 0.35rem;
}

.status-card__titles {
  display: grid;
  gap: 0.15rem;
  align-content: start;
  padding-bottom: 0.35rem;
}

.status-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--background) 80%, #ffffff);
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.status-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px -18px rgba(0, 0, 0, 0.6);
}

.status-card__meta-icon {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.status-card__meta-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-card__meta-value {
  font-size: 1rem;
}

.status-timeline {
  --workflow-color-upcoming: color-mix(in srgb, var(--muted) 75%, #000000);
  --workflow-color-current: #dc2626;
  --workflow-color-complete: #15803d;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.1rem 0 0;
  align-items: stretch;
}

.status-step {
  display: grid;
  grid-template-columns: minmax(8.5rem, 10rem) auto minmax(0, 1fr) auto;
  gap: 0.6rem 0.85rem;
  align-items: center;
  padding: 0.55rem 0;
  border-radius: 0;
  border: none;
  background: none;
  width: 100%;
  border-bottom: 1px solid var(--border);
  min-height: 2.5rem;
}

.status-step__time {
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-inline-end: 0;
  white-space: nowrap;
}

.status-step__time-value {
  line-height: 1.2;
}

.status-step__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.status-step__icon-col {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  justify-self: end;
}

.status-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.status-step__icon svg {
  width: 100%;
  height: 100%;
}

.status-step.is-complete .status-step__icon,
.status-step.is-current .status-step__icon {
  color: var(--accent-strong);
}

.status-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  justify-content: center;
  align-items: flex-start;
}

.status-step__title {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  min-width: 0;
}

.status-step__title span {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.status-step__marker-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--workflow-color-upcoming);
}

.status-step__value {
  margin: 0;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.status-step__tag {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 80%, #ffffff);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.2;
  justify-self: center;
  text-align: center;
  min-width: 0;
  max-width: 12rem;
  white-space: normal;
  word-break: break-word;
  min-height: 0;
  box-shadow: 0 6px 14px -14px rgba(0, 0, 0, 0.65);
}

.status-step__tag-dot {
  display: inline-flex;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--workflow-color-upcoming);
  flex-shrink: 0;
}

.status-step__tag-label {
  line-height: 1.2;
}

.status-step.is-complete .status-step__tag,
.status-step.is-current .status-step__tag {
  border: 1px solid color-mix(in srgb, currentColor 30%, var(--border));
  background: color-mix(in srgb, currentColor 12%, #ffffff);
}

.status-step.is-complete .status-step__marker-dot,
.status-step.is-complete .status-step__tag,
.status-step.is-complete .status-step__tag-dot {
  color: var(--workflow-color-complete);
}

.status-step.is-complete .status-step__tag-dot,
.status-step.is-complete .status-step__marker-dot {
  background: var(--workflow-color-complete);
}

.status-step.is-current .status-step__marker-dot,
.status-step.is-current .status-step__tag,
.status-step.is-current .status-step__tag-dot {
  color: var(--workflow-color-current);
}

.status-step.is-current .status-step__tag-dot,
.status-step.is-current .status-step__marker-dot {
  background: var(--workflow-color-current);
}

.status-step.is-upcoming .status-step__tag-dot,
.status-step.is-upcoming .status-step__marker-dot {
  background: var(--workflow-color-upcoming);
}

@media (max-width: 860px) {
  .status-step {
    grid-template-columns: minmax(6.5rem, 0.9fr) auto minmax(0, 1fr) auto;
    align-items: start;
    row-gap: 0.45rem;
  }
}

.order-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.45rem;
  margin: 0;
}

.order-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.order-section-heading {
  gap: 0.75rem;
}

.order-section-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.order-export-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-end;
}

.order-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  display: inline-block;
  margin-left: 0.6rem;
}

.order-lead {
  max-width: 78ch;
}

.footer-entry {
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.footer-label {
  color: var(--muted);
  font-weight: 600;
}

.note-entry + .note-entry {
  border-top: 1px solid var(--border-strong);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.version-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.version-banner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: -0.25rem 0 0.25rem;
  line-height: 1.1;
  padding: 0.1rem 0;
}

.language-switch--banner {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.positions-table thead th {
  text-align: center;
}

.positions-table tbody td {
  white-space: nowrap;
}

.positions-table tbody td.position-title,
.positions-table tbody td.position-description {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.positions-table tbody td.position-description {
  max-width: 36ch;
  color: var(--muted);
  font-weight: 600;
}

/* Layout-Korrekturen */
.content.vendor-detail-page {
  padding: calc(var(--content-padding-vertical) * 0.7)
    calc(var(--content-padding-horizontal) * 0.7);
  gap: 1.1rem;
  min-height: auto;
}

.vendor-detail-page .card {
  padding: 2.25rem;
}

/* Breakpoints */
@media (max-width: 1280px) {
  .hero-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .hero-columns--four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-columns--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .company-footer-grid {
    grid-template-columns: 1fr;
  }

  .company-footer-grid > .stack:not(:first-child) {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 0.5rem;
  }

  .hero-columns--four,
  .hero-columns--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: calc(var(--card-padding) * 1.4);
  }

  .hero-grid > .hero-card:not(:first-child) {
    border-top: 1px solid var(--border);
    margin-top: 0.35rem;
    padding-top: calc(var(--card-padding) * 1.1);
  }
}

@media (max-width: 640px) {
  .vendor-orders-page .card {
    padding: 1.1rem;
  }

  .vendor-orders-page {
    padding: 1rem;
  }

  .hero-columns--two,
  .hero-columns--four,
  .hero-columns--six {
    grid-template-columns: 1fr;
  }

  table tbody td,
  table thead th {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
}
