/*
 * 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.
 */

/* Toast notification animations */
@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.animate-slide-in {
  animation: slide-in 0.3s ease-out forwards;
}

.animate-slide-out {
  animation: slide-out 0.3s ease-in forwards;
}

/* ── Scrollbar Hide ── */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ── Visual Org Tree ── */
.vtree {
  --line: #d1d5db;
  --lw: 1px;
  --gap: 14px;
}

.vtree,
.vtree ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
}

/* Nested ULs: space above for the parent-to-bar connector */
.vtree li > ul {
  position: relative;
  padding-top: var(--gap);
}

.vtree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: var(--gap) 4px 0;
}

/* ── Sibling connectors ── */
/* ::before = left half of horizontal bar, ::after = right half + vertical drop */
.vtree li::before,
.vtree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: var(--lw) solid var(--line);
  width: 50%;
}

.vtree li::after {
  right: auto;
  left: 50%;
  border-left: var(--lw) solid var(--line);
  height: var(--gap);
}

/* First child: no bar to the left */
.vtree li:first-child::before { border: 0 none; }
.vtree li:first-child::after { border-radius: 4px 0 0 0; }

/* Last child: bar + vertical on the left side only */
.vtree li:last-child::after { border: 0 none; }
.vtree li:last-child::before {
  border-right: var(--lw) solid var(--line);
  border-radius: 0 4px 0 0;
}

/* Only child: straight line, no horizontal bar */
.vtree li:only-child::before,
.vtree li:only-child::after { display: none; }
.vtree li:only-child { padding-top: 0; }

/* ── Parent-to-children vertical connector ── */
.vtree li > ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: var(--lw) solid var(--line);
  height: var(--gap);
}

/* Root level: no connectors above */
.vtree > li { padding-top: 0; }
.vtree > li::before,
.vtree > li::after { display: none; }

