/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.flash {
  animation: flash-enter 0.3s ease-out;
}

.flash-leave {
  animation: flash-leave 0.3s ease-in forwards;
}

@keyframes flash-enter {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flash-leave {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(1rem);
  }
}

/* Sticky column shadow on horizontal scroll */
.is-scrolled .sticky-col::after {
  content: "";
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
}

.is-truncated .sticky-col-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  bottom: 0;
  width: 6px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
}

/* Always-visible scrollbar for data tables */
.scrollbar-visible {
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}
.scrollbar-visible::-webkit-scrollbar {
  height: 6px;
}
.scrollbar-visible::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-visible::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 3px;
}
.scrollbar-visible::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

/* Custom checkbox checkmark */
.custom-checkbox:checked {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Custom select chevron */
.custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
}

/* Collapsed sidebar */
[data-collapsed] .sidebar-label { display: none; }
[data-collapsed] .sidebar-group-children { display: none; }
[data-collapsed] .sidebar-link { justify-content: center; }
[data-collapsed] .sidebar-link svg { margin-right: 0; }

/* Popover overrides inside collapsed sidebar */
[data-collapsed] .sidebar-popover .sidebar-label { display: inline; }
[data-collapsed] .sidebar-popover .sidebar-link { justify-content: flex-start; }

/* Hide tooltips inside the popover (label is already visible) */
.sidebar-popover [role="tooltip"] { display: none; }

/* Invisible bridge to maintain hover when moving mouse to popover */
.sidebar-popover::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 12px;
}

