/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;
  width: 34px;
  height: 24px;
}

.app-brand-logo.demo svg {
  width: 35px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks>* {
  display: block !important;
}

.demo-inline-spacing>* {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }

  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}

.layout-demo-placeholder img {
  width: 900px;
}

.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/*
* Branding Refinement: Deeper, Vibrant Purple and Black Text
******************************************************************************/

:root {
  --bs-primary: #5a3ce0 !important;
  --bs-primary-rgb: 90, 60, 224 !important;
  --bs-primary-hover: #4e31cc !important;
}

/* Override Helper Classes */
.light-style .text-primary {
  color: #5a3ce0 !important;
}

.light-style .bg-primary {
  background-color: #5a3ce0 !important;
}

/* Buttons */
.light-style .btn-primary {
  background-color: #5a3ce0 !important;
  border-color: #5a3ce0 !important;
  color: #fff !important;
  box-shadow: 0 0.125rem 0.25rem rgba(90, 60, 224, 0.4);
}

.light-style .btn-primary:hover,
.light-style .btn-primary:focus,
.light-style .btn-primary:active {
  background-color: #4e31cc !important;
  border-color: #4e31cc !important;
  color: #fff !important;
}

/* Sidebar Menu Item Spacing */
.menu-vertical .menu-item {
  margin-bottom: 0.5rem !important;
}

/* Menu Active State - Aggressive Overrides to ensure solid Royal Purple */
.layout-menu .menu-item.active>.menu-link,
.light-style .menu-vertical .menu-item.active>.menu-link,
.bg-menu-theme .menu-item.active>.menu-link {
  background: #5a3ce0 !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: 0 0.125rem 0.375rem rgba(90, 60, 224, 0.4) !important;
}

.layout-menu .menu-item.active>.menu-link i,
.layout-menu .menu-item.active>.menu-link div {
  color: #fff !important;
}

/* Black Text Colors for better legibility */
.light-style body,
.light-style .text-body,
.light-style .card-text {
  color: #000000 !important;
}

.light-style h1,
.light-style h2,
.light-style h3,
.light-style h4,
.light-style h5,
.light-style h6,
.light-style .h1,
.light-style .h2,
.light-style .h3,
.light-style .h4,
.light-style .h5,
.light-style .h6 {
  color: #000000 !important;
  font-weight: 700;
}

.light-style .card-title,
.light-style .form-label,
.light-style .col-form-label {
  color: #000000 !important;
  font-weight: 600;
}

/* Table Headers and content */
.light-style .table th,
.light-style .table td {
  color: #000000 !important;
}

.light-style .menu-link {
  color: #000000 !important;
  font-weight: 500;
}

/* Agreement Key Utility */
.app-agreement-key {
  color: #5a3ce0 !important;
  font-weight: 700;
  font-family: 'Courier New', Courier, monospace;
}

.clickable-key:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.light-style .menu-header-text {
  color: #5a3ce0 !important;
  /* Purple for category titles */
  font-weight: 700;
  text-transform: uppercase;
}

/* jstree Customization: Modern Boxed UI (RTL Optimized & Stable Containers) */
#file-manager-tree {
  padding: 10px;
}

.jstree-node {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  position: relative !important;
  display: block;
}

.jstree-wholerow {
  height: 54px !important;
  border-radius: 8px !important;
  background: #f8f9fa !important;
  border: 1px solid #eee !important;
  width: 100% !important;
  top: 0 !important;
  z-index: 0;
}

.jstree-wholerow-clicked {
  background: rgba(90, 60, 224, 0.08) !important;
  border: 1px solid rgba(90, 60, 224, 0.2) !important;
}

.jstree-clicked {
  color: #5a3ce0 !important;
  font-weight: 600 !important;
}

.jstree-anchor {
  height: 54px !important;
  line-height: 54px !important;
  padding-right: 40px !important;
  /* Space for icons following indentation */
  padding-left: 60px !important;
  /* Space for fixed badge on far left */
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  z-index: 5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Custom Circle Badge on the Far Left - Fixed Position inside the row */
.jstree-anchor:before {
  content: attr(data-count);
  position: absolute;
  left: 15px;
  /* Pin to the left end of the row */
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: #5a3ce0;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Selected State Checkmark */
.jstree-clicked:before {
  content: "\ea5e" !important;
  font-family: 'tabler-icons' !important;
  background: #fff !important;
  color: #5a3ce0 !important;
  border: 1px solid #5a3ce0;
}

.jstree-node[data-type="file"] .jstree-anchor:before {
  content: "";
  background: #e7e7ff;
  border: 1px solid #d2d2f8;
}

/* Icons visibility - Normal Flow inside Anchor to follow indentation */
.jstree-default .jstree-icon {
  background-image: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
}

.jstree-themeicon {
  font-size: 1.3rem !important;
  margin-left: 10px !important;
  margin-right: -5px !important;
  width: 25px !important;
  height: 25px !important;
}

.jstree-default .jstree-node {
  background-image: none !important;
}

/* Expand/Collapse Chevron - Pinned inside the Box at the start of current indent */
.jstree-ocl {
  position: absolute !important;
  z-index: 10;
  width: 32px !important;
  height: 54px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  /* Indentation is handled by native padding-right on li */
}

.jstree-ocl:before {
  content: "\ea5f" !important;
  /* chevron-right */
  font-family: 'tabler-icons' !important;
  font-size: 1.5rem;
  color: #5a3ce0;
}

.jstree-open>.jstree-ocl:before {
  content: "\ea60" !important;
  /* chevron-down */
}

/* Fix Indentation to keep box aligned */
.jstree-default .jstree-node {
  margin-left: 0 !important;
}

.jstree-default .jstree-children {
  padding-right: 28px !important;
  /* Standard indentation */
}

/* Table Tweak */
.table-responsive {
  overflow-x: visible !important;
}