/*
 * Labels tab — legacy-parity styling.
 *
 * The legacy labels dashboard (macyNonBranded/Website 2026/labels.html) was a
 * Bootstrap 4 page. Loading bootstrap.min.css globally would restyle the login
 * screen and the Entry/CS tabs, so the handful of Bootstrap classes the legacy
 * markup actually uses are reproduced here, scoped under #panel-labels. Values
 * are lifted verbatim from Bootstrap 4.3 so the tab is a near-pixel match.
 *
 * .content-wide is toggled on the .content wrapper by labels.js while the
 * Labels tab is active (the legacy page used Bootstrap's 1140px container; the
 * admin shell's default column is 820px).
 */

.content.content-wide { max-width: 1210px; }

#panel-labels {
  /* Bootstrap 4 reboot baseline */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
}

#panel-labels .container {
  width: 100%;
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

/* ---------- Typography ---------- */
#panel-labels h1 {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: inherit;
}
#panel-labels h5 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: inherit;
}

/* ---------- Bootstrap spacing / layout utilities used by the legacy page ---------- */
/* Bootstrap marks spacing utilities !important so they beat component padding
   (e.g. px-4/p-5 on .btn) — required for legacy-identical button sizing. */
#panel-labels .text-center { text-align: center; }
#panel-labels .form-group { margin-bottom: 1rem; }
#panel-labels .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
#panel-labels .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
#panel-labels .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
#panel-labels .py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
#panel-labels .mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
#panel-labels .px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
#panel-labels .p-5 { padding: 3rem !important; }
#panel-labels .pr-5 { padding-right: 3rem !important; }
#panel-labels .pl-5 { padding-left: 3rem !important; }
#panel-labels .col-12 { width: 100%; }

/* ---------- Bootstrap 4 buttons (verbatim values) ---------- */
#panel-labels .btn {
  display: inline-block;
  width: auto;
  font-family: inherit;
  font-weight: 400;
  color: #212529;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  filter: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
#panel-labels .btn:disabled { opacity: 0.65; cursor: default; }

#panel-labels .btn-outline-secondary {
  color: #6c757d;
  background-color: transparent;
  border-color: #6c757d;
}
#panel-labels .btn-outline-secondary:hover:not(:disabled) {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

#panel-labels .btn-outline-primary {
  color: #007bff;
  background-color: transparent;
  border-color: #007bff;
}
#panel-labels .btn-outline-primary:hover:not(:disabled) {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

#panel-labels .btn-warning {
  color: #212529;
  background-color: #ffc107;
  border-color: #ffc107;
}
#panel-labels .btn-warning:hover:not(:disabled) {
  color: #212529;
  background-color: #e0a800;
  border-color: #d39e00;
}

#panel-labels .btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}
#panel-labels .btn-danger:hover:not(:disabled) {
  color: #fff;
  background-color: #c82333;
  border-color: #bd2130;
}

/* Prep buttons pick up an extra bottom margin on wrap, like the legacy rows. */
#panel-labels .prepBtn { margin-top: 2px; margin-bottom: 2px; }

/* ---------- Pending-counts panels (replace the legacy Airtable iframes) ---------- */
#panel-labels .pending-col {
  width: 40%;
  display: inline-block;
  vertical-align: top;
}
#panel-labels .pending-embed {
  background: transparent;
  border: 1px solid #ccc;
  width: 100%;
  min-height: 180px;
  padding: 8px 0;
  overflow: auto;
}
#panel-labels .pending-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #212529;
}
#panel-labels .pending-table th,
#panel-labels .pending-table td {
  border-bottom: 1px solid #e9ecef;
  padding: 6px 12px;
  text-align: left;
}
#panel-labels .pending-table th { background: #fffbe6; font-weight: 600; }
#panel-labels .pending-table td:last-child,
#panel-labels .pending-table th:last-child { text-align: right; }
#panel-labels .pending-table tr.total-row td { font-weight: 700; border-top: 2px solid #ccc; }
#panel-labels .pending-note { font-size: 11px; color: #6d6d6d; padding: 4px 12px 0; text-align: left; }

/* ---------- Status message box (legacy #atStatusMessage) ---------- */
#panel-labels .at-status {
  width: 76%;
  margin: 0 12% 20px;
  background-color: #ececec;
  border: 1px solid #ccc;
  color: #6d6d6d;
}
#panel-labels .at-status img { vertical-align: middle; }

/* ---------- Current print batch (replaces the legacy PrintLabels iframe) ---------- */
#panel-labels .batch-embed {
  background: transparent;
  border: 1px solid #ccc;
  width: 100%;
  height: 533px;
  overflow: auto;
}
/* Reports archive below the PrintLabels box: breathing room, and its height
   follows its (max 10-row) table instead of the fixed 533px batch box. */
#panel-labels #labels-reports-embed {
  margin-top: 28px;
  margin-bottom: 28px;
  height: auto;
  max-height: 533px;
}
#panel-labels .batch-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #e9ecef;
  background: #fdfdfd;
  position: sticky;
  top: 0;
}
#panel-labels .batch-toolbar .batch-title { font-weight: 600; font-size: 14px; }
#panel-labels .batch-toolbar .btn { font-size: 0.8rem; padding: 0.25rem 0.5rem; }
#panel-labels .batch-toolbar .batch-count { color: #6d6d6d; font-size: 12px; margin-left: auto; }
#panel-labels .batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #212529;
}
#panel-labels .batch-table th,
#panel-labels .batch-table td {
  border-bottom: 1px solid #e9ecef;
  border-right: 1px solid #f1f3f5;
  padding: 5px 8px;
  text-align: left;
  white-space: nowrap;
}
#panel-labels .batch-table th {
  background: #fffbe6;
  position: sticky;
  top: 41px;
  font-weight: 600;
}
#panel-labels .batch-empty { padding: 24px; color: #6d6d6d; text-align: center; font-size: 13px; }

/* ---------- v2 additions (2026-07-02) ---------- */
/* Prepare buttons live inside the pending tables; counts stay the middle col. */
#panel-labels .pending-table.v2 td:nth-child(2),
#panel-labels .pending-table.v2 th:nth-child(2) { text-align: right; }
#panel-labels .pending-table.v2 td:last-child,
#panel-labels .pending-table.v2 th:last-child { text-align: center; width: 92px; }
#panel-labels .btn-sm {
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.4;
  border-radius: 0.2rem;
}
#panel-labels .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
/* Post-mark-printed report actions */
#panel-labels .report-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #ccc;
  background: #fffbe6;
  font-size: 13px;
}
#panel-labels .report-bar span { font-weight: 600; }
