/* static\assets\css\custom-additions.css  */


.table-cell-wrap {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px; /* Adjust as needed */
  }

  
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Slightly darker background for better visibility */
    z-index: 1050;
    display: flex;
    flex-direction: column; /* Arrange elements vertically */
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 20px; /* Add padding for smaller viewports */
}

#loading-message {
    text-align: center;
    margin-bottom: 20px; /* Add spacing between text and progress bar */
}

#loading-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px; /* Add spacing below the main message */
}

#loading-status {
    font-size: 1.2rem;
    font-weight: normal;
    color: #d3d3d3; /* Light gray for better contrast with the main text */
    margin-bottom: 20px; /* Add spacing below the status message */
    display: none; /* Hidden by default, shown dynamically when set */
}

#loading-progress-bar-container {
    width: 80%; /* Set the width of the progress bar container */
    background: #444; /* Dark background for the progress bar container */
    border-radius: 5px;
    overflow: hidden;
    display: none; /* Hidden by default, shown dynamically when enabled */
}

#loading-progress-bar {
    height: 10px; /* Height of the progress bar */
    background: #4caf50; /* Green progress bar */
    width: 0%; /* Initial width of the progress bar */
    transition: width 0.3s ease-in-out; /* Smooth transition for progress updates */
    border-radius: 5px 0 0 5px; /* Rounded edges for the progress bar */
}


.magnify-container {
    position: relative;
    display: inline-block;
}

.magnify-popup {
    position: fixed;
    display: none; /* Hidden by default */
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    pointer-events: none; /* Prevent interaction */
    z-index: 1000; /* Ensure it appears above other elements */
}

/* Remove padding/margin around the content for full-width display */
.full-width-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important; /* Force the content to span the entire width */
    max-width: 100% !important; /* Prevent any max-width constraints */
    display: flex; /* Ensures the content stretches as needed */
    flex-direction: column; /* Ensure content flows vertically */
    align-items: stretch; /* Stretches all inner content */
}


/* Ensure table stretches fully */
.full-width-table {
    width: 100%;
    margin: 0 auto; /* Center the table if needed */
    border-spacing: 0; /* Remove spacing between table cells */
}


/* make an input text field read only */
.read-only-field {
    background-color: #d6d6d6;
    opacity: 1;
    pointer-events: none;
}

/* From Uiverse.io by sssynk */ 
/* Hide the default checkbox */
body .custom-checkbox-container input {
 position: absolute;
 opacity: 0;
 cursor: pointer;
 height: 0;
 width: 0;
 border-radius: 5px;
}

body .custom-checkbox-container {
 display: block;
 position: relative;
 cursor: pointer;
 font-size: 20px;
 user-select: none;
 border-radius: 5px;
 /* box-shadow: 2px 2px 0px rgb(183, 183, 183); */ /* Removed shadow from container */
}

/* Create a custom checkbox */
.checkmark {
 top: 0;
 left: 0;
 height: 1.3em;
 width: 1.3em;
 background-color: #ccc;
 display: inline-block; /* Ensure layout context */
 border-radius: 5px;
  z-index: 1; /* Add z-index to ensure visibility */
}

/* When the checkbox is checked, add a blue background */
body .custom-checkbox-container input:checked ~ .checkmark {
 box-shadow: 3px 3px 0px rgb(183, 183, 183);
 transition: all 0.2s;
 opacity: 1;
 background-image: linear-gradient(45deg, rgb(100, 61, 219) 0%, rgb(217, 21, 239) 100%);
}

body .custom-checkbox-container input ~ .checkmark {
 transition: all 0.2s;
 opacity: 1;
 box-shadow: 1px 1px 0px rgb(183, 183, 183);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
 content: "";
 position: absolute; /* Restore absolute positioning */
 opacity: 0;
 transition: all 0.2s;
}

