﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

.ibox-title {
    background-color: #ffffff;
    border-color: #e7eaec;
    border-image: none;
    border-style: solid solid none;
    border-width: 1px;
    color: inherit;
    margin-bottom: 0;
    padding: 15px 15px 8px 15px;
    min-height: 48px;
    position: relative;
    clear: both;
    -webkit-border-radius: 3px 3px 0 0;
    -moz-border-radius: 3px 3px 0 0;
    border-radius: 2px 2px 0 0;
}

.ibox-content {
  color: black; 

}

.text-muted {
    color: #333333 !important;
}

a.navbar-brand {
    /* Prevent the title from breaking into vertical letters on narrow screens.
       Allow truncation with ellipsis instead of forcing line breaks. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 65%;
    text-align: left;
}

/* Add vertical spacing under breadcrumb so following content doesn't touch it */
.breadcrumb {
    margin-bottom: 5px; /* adjust as needed */
}

/* Provide sufficient contrast against white background */
a {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* Asset tree and chart panel heights (responsive) */
:root {
  --asset-panel-height: 260px;
}

@media (max-width: 575.98px) {
  :root {
    --asset-panel-height: 220px;
  }
}

.asset-tree-panel {
  height: var(--asset-panel-height);
  max-height: 60vh;
  overflow: auto;
  padding: 0.5rem;
}

.asset-chart-canvas {
  height: var(--asset-panel-height) !important;
  width: 100% !important;
}

.validation-message {
    color: #8c0000;
}

[data-initials] {
    padding: 5px;
}

    [data-initials]:before {
        background: #2f5597;
        color: white;
        opacity: 1;
        content: attr(data-initials);
        display: inline-block;
        font-weight: bold;
        border-radius: 50%;
        vertical-align: middle;
        margin-right: 0.5em;
        width: 50px;
        height: 50px;
        line-height: 50px;
        text-align: center;
    }

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    /* line-height: 60px; */
}

.assetTree-caret {
    cursor: pointer;
    -webkit-user-select: none; /* Safari 3.assetTree-1+ */
    -moz-user-select: none; /* Firefox 2+ */
    -ms-user-select: none; /* IE 10+ */
    user-select: none;
}

    .assetTree-caret::before {
        content: "\25B6";
        color: black;
        display: inline-block;
        margin-right: 6px;
    }

.assetTree-caret-down::before {
    -ms-transform: rotate(90deg); /* IE 9 */
    -webkit-transform: rotate(90deg); /* Safari */
    transform: rotate(90deg);
}

.assetTree-nested {
    display: none;
}

.assetTree-active {
    display: block;
}

html, body, #app {
  height: 100%;
}

.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1 0 auto; /* fill remaining space */
  padding-bottom: 1rem;
  padding-top: 1rem;
}

/* footer stays at the bottom after content */
.site-footer {
  flex: 0 0 auto;
  height: 72px; /* set to actual footer height or auto */
}

/* Header styling for MainLayout */
.app-header {
  background: #f8f9fa;
  padding: 0.1rem 0;
  font-size: 0.95rem;
}

/* Ensure the brand behaves correctly inside the flex container.
   min-width: 0 is required so the child can shrink below its content width
   and allow text-overflow to apply on constrained flex containers. */
.app-header .app-brand {
  flex: 1 1 auto;
  min-width: 0;
}

.app-header .app-brand .navbar-brand {
  margin: 0;
  padding: 0;
  font-weight: 600;
  color: #1b6ec2;
  text-decoration: none;
}

.app-user-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

