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

/* Import the library styles */
/* Org Chart Tree Lines */
/* ORG TREE STYLES */
/* Ensure the container has no default padding that messes up alignment */
.org-tree,
.org-tree ul {
  padding-left: 20px;
  /* Indent each level */
  list-style-type: none;
}

/* Position context for the lines */
.org-tree li {
  position: relative;
  padding-left: 20px;
  /* Space for the horizontal line */
  margin-bottom: 0;
}

.org-tree li>ul {
  padding-top: 10px;
  position: relative;
  /* Establishes a valid anchor for the 'Stem' */
}

/* The Vertical Line (Tree Trunk) */
/* Connects this item to the one below it */
.org-tree ul li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-left: 2px solid #e5e7eb;
  /* tailwind gray-200 */
}

/* The Horizontal Line (Branch) */
/* Connects the trunk to the card */
.org-tree li::after {
  content: '';
  position: absolute;
  top: 24px;
  /* Center of a 48px avatar (h-12) */
  left: 0;
  width: 20px;
  border-top: 2px solid #e5e7eb;
  /* tailwind gray-200 */
}

.org-tree li>ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  /* Aligns with the padding-left of the list */
  width: 0;
  height: 10px;
  /* Matches the padding-top exactly */
  border-left: 2px solid #e5e7eb;
  /* Matches your tailwind gray-200 */
}

/* FIX: Don't draw the vertical line past the last child */
.org-tree ul>li:last-child::before {
  height: 25px;
  /* Stop exactly at the branch */
}


/* ========================================================== */
/* TIPTAP EDITOR STYLES: Overriding Tailwind's Preflight      */
/* ========================================================== */

/* Base Editor spacing */
.ProseMirror>*+* {
  margin-top: 0.75em;
}

/* Headings */
.ProseMirror h1 {
  font-size: 2rem !important;
  font-weight: 800 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.2 !important;
  color: #111827 !important;
  /* gray-900 */
}

.ProseMirror h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.3 !important;
  color: #1f2937 !important;
  /* gray-800 */
}

.ProseMirror h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.4 !important;
  color: #374151 !important;
  /* gray-700 */
}

/* Lists */
.ProseMirror ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.ProseMirror ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.ProseMirror li p {
  margin-top: 0.25em !important;
  margin-bottom: 0.25em !important;
}

/* Blockquotes */
.ProseMirror blockquote {
  border-left: 4px solid #e5e7eb !important;
  /* gray-200 */
  padding: 0.5rem 1rem !important;
  margin: 1.5rem 0 !important;
  font-style: italic !important;
  color: #4b5563 !important;
  /* gray-600 */
  background-color: #f9fafb !important;
  /* gray-50 */
  border-radius: 0 0.25rem 0.25rem 0 !important;
}

/* Horizontal Rule */
.ProseMirror hr {
  border: none !important;
  border-top: 2px solid #e5e7eb !important;
  margin: 2rem 0 !important;
}