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

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

/* Custom mobile styles */
@media (max-width: 767.98px) {
  /* Improve table responsiveness */
  .table-responsive {
    margin-bottom: 1rem;
  }
  
  /* Adjust card padding */
  .card {
    margin-bottom: 1rem;
    padding: 0.75rem;
  }
  
  /* Improve form layout */
  .form-group {
    margin-bottom: 1rem;
  }
  
  /* Adjust button spacing */
  .btn {
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  /* Improve sidebar */
  .layout-menu {
    width: 100%;
    max-width: 100%;
  }
  
  /* Adjust content padding */
  .container-xxl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Improve navbar */
  .navbar-nav {
    padding: 0.5rem 0;
  }
  
  /* Adjust font sizes */
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.25rem; }
  h4, .h4 { font-size: 1.125rem; }
  h5, .h5 { font-size: 1rem; }
  h6, .h6 { font-size: 0.875rem; }

  /* Improve table layout */
  .table {
    font-size: 0.875rem;
  }
  
  .table td, 
  .table th {
    padding: 0.5rem;
  }

  /* Improve form elements */
  .form-control {
    font-size: 0.875rem;
    padding: 0.5rem;
  }

  /* Improve modal */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-content {
    padding: 1rem;
  }

  /* Improve dropdown */
  .dropdown-menu {
    width: 100%;
    padding: 0.5rem;
  }

  /* Improve spacing */
  .mb-3 {
    margin-bottom: 0.75rem !important;
  }

  .mt-3 {
    margin-top: 0.75rem !important;
  }

  /* Improve grid */
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .col, 
  [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Pastikan tombol menu selalu di atas */
  .layout-navbar .navbar-toggler, .navbar .navbar-toggler, .menu-toggle, .layout-menu-toggle {
    position: relative;
    z-index: 1051 !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }

  /* Pastikan menu sidebar tidak tertutup elemen lain */
  .layout-menu {
    z-index: 1050 !important;
  }
}

/* Fix Chrome specific issues */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  /* Fix for Chrome font rendering */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Fix for Chrome button rendering */
  button, 
  .btn {
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Fix for Chrome input rendering */
  input,
  select,
  textarea {
    -webkit-appearance: none;
    appearance: none;
  }

  /* Fix for Chrome table rendering */
  .table {
    border-collapse: separate;
    border-spacing: 0;
  }

  /* Fix for Chrome modal rendering */
  .modal {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}
