/*
* 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: 72px !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;
}

/*
* List / DataTable cards: tall minimum so short tables still leave white space below controls
* for row dropdowns and a less cramped layout. overflow visible avoids clipping at card-body.
******************************************************************************/
.card:has(.table-responsive),
.card:has(.list-table-actions),
.card:has(table.dataTable),
.card:has(.dataTables_wrapper) {
  min-height: 48rem;
  overflow: visible;
}

/* Organisation calendar list pages (tasks/reminders/meetings/events): compact card, no forced tall shell */
.card.card-calendar-list-table:has(.table-responsive) {
  min-height: 0;
}
.card.card-calendar-list-table:has(.table-responsive) > .card-body {
  padding-bottom: 1rem;
  overflow: visible;
}

.card:has(.table-responsive) > .card-body,
.card:has(.list-table-actions) > .card-body,
.card:has(table.dataTable) > .card-body,
.card:has(.dataTables_wrapper) > .card-body {
  overflow: visible;
  padding-bottom: 2.5rem;
}

.card:has(.table-responsive) > .card-header,
.card:has(.list-table-actions) > .card-header,
.card:has(table.dataTable) > .card-header,
.card:has(.dataTables_wrapper) > .card-header {
  overflow: visible;
}

/* Standardized list row actions: view / edit / kebab (match /clients/) */
.list-table-actions,
.project-action-icons,
.client-action-icons {
  gap: 0.5rem !important;
}

.list-table-actions .btn-icon,
.project-action-icons .btn-icon,
.client-action-icons .btn-icon {
  width: 2.125rem;
  height: 2.125rem;
  min-width: 2.125rem;
  min-height: 2.125rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list-table-actions .btn-icon .ti,
.project-action-icons .btn-icon .ti,
.client-action-icons .btn-icon .ti {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

/* Kebab same footprint as eye/edit inside standardized action cells */
table td .list-table-actions .dropdown > [data-bs-toggle="dropdown"].btn.btn-sm,
table td .project-action-icons .dropdown > [data-bs-toggle="dropdown"].btn.btn-sm,
table td .client-action-icons .dropdown > [data-bs-toggle="dropdown"].btn.btn-sm {
  min-width: 2.125rem !important;
  min-height: 2.125rem !important;
  width: 2.125rem;
  height: 2.125rem;
  padding: 0 !important;
  font-size: inherit !important;
}

table td .list-table-actions .dropdown > [data-bs-toggle="dropdown"].btn .ti,
table td .project-action-icons .dropdown > [data-bs-toggle="dropdown"].btn .ti,
table td .client-action-icons .dropdown > [data-bs-toggle="dropdown"].btn .ti {
  font-size: 1.25rem !important;
  line-height: 1;
}

/*
 * Icon-only row actions in any table cell (vendors, finance partials, etc.) often omit
 * .list-table-actions; Vuexy .btn-icon.btn-sm keeps ~0.8125rem — scale them up to match lists.
 */
table tbody td .btn.btn-sm.btn-icon,
table tbody td a.btn.btn-sm.btn-icon,
table tbody td span.btn.btn-sm.btn-icon {
  width: 2.125rem !important;
  height: 2.125rem !important;
  min-width: 2.125rem !important;
  min-height: 2.125rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

table tbody td .btn.btn-sm.btn-icon .ti,
table tbody td a.btn.btn-sm.btn-icon .ti,
table tbody td span.btn.btn-sm.btn-icon .ti {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

@media (max-width: 768px) {
  .list-table-actions,
  .project-action-icons,
  .client-action-icons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.375rem !important;
  }
}

/* Primary entity links in list tables */
a.list-table-name-link,
a.client-name-link,
a.lead-name-link,
a.project-name-link,
.table.table-hover tbody td a.lead-link.fw-medium {
  color: var(--bs-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a.list-table-name-link:hover,
a.client-name-link:hover,
a.lead-name-link:hover,
a.project-name-link:hover,
.table.table-hover tbody td a.lead-link.fw-medium:hover {
  color: var(--bs-link-hover-color, #0a58ca);
}

/*
* Table row action dropdowns: above layout chrome (navbar 1080 on sm) and table/card edges.
* Popper fixed + high z-index. Row menus may stack above an open modal — acceptable for usability.
******************************************************************************/
table .dropdown-menu {
  --bs-dropdown-zindex: 10850;
  z-index: 10850;
}

table .dropdown-menu.show {
  z-index: 10850;
}

table .dropdown-menu .dropdown-item .ti {
  font-size: 1.25rem;
  vertical-align: -0.15em;
}

table td .dropdown {
  overflow: visible;
}

/* Row-menu kebab in table cells: match icon action footprint (icon-only .btn-sm toggles) */
table tbody td .dropdown > [data-bs-toggle="dropdown"].btn.btn-sm.btn-icon {
  min-width: 2.125rem !important;
  min-height: 2.125rem !important;
  width: 2.125rem !important;
  height: 2.125rem !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

table tbody td .dropdown > [data-bs-toggle="dropdown"].btn.btn-sm.btn-icon .ti {
  font-size: 1.25rem !important;
  line-height: 1 !important;
}

/* Text dropdown triggers in table cells (rare): comfortable tap target without stretching icon rows */
table tbody td .dropdown > [data-bs-toggle="dropdown"].btn:not(.btn-icon) {
  min-height: 2.5rem;
  padding: 0.375rem 0.75rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/*
* App-wide Tabler icon scale (Vuexy .btn-icon.btn-sm forces ~0.8125rem on the button; ti-xs/ti-sm
* were 1rem / 1.125rem and read tiny on CRM lists, user-invites, and table headers.)
******************************************************************************/
body .ti-xs {
  font-size: 1.25rem !important;
}

body .ti-sm {
  font-size: 1.375rem !important;
}

/* Leading icon on compact card buttons (e.g. Export CSV) without ti-xs/ti-sm */
.layout-wrapper .card .btn.btn-sm:not(.btn-icon) > i.ti:first-child {
  font-size: 1.25rem !important;
  vertical-align: -0.12em;
}

/* Tab groups: Invites / Active Users / Employees / Groups */
.layout-wrapper .btn-group > .btn > .ti:not(.ti-md):not(.ti-lg):not(.ti-xl) {
  font-size: 1.35rem !important;
  vertical-align: -0.12em;
}

/* Table headers: floor size when templates use ti-xs/ti-sm or bare .ti */
.layout-wrapper table thead th .ti:not(.ti-md):not(.ti-lg):not(.ti-xl) {
  font-size: 1.25rem !important;
  vertical-align: -0.15em;
}
