/* Objednávky – čitelnost seznamu (audit administrace 21. 11. 2026, nálezy
   #2, #4, #5, #6, #13). Načítá se jako poslední styl Objednávek:
   - žádný text v seznamu menší než 11 px,
   - štítek „NOVÁ“ se nikdy neořízne (zalomí se pod kód),
   - e-maily se lámou jen za tečkou nebo před zavináčem (viz <wbr> v kódu),
   - prázdný stav „–“ ve sloupcích Odesláno/Staženo je čitelný,
   - mobilní/tabletová karta objednávky je kompaktní mřížka místo
     jednoho údaje na řádek. */

/* ---------- Všechny šířky ---------- */
#tab-orders .order-status-count{font-size:11px}
#tab-orders .order-code-wrap{flex-wrap:wrap;row-gap:3px}
#tab-orders .orders-table .order-cell-code{overflow:visible}
#tab-orders .orders-table .order-new-badge,
#tab-orders .orders-table .order-test-mini{
  height:18px;
  padding:0 6px;
  font-size:11px;
  letter-spacing:.02em;
  line-height:1;
  white-space:nowrap;
}
#tab-orders .order-date-time,
#tab-orders .order-name-meta,
#tab-orders .order-money-original,
#tab-orders .order-product-thumb-fallback,
#tab-orders .order-payment-method-main,
#tab-orders .order-payment-method-sub{font-size:11px}
#tab-orders .order-payment{font-size:11px}
#tab-orders .order-email-progress{flex-wrap:wrap;row-gap:3px}
#tab-orders .orders-table .order-email-stage{
  min-width:0;
  height:22px;
  padding:0 6px;
  font-size:11px;
}
#tab-orders .order-check-empty{color:#8a8290}
#tab-orders .order-email-main{
  overflow-wrap:break-word;
  word-break:normal;
}

/* ---------- Desktop ---------- */
@media (min-width:1024px){
  /* Column widths stay as in the compact page (#285); text wraps instead. */
  #tab-orders .orders-table th{font-size:11.5px}
  /* Headings wrap between words instead of being clipped. */
  #tab-orders .orders-table th{white-space:normal}
  #tab-orders .orders-table .order-sort-button{font-size:inherit;white-space:normal}
  /* „Odesláno“ is one word: the column is 6 px wider, „Akce“ 6 px narrower. */
  #tab-orders .orders-table .col-sent{width:68px!important}
  #tab-orders .orders-table .col-actions{width:84px!important}
  #tab-orders .orders-table th.col-sent,
  #tab-orders .orders-table th.col-downloaded{
    padding-left:3px;padding-right:3px;
    font-size:11px;letter-spacing:0;text-align:center;
  }
  #tab-orders .order-name-main{overflow-wrap:break-word}
  #tab-orders .order-email-main{font-size:12px}
}

/* ---------- Mobil a tablet: kompaktní karta ---------- */
@media (max-width:1023px){
  #tab-orders .orders-table tbody tr{
    grid-template-columns:30px minmax(0,1fr) auto;
    grid-template-areas:
      "sel code total"
      ".   name date"
      ".   email email"
      ".   product product"
      ".   payment method"
      ".   estatus estatus"
      ".   workflow workflow"
      ".   sent downloaded"
      "act act act";
    gap:2px 10px;
    align-items:start;
    padding:12px;
  }
  #tab-orders .orders-table td{
    padding:4px 0;
    border-bottom:0;
    grid-column:auto;
    grid-row:auto;
  }
  #tab-orders .orders-table td::before{
    margin-bottom:2px;
    font-size:11px;
    letter-spacing:.03em;
  }
  /* Self-explanatory values need no heading. */
  #tab-orders .orders-table .order-cell-code::before,
  #tab-orders .orders-table .order-cell-date::before,
  #tab-orders .orders-table .order-cell-name::before,
  #tab-orders .orders-table .order-cell-email::before,
  #tab-orders .orders-table .order-cell-total::before,
  #tab-orders .orders-table .order-cell-product::before,
  #tab-orders .orders-table .order-cell-actions::before{display:none}

  #tab-orders .orders-table .order-select-cell{
    grid-area:sel;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    padding:2px 0 0;
  }
  #tab-orders .orders-table .order-select-cell input{width:20px;height:20px}
  #tab-orders .orders-table .order-cell-code{grid-area:code;padding-top:2px}
  #tab-orders .orders-table .order-cell-total{grid-area:total;text-align:right}
  #tab-orders .orders-table .order-cell-name{grid-area:name}
  #tab-orders .orders-table .order-cell-date{grid-area:date;text-align:right}
  #tab-orders .orders-table .order-cell-email{grid-area:email;padding-top:0}
  #tab-orders .orders-table .order-cell-product{grid-area:product}
  #tab-orders .orders-table .order-cell-payment{grid-area:payment}
  #tab-orders .orders-table .order-cell-comgate{grid-area:method}
  #tab-orders .orders-table .order-cell-email-status{grid-area:estatus}
  #tab-orders .orders-table .order-cell-workflow{grid-area:workflow}
  #tab-orders .orders-table .order-cell-sent{grid-area:sent}
  #tab-orders .orders-table .order-cell-downloaded{grid-area:downloaded}
  #tab-orders .orders-table .order-cell-actions{
    grid-area:act;
    margin-top:6px;
    padding-top:8px!important;
    border-top:1px solid #eee9e6!important;
  }
  #tab-orders .orders-table .order-cell-sent,
  #tab-orders .orders-table .order-cell-downloaded{
    display:flex!important;
    align-items:center;
    gap:6px;
  }
  #tab-orders .orders-table .order-cell-sent::before,
  #tab-orders .orders-table .order-cell-downloaded::before{margin:0}
  #tab-orders .order-email-main{font-size:12.5px}
  #tab-orders .order-name-main{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    overflow-wrap:break-word;
  }
  #tab-orders .order-workflow-select{min-height:38px}
  #tab-orders .order-action-icon{width:36px;height:36px}
}
