/* ============================================================
   Tek-Craft — overlays.css
   Modals, toasts, thermal receipt, cash denominations, print.
   ============================================================ */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 16, 0.55);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 10px;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  padding: 20px;
  box-shadow: var(--shadow-pop);
}

.modal.wide {
  max-width: 860px;
}

.modal h3 {
  margin-top: 0;
}

.toast {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 200;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  max-width: 90vw;
  box-shadow: var(--shadow-pop);
}

.receipt {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  background: #fff;
  color: #111;
  padding: 14px;
  border: 1px dashed #999;
  max-width: 340px;
  margin: 0 auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.denoms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.denoms button {
  flex: 1;
  min-width: 64px;
}

@media print {
  body * {
    visibility: hidden;
  }

  .print-area,
  .print-area * {
    visibility: visible;
  }

  .print-area {
    position: absolute;
    inset: 0;
  }

  .sidebar,
  .topbar,
  .table-pager {
    display: none;
  }

  .print-area .table-page-hidden {
    display: table-row;
  }

  body:has(#modalRoot .print-area) .layout {
    display: none;
  }

  #modalRoot .modal-bg {
    position: static;
    display: block;
    padding: 0;
    overflow: visible;
  }

  #modalRoot .print-area {
    position: static;
  }
}
