/*
 * Shared EN/DE layout stability layer.
 * Uses real application labels and never replaces copy with CSS.
 * R45 keeps long locale labels away from the language/account action cluster.
 */
:is(html[lang="en"], html[lang="de"]) .customer-site .header-inner {
  width: 100%;
  max-width: 1760px;
  gap: 12px;
  padding-inline: 20px;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header .logo {
  flex: 0 0 136px;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav {
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav > button {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  padding-inline: 6px;
  font-size: 13px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header .header-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  gap: 6px;
  margin-left: auto;
  background: #fff;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header .auth-actions {
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

:is(html[lang="en"], html[lang="de"]) .cats-connection-state {
  z-index: 40;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header .account-button > div {
  min-width: 0;
  max-width: 120px;
}

:is(html[lang="en"], html[lang="de"]) .customer-site .site-header .account-button :is(strong, small) {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

:is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
  button,
  label,
  legend,
  th,
  dt,
  .portal-heading,
  .form-section,
  .customer-panel,
  .workspace-section
) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

:is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
  .portal-heading p,
  .form-section p,
  .customer-panel p,
  .workspace-section p
) {
  line-height: 1.55;
}

:is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
  .form-actions,
  .confirmation-actions,
  .success-actions
) > button,
:is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) .quotation-actions button {
  min-height: 44px;
  height: auto;
  padding-block: 9px;
  font-size: 13.5px;
  line-height: 1.35;
}

:is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
  .table-wrap,
  .workspace-table-wrap,
  .statement-table-wrap
) {
  overflow-x: auto;
  scrollbar-gutter: stable;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-zone__toolbar,
  .cats-id-modal__actions,
  .cats-missing-modal__actions
) > button,
:is(html[lang="en"], html[lang="de"]) .cats-id-zone__back,
:is(html[lang="en"], html[lang="de"]) .cats-id-pagination button,
:is(html[lang="en"], html[lang="de"]) .cats-id-card button {
  min-height: 44px !important;
  height: auto;
  padding-block: 9px;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

:is(html[lang="en"], html[lang="de"]) .cats-package-lightbox__close {
  width: 44px;
  height: 44px;
  min-height: 44px;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-modal__files,
  .cats-missing-modal__files
) li {
  grid-template-columns: 42px minmax(0, 1fr) 44px;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-modal__files,
  .cats-missing-modal__files
) button {
  width: 44px;
  min-height: 44px;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-modal__panel,
  .cats-missing-modal__panel
) {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-modal,
  .cats-missing-modal
) :is(input, select, textarea) {
  font-size: 16px;
}

:is(html[lang="en"], html[lang="de"]) .cats-id-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

:is(html[lang="en"], html[lang="de"]) .cats-id-card h3 {
  overflow-wrap: anywhere;
  word-break: normal;
}

:is(html[lang="en"], html[lang="de"]) .cats-id-card__details dd {
  overflow-wrap: normal;
  word-break: normal;
}

:is(html[lang="en"], html[lang="de"]) .cats-id-card__details > div {
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-id-card__label,
  .cats-id-card__details dt,
  .cats-id-pagination button,
  .cats-id-pagination span,
  .cats-id-browser__meta > strong
) {
  font-size: 13px;
}

:is(html[lang="en"], html[lang="de"]) .cats-id-card__badge {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
}

:is(html[lang="en"], html[lang="de"]) .cats-missing-review-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
}

:is(html[lang="en"], html[lang="de"]) .cats-missing-review-card__head > span {
  max-width: 180px;
  white-space: normal;
  font-size: 13px;
  line-height: 1.35;
}

:is(html[lang="en"], html[lang="de"]) .cats-missing-review-card :is(li, time) {
  font-size: 13px;
}

:is(html[lang="en"], html[lang="de"]) :is(
  .cats-task-center__list button,
  .cats-document-folder__files button
) {
  min-height: 44px;
  font-size: 13.5px;
  line-height: 1.35;
}

:is(html[lang="en"], html[lang="de"]) .cats-order-workflow header > span,
:is(html[lang="en"], html[lang="de"]) .cats-order-workflow li > b,
:is(html[lang="en"], html[lang="de"]) .cats-order-workflow__condition {
  font-size: 13.5px;
}

:is(html[lang="en"], html[lang="de"]) .cats-order-workflow li strong,
:is(html[lang="en"], html[lang="de"]) .cats-order-workflow li small,
:is(html[lang="en"], html[lang="de"]) .cats-order-workflow__note {
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 1800px) {
  :is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    box-shadow: 0 15px 30px rgb(13 38 76 / 12%);
    z-index: 110;
  }

  :is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav.open {
    display: grid;
  }

  :is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav > button {
    width: 100%;
    text-align: left;
    white-space: normal;
  }

  :is(html[lang="en"], html[lang="de"]) .customer-site .mobile-only {
    display: block !important;
  }

  :is(html[lang="en"], html[lang="de"]) .customer-site .menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    place-items: center;
  }

  :is(html[lang="en"], html[lang="de"]) .customer-site :is(
    .support-link,
    .admin-entry
  ) {
    display: none;
  }
}

@media (max-width: 960px) {
  :is(html[lang="en"], html[lang="de"]) .cats-order-workflow__branches,
  :is(html[lang="en"], html[lang="de"]) .cats-order-workflow__branches article > ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :is(html[lang="en"], html[lang="de"]) .cats-task-center__list article {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  :is(html[lang="en"], html[lang="de"]) .cats-task-center__list button {
    grid-column: 2;
    width: 100%;
  }
}

@media (max-width: 760px) {
  :is(html[lang="en"], html[lang="de"]) .cats-connection-state {
    z-index: 120;
  }

  :is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
    .form-actions,
    .confirmation-actions,
    .success-actions
  ),
  :is(html[lang="en"], html[lang="de"]) :is(
    .cats-id-modal__actions,
    .cats-missing-modal__actions
  ) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  :is(.customer-site[data-site-language="en"], .customer-site[data-site-language="de"]) :is(
    .form-actions,
    .confirmation-actions,
    .success-actions
  ) > button,
  :is(html[lang="en"], html[lang="de"]) :is(
    .cats-id-modal__actions,
    .cats-missing-modal__actions
  ) > button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  :is(html[lang="en"], html[lang="de"]) .customer-site .site-header nav {
    top: 100%;
    max-height: calc(100dvh - 66px);
  }
}

@media (max-width: 520px) {
  :is(html[lang="en"], html[lang="de"]) .cats-id-card__top {
    grid-template-columns: 1fr;
  }

  :is(html[lang="en"], html[lang="de"]) .cats-id-card__badge {
    justify-self: start;
    max-width: 100%;
  }

  :is(html[lang="en"], html[lang="de"]) .cats-missing-review-card__head {
    grid-template-columns: 1fr;
  }

  :is(html[lang="en"], html[lang="de"]) .cats-missing-review-card__head > span {
    justify-self: start;
    max-width: 100%;
  }
}

:is(html[lang="en"], html[lang="de"]) .cats-package-lightbox__panel {
  height: min(94dvh, 900px);
}
