/* =====================================================================================================================
   merch.css — the Merch page (/merch.html, merch.js).
   Uses the shipping sheet look from ship.css (#ship, table.sht, .wbar, .stg, .shipbtn) and stays light like the sheets.
   ===================================================================================================================== */

/* The page body: full height, centered list up to 1640px wide */
.mship {
  min-height: calc(100vh - 56px);
}
.mship .shbody {
  max-width: 1640px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Count tiles above the list (New, Sent to printer, Ready to ship, Shipped 7 days); two per row on phones */
.mtiles {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  max-width: 820px;
  background: #fff;
  border: 2px solid #1F1F1F;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--body);
}
.mtile {
  padding: 10px 14px;
  border-left: 1px solid #B5B5B5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mtile.first {
  border-left: 0;
  background: #FFF2CC;
}
.mtile b {
  font-size: .82rem;
}
.mtile strong {
  font-family: "Saira Condensed",var(--display),sans-serif;
  font-size: 1.9rem;
  line-height: 1.1;
}
.mtile span {
  font-size: .82rem;
  color: #444;
}
@media (max-width:640px) {
  .mtiles {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .mtile:nth-child(3) {
    border-left: 0;
  }
}

/* The order table (Orders and Shipped tabs) */
table.mtable {
  min-width: 1320px;
  font-size: .92rem;
}
table.mtable td {
  padding: 5px 7px;
}

/* Order # link to Shopify */
a.mord {
  color: #1D4F91;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

/* Sheet and Designs cells: size line, small notes, design thumbnails on a checkerboard (shows transparency) */
td.msheet b {
  display: block;
  white-space: nowrap;
}
td.msheet small,.mdes small {
  font-family: var(--body);
  font-size: .8rem;
  color: #333;
  line-height: 1.3;
}
.mdes {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mth {
  display: flex;
  gap: 3px;
}
.mth img,.mth-x {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border: 1px solid #B5B5B5;
  border-radius: 3px;
  background: repeating-conic-gradient(#fff 0 25%,#E6E6E3 0 50%) 0 0/8px 8px;
  display: block;
}

/* Art check cell (OK green, low-res orange, file missing red) and muted cells */
td.mart {
  font: 700 .82rem var(--body);
  text-align: center;
}
td.mart.ok {
  background: #C6EFCE;
  color: #1E5E36;
}
td.mart.warn {
  background: #FCE4C4;
  color: #7A4100;
}
td.mart.bad {
  background: #F8CBAD;
  color: #7A1C12;
}
td.mart small {
  font-weight: 600;
}
td.mmuted {
  color: #666;
  font-family: var(--body);
  font-size: .82rem;
}

/* Print file buttons; dark buttons; the Shipped button stays light until the order is ready to ship */
.mfiles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sbtn.mdark {
  background: #1F1F1F;
  border-color: #1F1F1F;
  color: #fff;
}
.sbtn.mlink {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.shipbtn.mlight {
  background: #fff;
  color: #111;
  border: 1px solid #111;
}

/* Small notes; .maccess is the old Access tab layout (Access moved to Admin) */
.mnote {
  font-family: var(--body);
  font-size: .88rem;
  color: #444;
  margin: 0;
}
.maccess {
  max-width: 760px;
}
.maccess select {
  font: inherit;
  min-height: 32px;
  border: 1px solid #8C8C8C;
  border-radius: 4px;
  background: #fff;
  color: #111;
  padding: 0 6px;
}

/* Order detail panel (View sheet): dark header bar, two columns (one on narrow screens) */
.mdetail {
  max-width: 1640px;
  margin: 0 auto 40px;
  padding: 0 16px;
  box-sizing: border-box;
  width: 100%;
}
.mdetail > * {
  background: #fff;
}
.mdhead {
  background: var(--look-head-bg-paint, var(--look-head-bg, #1F1F1F)) !important;
  color: var(--look-head-text, #fff);
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  font-family: var(--body);
}
.mdhead h2 {
  margin: 0;
  font-family: "Saira Condensed",var(--display),sans-serif;
  font-size: 1.35rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  flex: 1 1 auto;
}
.mdhead span {
  font-size: .9rem;
  color: #DDD;
}
.mdbody {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(0,1fr);
  gap: 18px;
  padding: 16px;
  border: 2px solid #1F1F1F;
  border-top: 0;
}
@media (max-width:980px) {
  .mdbody {
    grid-template-columns: minmax(0,1fr);
  }
}
.mdcol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Detail: section labels, the sheet preview on a checkerboard, sheet picker, facts boxes */
.mlbl {
  margin: 0;
  font: 700 .78rem var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #555;
}
.mprev {
  border: 1px solid #B5B5B5;
  background: repeating-conic-gradient(#fff 0 25%,#ECECE9 0 50%) 0 0/14px 14px;
  max-height: 70vh;
  overflow: auto;
}
.mprev canvas {
  display: block;
}
.msheets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mfacts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.mfacts div {
  border: 1px solid #B5B5B5;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mfacts span {
  font: 600 .72rem var(--body);
  color: #555;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.mfacts b {
  overflow-wrap: anywhere;
}

/* Detail: download buttons and the export progress bar */
.macts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mprog {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 .82rem var(--body);
}
.mprog div {
  flex: 1;
  height: 6px;
  background: #D4D4D0;
  border-radius: 3px;
  overflow: hidden;
}
.mprog i {
  display: block;
  height: 100%;
  width: 0;
  background: #2F7D4F;
}

/* Detail: designs table with thumbnails */
table.mdt {
  font-size: .9rem;
}
canvas.mthumb {
  width: 40px;
  height: 40px;
  border: 1px solid #B5B5B5;
  border-radius: 3px;
  background: repeating-conic-gradient(#fff 0 25%,#E6E6E3 0 50%) 0 0/8px 8px;
  display: block;
  margin: 0 auto;
}

/* Detail: status steps (done = green, current = dark) */
.msteps {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #111;
  border-radius: 4px;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
}
.msteps button {
  font: 700 .85rem var(--body);
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #111;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.msteps button:first-child {
  border-left: 0;
}
.msteps button.done {
  background: #C6EFCE;
  color: #1E5E36;
}
.msteps button.now {
  background: #1F1F1F;
  color: #fff;
}
.msteps button:disabled {
  cursor: default;
}

/* Settings tab (sheet sizes, prices, Square cut charge) */
.mset {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  padding: 16px 0;
}
.mset-card {
  background: #fff;
  border: 1px solid #B5B5B5;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mset-card h2 {
  margin: 0;
  font: 700 1.05rem var(--body);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.mset-warn {
  border-color: #B06A00;
  background: #FFF8EC;
}
.mset-t td {
  vertical-align: middle;
}
.mset-in {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 .95rem var(--body);
}
.mset-in input {
  width: 86px;
  font: inherit;
  padding: 7px 8px;
  border: 1px solid #8A8A8A;
  border-radius: 3px;
  background: #fff;
}
.mset-var {
  width: 100%;
  min-width: 150px;
  box-sizing: border-box;
  font: 500 .92rem var(--mono);
  padding: 7px 8px;
  border: 1px solid #8A8A8A;
  border-radius: 3px;
  background: #fff;
}
.mset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-end;
}
.mset-lab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 600 .78rem var(--body);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #555;
  flex: 1 1 240px;
}
.mset-save {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Sheet cell: the Square cut charge line */
.msheet .mcut {
  display: block;
  color: #7A4A00;
}
