/* Fix for Chrome/Edge/Safari Autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Optional: Fix the text color if it changes during autofill */
input:-webkit-autofill {
  -webkit-text-fill-color: #333 !important;
}

.table-action-center .table thead th:last-child {
  text-align: center;
}

/* ═══════════════════════════════════════════════
   DRIVER.JS TOUR POPOVER THEME
═══════════════════════════════════════════════ */

.coa-tour-popover.driver-popover {
  background: #ffffff !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: 0 20px 50px rgba(22, 16, 106, 0.2) !important;
  border: 1px solid rgba(22, 16, 106, 0.1) !important;
  max-width: 340px !important;
}

.coa-tour-popover .driver-popover-title {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 800 !important;
  color: #16106a !important;
  font-size: 1.15rem !important;
  margin-bottom: 10px !important;
}

.coa-tour-popover .driver-popover-description {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem !important;
  color: #475569 !important;
  line-height: 1.6 !important;
}

.coa-tour-popover .driver-popover-footer {
  margin-top: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.driver-popover-footer button {
  text-shadow: none;
  font-weight: 600;
}

.coa-tour-popover .driver-popover-progress-text {
  font-family: 'DM Sans', sans-serif !important;
  color: #94a3b8 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  margin-right: auto !important;
}

.coa-tour-popover .driver-popover-btn {
  border-radius: 50px !important;
  padding: 8px 18px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  font-family: 'DM Sans', sans-serif !important;
  transition: all 0.2s ease !important;
  text-shadow: none !important;
  border: none !important;
}

/* Primary Button: Next / Done */
.coa-tour-popover .driver-popover-next-btn {
  background-color: #16106a !important;
  color: #ffffff !important;
}

.coa-tour-popover .driver-popover-next-btn:hover {
  background-color: #221996 !important;
  transform: translateY(-1px) !important;
}

/* Previous Button */
.coa-tour-popover .driver-popover-prev-btn {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}

.coa-tour-popover .driver-popover-prev-btn:hover {
  background-color: #e2e8f0 !important;
  color: #16106a !important;
}

.btn-coa-primary-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius-btn);
  padding: 7px 18px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
}

.btn-coa-primary-outline.btn-sm {
  padding: 5px 14px !important;
}

.form-control:disabled {
  background-color: var(--bs-secondary-bg) !important;
  opacity: 0.5;
}