/* Make sure main content has breathing room under header */
.main-content {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Small responsive tweak - also target container-fluid which is used in layout */
@media (max-width: 575.98px) {
  .app-header .container,
  .app-header .container-fluid {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .app-header .container-fluid .app-brand {
    width: 100%;
  }

  .app-user-area {
    width: 100%;
    justify-content: flex-end;
  }

  /* On narrow screens allow the brand to shrink and show ellipsis rather than wrapping */
  a.navbar-brand {
    max-width: calc(100% - 120px); /* leave room for user area (tweak as needed) */
  }
}

/* tighten header gutters */
.app-header .container,
.app-header .container-fluid {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.kanban-board {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 250px;
}

    .kanban-column .column-header {
        background: #f8f9fa;
        padding: 10px 12px;
        border-radius: 6px 6px 0 0;
        border: 1px solid #e7eaec;
    }

    .kanban-column .column-body {
        border: 1px solid #e7eaec;
        border-top: 0;
        padding: 12px;
        border-radius: 0 0 6px 6px;
        background: #fff;
        min-height: 200px;
    }

.kanban-card {
    background: #ffffff;
    border: 1px solid #e7eaec;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

    .kanban-card .meta {
        font-size: 0.85rem;
        color: #6c757d;
        margin-top: 6px;
    }

    .kanban-card .card-actions {
        margin-left: 8px;
    }

    .kanban-card .assigned-pill {
        font-size: 0.8rem;
        background: #f1f3f5;
        padding: 2px 8px;
        border-radius: 12px;
    }

    .kanban-card .project-name {
        font-size: 0.9rem;
        color: #495057;
        font-weight: 600;
    }

    .kanban-card .desc {
        margin-top: 6px;
        color: #6c757d;
    }

    .kanban-card .card-footer {
        margin-top: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.kanban-column-count {
    font-weight: 600;
    margin-left: 8px;
    color: #6c757d;
}

/* Loading overlay (global) appended to document.body by JS portal */
.bl-loading-overlay {
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99999;
    pointer-events: all;
}

.bl-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    text-align: center;
}

/* Mobile collapsible user area */
.collapse-user-area {
  overflow: hidden;
  max-height: 0;
  transition: max-height 260ms ease-in-out, padding 200ms ease-in-out;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background: transparent;
}

/* When shown, allow vertical layout and give space */
.collapse-user-area.show {
  display: block; /* ensure it's visible in older UA */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  max-height: 240px; /* enough for the small user area; adjust as needed */
}

/* Minor visual tuning for the hamburger icon/button */
.navbar-toggler-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  width: 1.4rem;
  text-align: center;
}

/* Ensure the brand and user area keep their flex behaviour */
.app-header .container-fluid .app-brand {
  min-width: 0;
}

/* Slight spacing adjustments for mobile inside the collapse */
.collapse-user-area .btn {
  margin-right: .5rem;
}

/* Asset tree item hover styles (restored to apply to the LI like a Bootstrap table row) */
.assetTree-item {
  position: relative;
  list-style: none;
  margin-top: 0.25rem;
  border-radius: 6px;
  padding: 0.125rem 0.0rem; /* small vertical padding */
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

/* Hover and focus (keyboard) state covers the whole li (like a table row hover) */
.assetTree-item:hover,
.assetTree-item:focus-within {
  background-color: rgba(0, 0, 0, 0.03); /* subtle highlight */
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* Align edit buttons using CSS grid so the button column stays fixed at the right */
.assetTree-row {
  display: grid;
  grid-template-columns: 1fr auto; /* name grows, button column fixed to its intrinsic size */
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

/* Name area: prevent it from pushing the button by truncating with ellipsis */
.assetTree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Edit button reveal on hover/focus (keeps it hidden until user hovers the row) */
.assetTree-edit {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}

.assetTree-item:hover .assetTree-edit,
.assetTree-item:focus-within .assetTree-edit {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ensure button styling doesn't change layout */
.assetTree-edit.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Asset tree — keep rows full width and align actions to the right */
.assetTree-root,
.assetTree-root ul {
  list-style: none;
  margin: 0;
  padding: 0; /* remove default UL indentation */
}

/* Each row container should be full width (flex row) so actions align */
.assetTree-item > div {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding-right: 0;
  margin-right: 0;
}

/* Indent only the label, not the whole row. Component can set --asset-tree-level */
.assetTree-node-label {
  display: inline-block;
  padding-left: calc(var(--asset-tree-level, 0) * 1.25rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep actions (edit button) pinned to the right */
.assetTree-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Remove any extra right margin from the edit button */
.assetTree-edit {
  margin-right: 0;
}

/* Optional: neutralize Bootstrap spacing helpers if accidentally applied */
.assetTree-actions.ms-2,
.assetTree-actions.me-2 {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Mini-navbar submenu stable behavior (append to end of file)
   - ensures submenu is visible above slimScroll wrappers
   - positions submenu flush to parent to remove pointer gaps
   - minimal, targets only mobile/mini state
*/
@media (max-width: 768px) {
  /* Allow submenu to escape slimScroll wrapper and be clickable */
  .sidebar-collapse,
  .sidebar-collapse .slimScrollDiv {
    overflow: visible !important;
    z-index: 2000;
  }

  /* anchor submenu to parent li and overlap slightly to avoid small pointer gaps */
  body.mini-navbar .nav > li {
    position: relative;
  }

  body.mini-navbar .nav .nav-second-level {
    position: absolute;
    left: 70px;    /* compact sidebar width (adjust if your theme uses 58px/65px) */
    top: -6px;     /* small upward overlap to remove pointer gap */
    min-width: 180px;
    z-index: 3000;
    display: none;
    background: #2F4050; /* fallback; skins may override */
    padding: 6px 0;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
    pointer-events: auto;
  }

  /* show when parent has open or on hover - keep !important small and scoped */
  body.mini-navbar .nav > li.open > .nav-second-level,
  body.mini-navbar .nav > li:hover > .nav-second-level {
    display: block !important;
  }

  body.mini-navbar .nav .nav-second-level li a {
    padding: 8px 14px;
    display: block;
    color: #fff;
  }
}

/* Mobile sidebar: never hide the sidebar completely; we use an off-canvas transform instead.
   The Inspinia base stylesheet sets `.navbar-static-side { display:none; }` for small screens.
   That breaks our off-canvas menu, so we override it here. */
@media (max-width: 768px) {
  .navbar-static-side {
    display: block !important;
    background-color: #2f4050 !important;
  }

  /* Ensure the app content can span full width on mobile; sidebar will overlay instead */
  #page-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Override Inspinia's body-small sidebar rules: keep sidebar off-canvas until opened */
  body.body-small .navbar-static-side {
    width: 220px !important;
    overflow: visible !important;
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-110%);
    transition: transform 0.2s ease-in-out;
    z-index: 2001;
    background-color: #2f4050 !important;
  }

  /* When opened (toggled by JS), slide in */
  body.sidebar-open.body-small .navbar-static-side {
    transform: translateX(0);
  }
}

/* Mobile menu toggle button: visible only on narrow screens */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #2f4050;
  background-color: transparent;
  border: 1px solid #2f4050;
  border-radius: 4px;
}

.mobile-menu-toggle:hover {
  background-color: rgba(47, 64, 80, 0.1);
}

.mobile-menu-toggle i {
  color: #2f4050;
  font-size: 20px;
}

/* show on small devices */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }

  /* keep brand and user area spacing reasonable on small screens */
  .app-header .container-fluid {
    gap: 0.5rem;
  }

  .app-brand .navbar-brand {
    max-width: calc(100% - 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
