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

.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

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

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

/* Fix navbar covering content */
.layout-navbar {
  z-index: 1000;
  position: relative;
}

/* Ensure content has proper top spacing */
.content-wrapper {
  padding-top: 1.5rem;
}

/* Fix dashboard button overlap issues */
.container-p-y {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

/* Dashboard specific fixes */
.layout-page .container-xxl {
  position: relative;
  z-index: 1;
}

/* Prevent dashboard content from shrinking */
.layout-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

.layout-page {
  flex: 1;
  min-width: 0; /* Prevent flex shrinking */
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  width: 100%;
  min-width: 0;
}

/* Fix container width issues */
.container-xxl {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Ensure cards maintain proper width */
.card {
  width: 100%;
  min-width: 0;
}

/* Fix row spacing */
.row {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.row > * {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/*
* 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;
}

/*
* 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;
}

/*
* Mobile Responsive Enhancements
******************************************************************************/

/* Mobile menu overlay */
@media (max-width: 1199.98px) {
  .layout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-in-out;
  }
  
  .layout-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Menu adjustments for mobile */
  .layout-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
  }

  .layout-menu.active {
    transform: translateX(0);
  }

  /* Navbar adjustments for mobile */
  .layout-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
  }

  /* Content adjustments for mobile */
  .layout-page {
    padding-top: 76px; /* Adjust for fixed navbar */
  }

  .content-wrapper {
    padding-left: 0;
  }

  /* Card responsiveness */
  .card-body {
    padding: 1rem;
  }

  .row.g-3 > * {
    margin-bottom: 1rem;
  }

  /* Button groups on mobile */
  .btn-group {
    display: flex;
    flex-direction: column;
  }

  .btn-group .btn {
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem;
  }

  .btn-group .btn:last-child {
    margin-bottom: 0;
  }

  /* Modal responsiveness */
  .modal-xl {
    max-width: 95%;
  }

  /* Form adjustments */
  .form-control, .form-select {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Table responsiveness */
  .table-responsive {
    font-size: 0.875rem;
  }

  /* Stats cards on mobile */
  .col-md-3.col-6 {
    margin-bottom: 1rem;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .col-lg-6.col-md-6 {
    margin-bottom: 1.5rem;
  }
}

/* Very small screens */
@media (max-width: 575.98px) {
  .container-xxl {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Hide secondary actions on very small screens */
  .dropdown-toggle-split {
    display: none;
  }

  /* Simplify card headers */
  .card-header {
    padding: 0.75rem 1rem;
  }

  .card-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  /* Adjust spacing */
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }

  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Menu toggle button enhancements */
.layout-menu-toggle {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
}

.layout-menu-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 1199.98px) {
  .layout-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

/* Search input mobile optimization */
@media (max-width: 767.98px) {
  .navbar-nav .nav-item .form-control {
    min-width: 200px;
  }
}

/* Loading overlay mobile adjustments */
#loadingOverlay .card {
  margin: 1rem;
  max-width: 300px;
}

/* Toast notifications positioning for mobile */
@media (max-width: 767.98px) {
  .position-fixed.top-0.end-0 {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    right: 1rem !important;
  }
}

