/* Archive search: field, explanatory text and result count occupy distinct cells. */
@media screen {
  .erp-ux-dashboard .erp-ux-toolbar__search {
    display: grid !important;
    grid-template-columns: minmax(0,460px) auto max-content;
    align-items: start;
    justify-content: end;
    gap: 10px;
    min-width: 0;
    white-space: normal;
  }
  .erp-ux-dashboard .erp-ux-toolbar__search > div:first-child {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0,1fr);
    grid-column: 1;
    gap: 6px;
    width: 100% !important;
    min-width: 0;
  }
  .erp-ux-dashboard .erp-ux-toolbar__search > div:first-child > svg {
    position: absolute;
    left: 12px;
    top: 21px;
    transform: translateY(-50%);
    pointer-events: none;
  }
  .erp-ux-dashboard .erp-ux-toolbar__search input {
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    min-width: 0;
    min-height: 42px;
    width: 100%;
    padding-inline: 36px 12px;
  }
  .erp-ux-dashboard #archive-customer-search-hint {
    position: static;
    display: block;
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted,#65717d);
  }
  .erp-ux-dashboard .erp-ux-toolbar__search > button { grid-column: 2; min-width: 0; margin-top: 4px; }
  .erp-ux-dashboard .erp-ux-toolbar__search > .erp-ux-results-count { grid-column: 3; white-space: nowrap; align-self: start; margin-top: 4px; }
}
@media screen and (max-width:767px) {
  .erp-ux-dashboard .erp-ux-toolbar__search { grid-template-columns: minmax(0,1fr) auto; }
  .erp-ux-dashboard .erp-ux-toolbar__search > div:first-child { grid-column: 1 / -1; grid-row: 1; }
  .erp-ux-dashboard .erp-ux-toolbar__search > button { grid-column: 1; grid-row: 2; max-width: 100%; }
  .erp-ux-dashboard .erp-ux-toolbar__search > .erp-ux-results-count { grid-column: 2; grid-row: 2; margin-top: 0; }
}

/* Internal editor only. Never alter customer documents, PDFs or printed pages. */
@media screen {
  .offer-editor-status-dock {
    position: sticky;
    top: 0;
    z-index: 36;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding-bottom: 8px;
    background: var(--bg-app,#f5f6f8);
    isolation: isolate;
  }
  .offer-editor-status-dock > .offer-editor-finance-strip { position: static; margin: 0; }
  .offer-editor-status-dock [data-editor-section-root=progress] { box-shadow: 0 4px 16px #182b4114; }
  .offer-editor-status-dock [data-editor-section-root=progress] .offer-editor-section-toggle { min-height: 36px; padding: 6px 12px; }
  .offer-editor-status-dock [data-editor-section-root=progress] .offer-editor-section-icon { flex-basis: 24px; width: 24px; height: 24px; }
  .offer-editor-status-dock [data-editor-section-root=progress] .offer-editor-section-summary { display: none; }
  .offer-editor-status-dock [data-editor-section=progress] { padding: 10px 12px !important; gap: 10px; }
  .offer-editor-status-dock [data-editor-section=progress] > div:first-child { min-width: 0; gap: 10px; align-items: flex-start; }
  .offer-editor-status-dock [data-editor-section=progress] > div:first-child > div:first-child { flex-shrink: 0; width: 40px; height: 40px; }
  .offer-editor-status-dock [data-editor-section=progress] > div:first-child > div:last-child { min-width: 0; overflow-wrap: anywhere; }
  .offer-editor-status-dock [data-editor-section=progress] > div:last-child:not(:first-child) { display: none; }
  .offer-editor-workspace .offer-editor-section-header-static { cursor: default; }
  .offer-editor-workspace .offer-editor-section-header-static:hover { filter: none; }
  .offer-editor-workspace [data-editor-section-root=route] .offer-editor-section-body { padding: 12px; }
  .offer-editor-workspace [data-editor-section-root=route] [data-editor-section=route] { margin: 0 !important; }
  .offer-editor-workspace [data-editor-section-root=route] .offer-route-map { margin-top: 0; padding-top: 12px; }
  .offer-editor-workspace [data-editor-section-root=route] .offer-route-map__frame { min-height: 280px; height: clamp(280px,45vh,440px); }
  .offer-editor-workspace [data-editor-section-root=route] .offer-route-map__frame[data-expanded=true] { height: 72vh; max-height: 900px; }
  .offer-editor-workspace [data-editor-section-root=route] iframe[title="Mapa trasy samochodowej"] { display: block; border: 0; min-height: 280px; width: 100%; height: 100%; }
}
/* Horizontal section navigation scrolls away; it must not cover the pinned status. */
@media screen and (min-width:1024px) and (max-width:1279px) {
  .offer-editor-workspace .offer-editor-nav { position: relative; top: auto; }
}
@media screen and (max-width:1023px) {
  .offer-editor-workspace .offer-editor-nav { position: relative; top: auto; }
  .offer-editor-status-dock { top: var(--offer-editor-header-offset,75px); }
}
