/* Stock Transfer Challan Styles */

/* PDF Page Setup */
@page {
  size: A4;
  margin: 0;
}

/* PDF Base Styles */
.challan-pdf html,
.challan-pdf body {
  margin: 0;
  padding: 0;
}

.challan-pdf .challan-wrapper {
  position: relative;
  width: 100%;
  min-height: 297mm; /* A4 height */
  background-color: white;
  overflow: hidden;
  margin: 0 auto;
  max-width: 1024px;
  padding: 32px;
}

.challan-pdf .challan-content {
  position: relative;
  z-index: 1;
}

/* Table Styles for Challan */
/* Make table wrapper background transparent for watermark visibility */
.challan-table > div[data-controller="table"] > div {
  background-color: transparent !important;
}

/* Remove header background color to keep watermark visible */
.challan-table thead,
.challan-table thead th {
  background-color: transparent !important;
}

/* Make table body transparent */
.challan-table table {
  background-color: transparent !important;
}

/* Make table cells transparent */
.challan-table tbody td {
  background-color: transparent !important;
}

/* Make table rows transparent */
.challan-table tbody tr {
  background-color: transparent !important;
}

/* Override Table component base background within challan only */
.challan-table .bg-base-100 {
  background-color: transparent !important;
}

/* Clear component wrapper background so watermark shows through */
.challan-table .rounded-box {
  background-color: transparent !important;
}

/* Make DaisyUI table backgrounds transparent (headers overridden below) */
.challan-table .table,
.challan-table .table :where(thead, tbody, tfoot) tr,
.challan-table .table :where(th, td) {
  background-color: transparent !important;
}

/* Keep table body transparent so watermark shows through */
.challan-preview .challan-table tbody td,
.challan-pdf .challan-table tbody td {
  background-color: transparent !important;
}

/* Watermark visibility for preview */
.challan-preview {
  position: relative;
}

.challan-preview .watermark-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.challan-preview .watermark-container img {
  width: 75%;
  opacity: 12.6;
  pointer-events: none;
  position: relative;
  mix-blend-mode: multiply;
  filter: grayscale(100%);
}

.challan-preview .challan-content-wrapper {
  position: relative;
  z-index: 1;
  background-color: transparent;
}

/* Ensure all content inside wrapper is above watermark */
.challan-preview .challan-content-wrapper > * {
  position: relative;
  z-index: 1;
}

