/*
 * CSP-safe overrides for jQuery UI ui-lightness theme
 * Prevent external background images that violate img-src CSP.
 */
.ui-widget-header,
.ui-widget-content,
.ui-state-default,
.ui-state-hover,
.ui-state-active,
.ui-state-focus {
  background-image: none !important;
}

/* Disable sprite image requests as well */
.ui-icon {
  background-image: none !important;
}

/* Print Area Styling */
.print-area {
  display: none;
}

/* Print Layout Styling */
#newPrintLayout {
  width: 210mm;
  height: auto;
  padding: 10mm 12mm;
  margin: 0 auto;
  background: white;
  color: black;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  page-break-after: always;
}

/* Print Table Styling */
.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 12px;
}

.print-table th,
.print-table td {
  border: 0.75px solid #000;
  padding: 8px 10px;
  text-align: center;
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.print-table td.details-cell {
  text-align: left;
  padding-left: 15px;
  font-size: 11px;
}

.print-table thead tr:first-child td {
  font-weight: bold;
  text-align: center;
  /* remove background in print for ink-friendly output */
  background: transparent !important;
  padding: 6px 10px;
}

.print-table thead tr:nth-child(2) td {
  text-align: center;
  background: transparent !important;
  font-size: 11px;
  padding: 8px 10px;
}

.print-table thead tr:last-child th {
  font-weight: bold;
  background: transparent !important;
  text-align: center;
  padding: 6px 10px;
}

.print-table tbody tr {
  page-break-inside: avoid;
}

/* Print Footer Styling */
.print-footer {
  margin-top: 20px;
  padding: 15px 20px;
  font-size: 12px;
  text-align: justify;
}

.approval-section {
  margin-bottom: 30px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
}

.signature-section {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin-top: 40px;
  font-size: 11px;
}

.signature-left,
.signature-right {
  flex: 1;
  text-align: center;
}

/* Remove underlines and heavy weights in print for a clean look */
.signature-left div:first-child,
.signature-right div:first-child {
  text-decoration: none !important;
  margin-bottom: 8px;
  font-weight: 600 !important;
}

/* Ensure office name sits directly below the name/designation */
.signature-left div,
.signature-right div {
  display: block;
  line-height: 1.25;
}

/* Print Media Query */
@media print {
  body,
  html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: white;
    font-size: 12px;
  }

  /* Hide all page content except print area */
  body > * {
    display: none !important;
  }

  .print-area {
    display: block !important;
    position: static;
    width: auto;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    background: transparent !important;
  }

  /* Remove link underlines and preserve text color in print */
  .print-area a {
    text-decoration: none !important;
    color: inherit !important;
  }

  #newPrintLayout {
    width: 100%;
    page-break-inside: avoid;
    margin: 0;
    padding: 0;
    /* avoid printing large background blocks */
    background: transparent !important;
  }

  .print-table {
    page-break-inside: avoid;
  }

  .print-table tbody tr {
    page-break-inside: avoid;
  }

  @page {
    size: A4 portrait;
    margin: 10mm 12mm;
  }
}

  /* Floating Action Buttons (FAB) */
  .fab-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10550;
  }
  .fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }
  .fab-save { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); }
  .fab-print { background: linear-gradient(135deg,#06b6d4 0%,#0ea5a4 100%); }
  .fab:focus { outline: none; box-shadow: 0 0 0 4px rgba(102,126,234,0.12); }
  @media (max-width: 576px) {
    .fab { width: 48px; height: 48px; font-size: 18px; }
    .fab-container { right: 12px; bottom: 12px; }
  }

  @media print {
    .fab-container, .fab { display: none !important; }
  }

.a2hs-modal-overlay{
  position:fixed;
  top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,0.5);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
}
.a2hs-modal{
  background:#fff;
  border-radius:12px;
  padding:16px;
  width:90%;
  max-width:420px;
  text-align:center;
  box-shadow:0 20px 40px rgba(0,0,0,0.2);
}
.a2hs-buttons{display:flex;gap:8px;justify-content:center;margin-top:8px}
.a2hs-install{background:#2563eb;color:#fff;border:none;border-radius:8px;padding:10px 16px;font-weight:600}
.a2hs-cancel{background:#e5e7eb;color:#111827;border:none;border-radius:8px;padding:10px 16px;font-weight:600}
.a2hs-spinner{display:none;margin-top:12px}

  /* Desktop: Position action buttons below table instead of floating */
  @media (min-width: 992px) {
    .fab-container {
      position: static !important;
      right: auto !important;
      bottom: auto !important;
      flex-direction: row !important;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 12px;
    }
  }
