html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.main-content {
    /* This makes the content area grow to push footer down */
    flex: 1 0 auto;
}

.footer{
    flex-shrink: 0; /* Prevents the footer from shrinking */
    padding: 1rem !important;
    border-top: 1px solid #eee;
}

.dropdown.is-fullwidth,
.dropdown.is-fullwidth .dropdown-trigger,
.dropdown.is-fullwidth .dropdown-menu {
    width: 100%;
}

.is-clickable {
    cursor: pointer;
}
.is-clickable:hover {
    background-color: #f5f5f5;
}
.sort-icon {
    margin-left: 5px;
}
.sort-asc .fa-sort:before {
    content: "\f0de"; /* fa-sort-up */
}
.sort-desc .fa-sort:before {
    content: "\f0dd"; /* fa-sort-down */
}
.loading-indicator {
    margin-top: 10px;
}
.is-hidden {
    display: none !important;
}

/* Position the dropdown after the "Next page" button */
.pagination-per-page {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* When on smaller screens, ensure proper alignment */
@media screen and (max-width: 768px) {
    .pagination {
        flex-direction: row;
        justify-content: space-between;
    }

    .pagination-per-page {
        order: 3;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }

    .pagination-list {
        order: 4;
        margin-top: 0.5rem;
    }
}

.document-preview {
    border: 1px solid #ddd;
    padding: 1rem;
    margin: 1rem 0;
    min-height: 400px;
}

.field.is-horizontal.not-modifiable {
    background-color: #f5f5f5;  /* Light gray background */
    opacity: 0.9;               /* Slightly increased opacity */
    border-radius: 4px;
    padding: 0.5rem;
}

.field.is-horizontal.not-modifiable .input {
    background-color: #f9f9f9;  /* Lighter background for input */
    border-color: #dbdbdb;      /* Light border */
    color: #363636;             /* Darker text color for better readability */
    cursor: not-allowed;
}

.field.is-horizontal.not-modifiable .label {
    color: #4a4a4a;             /* Slightly darker label text */
}

/* Add border around status tags */
.tag.is-plain {
    border: 2px solid #000000;  /* Thicker black border */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);  /* Subtle shadow for depth */
}

.tag.is-dotted {
    border: 2px dotted #000000;  /* Thicker black border */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);  /* Subtle shadow for depth */
}

/* Container for multiple tags */
.tags-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Spacing between tags */
.tags-container .tag {
    margin-left: 0.5rem;
}

.htmx-request .htmx-indicator {
    display: inline-block !important;
}

.htmx-request .htmx-content {
    display: none;
}

.loader.is-small {
    height: 0.75em;
    width: 0.75em;
}

.tooltip-container {
    position: relative;
}

.custom-tooltip {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    max-width: 250px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.custom-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tooltip-container:hover .custom-tooltip {
    visibility: visible;
}

.document-preview.sticky {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.is-active {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.collapsible-section {
    border-bottom: 1px solid #dbdbdb;
}

.collapsible-section:last-child {
    border-bottom: none;
}

