.navbar-brand-image {
    height: 4rem;
    width: auto;
}

table.dataTable {
    clear: both;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    max-width: none !important;
    border-collapse: separate !important;
    border-spacing: 0;
}


.table-responsive {
    overflow-x: auto; /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
}


.table>:not(caption)>*>* {
    vertical-align: middle;
}

/* Dont allign right */
table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date, table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date {
    text-align: left;
}


/* add background color to table header  */
.markdown>table>thead, .table>thead {
    background: var(--tblr-bg-surface-tertiary);
}


@media (max-width: 640px) {
    .entries-display {
        display: none;
    }

    #custom-length + span {
        display: none;
    }
}

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Center horizontally */
  right: 20px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px; /* Space between each toast */
}

.toast-alert {
  opacity: 0; /* Start invisible */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Smoother transition */
  transform: translateY(-10px); /* Smaller initial offset */
}

.toast-alert.show {
  opacity: 1; /* Fully visible */
  transform: translateY(0); /* Slide to position */
}

.ts-dropdown {
    box-shadow: none; /* Removes the shadow completely */
    z-index: 1200; /* Bootstrap modal z-index is typically 1050 */
}

/* Cropper */

   #previewContainer {
            position: relative;
            width: 100%;
            padding-top: 66.66%; /* 3:2 Aspect Ratio */
            border: 1px solid #ddd;
            overflow: hidden;
        }

        #previewContainer img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        #imagePreview {
            max-width: 100%;
            max-height: 500px;
        }

        .cropper-container {
        width: 100% !important;
    }

    .cropper-bg {
        width: 100% !important;
    }


/* Code Mirror */
.code-editor-container{
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    box-shadow: var(--tblr-box-shadow-input);
    padding: .5625rem .75rem;
}


/* table-settings-styles.css */
.table-settings-column-list, .table-settings-hidden-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-settings-column-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #fff;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.table-settings-column-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.table-settings-column-item button {
    margin-left: 8px;
}

.table-settings-column-item button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.table-settings-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.table-settings-column-item button:hover {
    background-color: #f1f1f1;
}

.table-settings-column-item button:active {
    background-color: #007bff;
    color: white;
}

.table-settings-column-item button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.container-optimized {
    max-width: 3000px;
    --tblr-gutter-x: calc(var(--tblr-page-padding) * 2);
    --tblr-gutter-y: 0;
    width: 100%;
    padding-right: calc(var(--tblr-gutter-x) * .5);
    padding-left: calc(var(--tblr-gutter-x) * .5);
    margin-right: auto;
    margin-left: auto;
}

.optimized-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
}

/* Main content grows */
.optimized-main-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* Sidebar fixed max width */
.optimized-sidebar {
  flex: 0 0 320px;
  max-width: 320px;
  width: 100%;
}

/* Stack vertically on small screens */
@media (max-width: 768px) {
  .optimized-responsive-layout {
    flex-direction: column;
  }

  .optimized-sidebar {
    max-width: 100%;
    flex: none;
  }
}