@import url("./media-desk.css");
@import url("./version-management.css");
@import url("./phone-program-desk.css");
@import url("./phone-project-header.css");
@import url("./task-discussion.css");
@import url("./phone-task-record.css");
@import url("./phone-floor.css");
@import url("./print-queue.css");
@media (max-width: 760px), (max-width: 960px) and (max-height: 520px) {
  /* A real job and its next action should fit on the first screen. */
  .rdx.rdc.design-desk .dd-layout { grid-template-columns: minmax(0, 1fr); }
  .rdx.rdc.design-desk .dd-panel { min-width: 0; }
  .rdx.rdc.design-desk .dd-designs { height: auto; min-height: 0; gap: 12px; }
  .rdx.rdc.design-desk .dd-heading { gap: 8px; flex-wrap: wrap; }
  .rdx.rdc.design-desk .dd-heading h2 { font-size: 17px; line-height: 1.4; }
  .rdx.rdc.design-desk .dd-heading .rdc-plate { display: none; }
  .rdx.rdc.design-desk .dd-create { min-height: 44px; font-size: 13px; }
  .rdx.rdc.design-desk .dd-filters { display: grid; gap: 8px; }
  .rdx.rdc.design-desk .dd-status-filters {
    display: flex; flex-wrap: nowrap; overflow-x: auto; min-width: 0;
    max-width: 100%; gap: 3px; padding: 1px 2px 4px; overscroll-behavior-x: contain;
  }
  .rdx.rdc.design-desk .dd-status-filters > button {
    min-height: 44px; padding: 5px 10px; font-size: 13px;
  }
  .rdx.rdc.design-desk .dd-status-filters > label { flex: none; }
  .rdx.rdc.design-desk .dd-source-filter { margin-left: 0; justify-self: start; }
  .rdx.rdc.design-desk .dd-source-filter select { min-height: 44px; }
  .rdx.rdc.design-desk .dd-cards { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .rdx.rdc.design-desk .dd-card {
    position: relative; min-height: 0; height: auto; display: block;
    border-radius: 8px; padding: 12px 14px 7px;
  }
  .rdx.rdc.design-desk .dd-card-info { padding: 0; display: flex; gap: 0; }
  .rdx.rdc.design-desk .dd-card-meta { padding-right: 76px; justify-content: flex-start; gap: 6px; margin-bottom: 0; flex-wrap: wrap; }
  .rdx.rdc.design-desk .dd-card .dd-preview {
    position: absolute; right: 12px; top: 10px; width: 64px; height: 50px;
    border-radius: 5px; overflow: hidden;
  }
  .rdx.rdc.design-desk .dd-card .dd-preview-label { display: none; }
  .rdx.rdc.design-desk .dd-preview:not(.dd-has-preview) {
    display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 3px;
  }
  .rdx.rdc.design-desk .dd-preview:not(.dd-has-preview) .dd-preview-label {
    position: static; display: block; width: 100%; max-width: 100%; padding: 0;
    background: none; color: #b5c8d3; text-align: center; font: 500 10px/1.3 var(--font-ui,system-ui);
  }
  .rdx.rdc.design-desk .dd-preview:not(.dd-has-preview) .dd-preview-empty {
    display: block; width: 100%; height: auto; text-align: center; font-size: 10px; line-height: 1.3;
  }
  .rdx.rdc.design-desk .dd-preview-empty svg { display: none; }
  .rdx.rdc.design-desk .dd-card h3 { min-width: 0; padding-right: 74px; }
  .rdx.rdc.design-desk .dd-card h3 button {
    display: block; min-height: 44px; padding-block: 4px; font-size: 16px; line-height: 1.45;
    overflow: visible; white-space: normal; overflow-wrap: anywhere;
  }
  .rdx.rdc.design-desk .dd-card-bottom { padding-top: 4px; }
  .rdx.rdc.design-desk .dd-card :is(.dd-owner,.dd-project-name,.dd-feedback,.dd-due) {
    max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip;
    overflow-wrap: anywhere; font-size: 13px; line-height: 1.45;
  }
  .rdx.rdc.design-desk .dd-card .dd-feedback { display: block; margin-block: 4px; padding: 6px 8px; }
  .rdx.rdc.design-desk .dd-card-action { flex-wrap: wrap; gap: 2px 8px; margin-top: 8px; padding-top: 3px; }
  .rdx.rdc.design-desk .dd-card-action > button {
    min-height: 44px; max-width: 100%; padding-inline: 4px; margin-left: auto; white-space: normal; font-size: 14px;
  }
  .rdx.rdc.design-desk :is(.dd-footer-links button,.dd-footer-links summary,.dd-pagination button) {
    min-height: 44px; font-size: 13px;
  }
  .rdx.rdc.design-desk .dd-pagination button { min-width: 44px; }
  .rdx.rdc.design-desk .dd-designs-footer { flex-wrap: wrap; row-gap: 2px; }

  /* Keep current columns, controls and access rules as owned by the workbenches. */
  #panel .design-desk :is(.pg-table-wrap,.pd-table-wrap,.ib-table-wrap,.sh-table-wrap) {
    overflow: visible; min-width: 0; max-width: 100%; max-height: none;
  }
  #panel .design-desk .phone-records {
    display: block; width: 100%; min-width: 0; max-width: 100%; position: relative;
    border: 0; background: none;
  }
  #panel .design-desk .phone-records > thead {
    position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden;
    white-space: nowrap;
  }
  #panel .design-desk .phone-records > tbody { display: grid; gap: 9px; }
  #panel .design-desk .phone-records > tbody > tr {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start;
    gap: 9px 12px; border: 1px solid #718d9f66; border-radius: 7px;
    padding: 12px; background: #283944;
  }
  #panel .design-desk .phone-records > tbody > tr > :is(td,th) {
    display: block; position: static; width: auto; min-width: 0; max-width: none;
    margin: 0; padding: 0; color: #e1edf3; background: transparent; border: 0;
    font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; text-align: left;
  }
  #panel .design-desk .phone-records [data-phone-column]::before {
    display: block; content: attr(data-phone-column); content: attr(data-phone-column) / "";
    margin-bottom: 3px; color: #a3bac9; font: 500 12px/1.4 var(--font-ui,system-ui);
  }
  #panel .design-desk :is(.pg-table,.sh-order-table).phone-records > thead th:first-child,
  #panel .design-desk .phone-records > tbody > tr > :is(.pg-index,.sh-sequence) { display: none; }
  #panel .design-desk :is(.pg-table,.sh-order-table) > tbody > tr > :nth-child(2),
  #panel .design-desk :is(.ib-table,.pd-table) > tbody > tr > :first-child {
    grid-column: 1/-1; padding-bottom: 7px; border-bottom: 1px solid #7896b340;
  }
  #panel .design-desk :is(.pg-table,.sh-order-table) > tbody > tr > :nth-child(2)::before,
  #panel .design-desk :is(.ib-table,.pd-table) > tbody > tr > :first-child::before { display: none; }
  #panel .design-desk .phone-records button { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
  #panel .design-desk .phone-records :is(.pg-task-name,.sh-order-link,.ib-table-link) { text-align: left; font-size: 15px; line-height: 1.4; }
  #panel .design-desk .phone-records td small { white-space: normal; overflow-wrap: anywhere; }
  #panel .design-desk :is(.pg-table,.pd-table,.sh-order-table,.ib-table:not(.ib-receipts)) > tbody > tr > :last-child:not([colspan]) {
    grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; border-top: 1px solid #7896b340; padding-top: 3px;
  }
  #panel .design-desk :is(.pg-table,.pd-table,.sh-order-table,.ib-table:not(.ib-receipts)) > tbody > tr > :last-child:not([colspan])::before { display: none; }
  #panel .design-desk .phone-records > tbody > tr > [colspan] { grid-column: 1/-1; padding: 12px 0; border: 0; text-align: center; }
  .rdx.rdc.program-desk .pg-task-toolbar { gap: 8px 12px; flex-wrap: wrap; }
  .rdx.rdc.program-desk .pg-task-tools { flex-wrap: wrap; gap: 6px 12px; }
  .rdx.rdc.program-desk .pg-task-tools :is(button,select), .rdx.rdc.program-desk .pg-version-controls button { min-height: 44px; }
  .rdx.rdc.design-desk .pg-table .pg-row-actions { text-align: right; }

  .task-dual-view .task-mobile-overview { min-width: 0; border-block-end: 1px solid var(--line); }
  .task-dual-view .task-mobile-overview > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px;
    list-style: none; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 600;
  }
  .task-mobile-overview > summary::-webkit-details-marker { display: none; }
  .task-mobile-overview > summary::after {
    content: ""; display: block; width: 7px; height: 7px; margin-inline-end: 6px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
  }
  .task-mobile-overview[open] > summary::after { transform: rotate(225deg); }
  .task-dual-view > .table-footer { flex-wrap: wrap; }
  .task-dual-view > .table-footer button { min-height: 44px; }

  #stage.task-mode:not(.product-mode) #panel > .task-banner {
    display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 0 8px;
    align-items: center; min-height: 56px; height: auto; flex: none; padding: 6px 12px;
  }
  #stage.task-mode:not(.product-mode) .task-banner .rd-back { grid-area: 1/1; width: 44px; height: 44px; }
  #stage.task-mode:not(.product-mode) .task-banner .rd-identity,
  #stage.task-mode:not(.product-mode) .task-banner .rd-identity > div:not(.rd-title) { display: contents; }
  #stage.task-mode:not(.product-mode) .task-banner .rd-number,
  #stage.task-mode:not(.product-mode) .task-banner .rd-title > span,
  #stage.task-mode:not(.product-mode) .task-banner .rd-close { display: none; }
  #stage.task-mode:not(.product-mode) .task-banner .rd-title { grid-area: 1/2; min-width: 0; }
  #stage.task-mode:not(.product-mode) .task-banner .rd-title h1 {
    margin: 0; font-size: 19px; line-height: 1.35; overflow-wrap: anywhere;
  }
  #stage.task-mode:not(.product-mode) .task-banner .rd-identity p {
    grid-column: 2/-1; margin: 0 0 4px; font-size: 12px; line-height: 1.45; white-space: normal;
  }
  #stage.task-mode:not(.product-mode) .task-banner .rd-banner-actions {
    grid-area: 1/3; width: auto; min-width: 0; padding: 0;
  }
  #stage.task-mode:not(.product-mode) .task-banner .rd-banner-actions .ui-button {
    min-width: 0; min-height: 44px; padding-inline: 9px; font-size: 13px;
  }
  #stage.task-mode:not(.product-mode).task-detail .project-toolbar { gap: 10px; margin-block-start: 12px; padding-block: 10px; }
  #stage.task-mode:not(.product-mode).task-detail .project-toolbar .page-actions {
    display: flex; flex-wrap: wrap; gap: 6px; width: 100%;
  }
  #stage.task-mode:not(.product-mode).task-detail .page-actions .ui-button {
    min-height: 44px; padding: 7px 11px; min-width: 0; white-space: normal; font-size: 14px;
  }
  #stage.task-mode:not(.product-mode).task-detail .project-meta { min-width: 0; width: 100%; gap: 5px 14px; }
  #stage.task-mode:not(.product-mode).task-detail .project-meta > div { padding: 4px 0; gap: 8px; white-space: normal; }
  #stage.task-mode:not(.product-mode).task-detail .project-meta dt { flex: none; }
  #stage.task-mode:not(.product-mode).task-detail .project-meta dd { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #stage.task-mode:not(.product-mode) .entry-form .form-error:empty { display: none; }
  #stage.task-mode:not(.product-mode) .entry-form :is(textarea,input,select,.form-error) { scroll-margin-block: 12px 76px; }
  #stage.task-mode:not(.product-mode) .entry-form .form-footer {
    position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap;
    margin-top: 12px; padding: 8px 0 max(8px,env(safe-area-inset-bottom,0px));
    gap: 8px; background: #fff; border-top: 1px solid var(--line);
  }
  #stage.task-mode:not(.product-mode) .entry-form .form-footer .ui-button { min-height: 44px; min-width: 0; padding-inline: 12px; white-space: normal; }
  #stage.task-mode:not(.product-mode) .entry-form .form-footer button[type=submit] { flex: 1; }
  #stage.task-mode:not(.product-mode) .entry-form .form-footer :is(button,a):not([type=submit]) { flex: 0 1 auto; }
  #stage.task-mode:not(.product-mode) .task-editor .task-editor-description textarea { min-height: 8rem; height: 8rem; }
  #stage.task-mode:not(.product-mode) .task-editor .field :is(select,input:not([type=file])) { min-height: 44px; }
}

@media (max-width: 440px) {
  #stage.task-mode:not(.product-mode) .task-editor .task-editor-pair { grid-template-columns: minmax(0,1fr); }
}