/* Show the checkmark when checked */
/* Increase specificity for #selectAll */
body .custom-checkbox-container input#selectAll:checked ~ .checkmark:after,
body .custom-checkbox-container input:checked ~ .checkmark:after {
 opacity: 1;
 transition: all 0.2s;
}

/* Style the checkmark/indicator */
body .custom-checkbox-container .checkmark:after {
 left: 0.45em;
 top: 0.25em;
 width: 0.25em;
 height: 0.5em;
 border: solid white;
 border-width: 0 0.15em 0.15em 0;
 transform: rotate(45deg);
}

/* From Uiverse.io by sssynk */
/* Conflicting .container rules removed. Using .custom-checkbox-container defined above. */

/* ============================================
   MOBILE SIDEBAR OFF-CANVAS BACKDROP
   Shows a dark overlay behind the sidebar on mobile
   ============================================ */

#sidenav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1029; /* Just below sidebar (1030) */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#sidenav-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* On mobile, ensure sidebar slides over content smoothly */
@media (max-width: 1199.98px) {
  .g-sidenav-pinned #sidenav-main {
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.3);
  }
}

/* ============================================
   DARK MODE LOGO FIXES
   Invert dark logos to white when in dark mode
   ============================================ */

/* Sidebar logo (MyOtherJob.io) - invert to white in dark mode */
body.dark-version .sidenav .navbar-brand-img {
    filter: invert(1) brightness(2);
}

/* Navbar logo (MOJ small) - invert to white in dark mode */
body.dark-version .navbar-main .navbar-brand-img {
    filter: invert(1) brightness(2);
}

/* Alternative: If you want a softer white instead of pure inversion */
/* Uncomment below and comment out the above if preferred */
/*
body.dark-version .sidenav .navbar-brand-img,
body.dark-version .navbar-main .navbar-brand-img {
    filter: brightness(0) invert(1);
}
*/

/* ============================================
   ACCESSIBILITY — Skip Navigation
   ============================================ */
.skip-to-main {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: 1rem 1.5rem;
  background: #344767;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
}
.skip-to-main:focus {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

/* ============================================
   ACCESSIBILITY — Focus Indicators
   ============================================ */
*:focus-visible {
  outline: 2px solid #344767 !important;
  outline-offset: 2px !important;
}
body.dark-version *:focus-visible {
  outline-color: #7dd3fc !important;
}
.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.dropdown-item:focus-visible {
  outline: 2px solid #344767 !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* ============================================
   ACCESSIBILITY WIDGET — Modifier Classes
   ============================================ */
body.a11y-text-lg { font-size: 110% !important; }
body.a11y-text-xl { font-size: 125% !important; }

body.a11y-high-contrast {
  filter: contrast(1.4);
}
body.a11y-high-contrast .card,
body.a11y-high-contrast .btn { border: 1px solid #000 !important; }

body.a11y-dyslexia-font,
body.a11y-dyslexia-font * {
  font-family: 'OpenDyslexic', sans-serif !important;
}

body.a11y-highlight-links a {
  text-decoration: underline !important;
  outline: 1px dashed currentColor !important;
}

body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
  animation-duration: 0.001s !important;
  transition-duration: 0.001s !important;
}

/* ============================================
   ADMIN IMPERSONATION BANNER
   ============================================ */
.impersonate-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #F59E0B;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.6rem 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.impersonate-banner i {
  font-size: 1rem;
}
body.impersonating-active {
  padding-top: 48px !important;
}
body.impersonating-active .sidenav {
  top: 48px;
  height: calc(100vh - 48px);
}
body.impersonating-active .main-content .navbar.fixed-top {
  top: 48px;
}

/* ============================================
   IMAGE HOVER TOOLTIP
   Follows cursor on mouseover for .moj-hover-img
   ============================================ */
.moj-img-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border: 2px solid #fff;
  background: #e9ecef;
  display: none;
  width: 180px;
  height: 180px;
  object-fit: cover;
}