/* Print specific styles for Work Report and general screens */
@media print {

  /* Hide the print button */
  button[title="Print"] {
    display: none !important;
  }

  /* Allow containers to expand to print across multiple pages without scrollbars */
  body,
  html,
  .wr-modal-bg,
  .wr-modal-container,
  .table-responsive,
  .wrk-report-modal,
  .overflow-auto,
  .overflow-x-auto {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Remove padding/margin/shadows for a clean printout */
  body,
  html,
  .wr-modal-bg,
  .modal-body,
  .modal-content {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .wr-modal-container {
    padding: 555px !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force background colors and text colors to be included in the print */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* ----------------------------------------------------------------------
     STANDALONE PDF PRINT FIXES
     (Bypasses the visibility: hidden from main.css on standalone pages)
     ---------------------------------------------------------------------- */
  #report-print-area,
  #report-print-area * {
    visibility: visible !important;
  }

  #report-print-area {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #report-print-area .wr-modal-container {
    border: 1px solid #e1e5eb !important;
    border-radius: 8px !important;
    background-color: #f7f9fc !important;
    box-shadow: inset 0 0 0 1000px #f7f9fc !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 15px !important;
    min-height: 100vh !important;
  }

  #report-print-area .table-responsive,
  #report-print-area .overflow-auto,
  #report-print-area .overflow-x-auto {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #report-print-area .wr-view-header-actions,
  #report-print-area .btn-close,
  #report-print-area .modal-header,
  #report-print-area .modal-footer {
    display: none !important;
  }

  #report-print-area .d-flex {
    display: flex !important;
  }

  #report-print-area .row {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #report-print-area .justify-content-between {
    justify-content: space-between !important;
  }

  #report-print-area .align-items-sm-start {
    align-items: flex-start !important;
  }

  #report-print-area .flex-column.flex-sm-row,
  #report-print-area .flex-sm-row {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  #report-print-area .col-lg,
  #report-print-area .col-md-12,
  #report-print-area .col-sm-12 {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
  }

  #report-print-area .col-sm-6 {
    flex: 0 0 50% !important;
    width: 50% !important;
  }

  #report-print-area .col-sm-7 {
    flex: 0 0 58.33333333% !important;
    width: 58.33333333% !important;
  }

  #report-print-area .col-md-5,
  #report-print-area .col-sm-5 {
    flex: 0 0 41.66666667% !important;
    width: 41.66666667% !important;
  }

  #report-print-area .col-sm-4 {
    flex: 0 0 33.33333333% !important;
    width: 33.33333333% !important;
  }

  #report-print-area .col-sm-2 {
    display: none !important;
  }

  #report-print-area .order-sm-1 {
    order: 1 !important;
  }

  #report-print-area .order-sm-2 {
    order: 2 !important;
  }

  #report-print-area .w-auto,
  #report-print-area .w-sm-auto {
    width: auto !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  #report-print-area .mb-sm-0 {
    margin-bottom: 0 !important;
  }

  #report-print-area .mt-sm-0 {
    margin-top: 0 !important;
  }

  #report-print-area .ms-auto,
  #report-print-area .ms-sm-auto {
    margin-left: auto !important;
  }

  #report-print-area .pe-lg-0 {
    padding-right: 0 !important;
  }

  #report-print-area .me-lg-0 {
    margin-right: 0 !important;
  }

  #report-print-area .pe-sm-4 {
    padding-right: 1.5rem !important;
  }

  #report-print-area .text-sm-end {
    text-align: right !important;
  }

  #report-print-area .wr-table-min-w1 {
    min-width: 0 !important;
  }

  #report-print-area table,
  #report-print-area .table,
  #report-print-area .w-100,
  #report-print-area .w-lg-70 {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    table-layout: fixed !important;
  }

  #report-print-area .table td {
    background-color: transparent !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  /* Keep all amounts (which are right-aligned) on a single line */
  #report-print-area .table td.text-end {
    white-space: nowrap !important;
  }

  /* Ensure description text line breaks are respected in print */
  #report-print-area .td-description {
    width: 20% !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(1) {
    width: 15% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(2) {
    width: 35% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(3) {
    width: 15% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(4) {
    width: 10% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(5) {
    width: 5% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(6) {
    width: 10% !important;
  }

  #report-print-area .wr-table-header-row th:nth-child(7) {
    width: 10% !important;
  }

  #report-print-area .wr-border-dashed {
    border-bottom: 1px dashed #dce1e9 !important;
  }

  #report-print-area .bg-white {
    background-color: #ffffff !important;
    box-shadow: inset 0 0 0 1000px #ffffff !important;
  }

  #report-print-area .table-responsive {
    background-color: #ffffff !important;
    box-shadow: inset 0 0 0 1000px #ffffff !important;
    border-radius: 8px 8px 0 0 !important;
  }

  #report-print-area .row.bg-white {
    border-radius: 0 0 8px 8px !important;
  }

  #report-print-area .bg-transparent {
    background-color: transparent !important;
    box-shadow: none !important;
  }

  #report-print-area .wr-title-lg {
    color: #9aa5b5 !important;
  }

  #report-print-area .text-muted {
    color: #555 !important;
  }

  #report-print-area .text-secondary {
    color: #6c757d !important;
  }

  #report-print-area .text-dark {
    color: #212529 !important;
  }

  #report-print-area .text-end {
    text-align: right !important;
  }

  #report-print-area .text-start {
    text-align: left !important;
  }

  #report-print-area .text-center {
    text-align: center !important;
  }

  /* Specific table column widths for the totals table during print */
  #report-print-area td.wr-text-xs-spaced.align-middle.text-dark.px-0.pt-3.text-end.text-uppercase.fw-bold {
    width: 70% !important;
  }

  #report-print-area td.wr-border-dashed.text-end.bg-transparent.text-dark.px-0.py-1 {
    width: 75% !important;
  }

  #report-print-area td.wr-total-applied-val,
  #report-print-area td.wr-total-approved-val {
    width: 30% !important;
  }

}

/* Floating print button for standalone PDF pages (screen view) */
.floating-print-btn {
  position: fixed !important;
  bottom: 30px !important;
  right: 30px !important;
  z-index: 1050 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  padding: 8px 35px !important;
}

.ant-picker {
  padding: 7px 14px;
}

.ant-picker .ant-picker-input input {
  line-height: normal;
}

.ant-picker-dropdown .ant-picker-cell-disabled {
  opacity: .35;
}

.ant-picker-dropdown .ant-picker-cell-disabled .ant-picker-cell-inner {
  opacity: .5;
}

#tour-overview-Header-member .dropdown-menu li:last-child {
  border-top: 1px solid var(--bs-border-color) !important;
}

#viewNewsModal.modal-theme-glass .modal-content::after,
#viewNewsModal.modal-theme-glass .modal-content::before {
  display: none;
}

#viewAnnModal,
#viewArticleModal,
#viewCarouselModal,
#viewBannerModal {

  .modal-content::after,
  .modal-content::before {
    display: none;
  }
}