/* General styles */
.table td {
    vertical-align: middle;
    white-space: normal;
}

.table td > div {
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Styles for update record page */
.field-column, .old-value-column {
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.field-column {
    width: 15%;
}

.old-value-column {
    width: 25%;
}

.new-value-column {
    width: 60%;
}

.new-value-input {
    min-height: 2.5em;
    resize: vertical;
}

.new-value-column .form-group {
    margin-bottom: 0;
}

#paste-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
}

#paste-preview {
    max-width: 300px;
    max-height: 300px;
    margin-top: 10px;
}

.floating-update-btn, #floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#floating-button button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

#floating-button button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Styles for record rows */
.record-row {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.record-row:hover {
    background-color: #f8f9fa;
    filter: brightness(1.1);
}

/* Styles for summary table */
.summary-table-container {
    margin-bottom: 30px;
}

.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.summary-field-column {
    width: 20%;
    font-weight: bold;
    background-color: #f8f9fa;
}

.summary-value-column {
    width: 60%;
}

.summary-photo-column {
    width: 20%;
    vertical-align: middle;
    text-align: center;
}

.summary-photo {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
}

.summary-table th, .summary-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
}

.summary-table tr:first-child th, .summary-table tr:first-child td {
    border-top: 2px solid #dee2e6;
}

.summary-table tr:last-child th, .summary-table tr:last-child td {
    border-bottom: 2px solid #dee2e6;
}

.summary-table th:first-child, .summary-table td:first-child {
    border-left: 2px solid #dee2e6;
}

.summary-table th:last-child, .summary-table td:last-child {
    border-right: 2px solid #dee2e6;
}

.summary-table .summary-photo-column {
    vertical-align: middle;
}

/* Styles for record views */
.record-views-container {
    width: 90%;
    margin: 0 auto;
}

.table-responsive-horizontal {
    overflow-x: auto;
    white-space: nowrap;
}

/* Styles for #records-table */
#records-table {
    min-width: 100%;
    table-layout: auto;
    width: auto;
}

#records-table .table {
    margin-bottom: 0;
}

#records-table th, #records-table td {
    min-width: auto;
    max-width: 100px;
    width: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em;
    overflow: hidden;
    position: relative;
    word-break: break-word;
}

#records-table th {
    min-width: 150px;
}

#records-table th:first-child, #records-table td:first-child {
    width: 120px;
    text-align: center;
}

#records-table td.expanded {
    max-height: none;
}

#records-table .cell-content {
    max-height: 2.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show 2 lines of text */
    -webkit-box-orient: vertical;
    word-break: break-word;
}

#records-table td.expanded .cell-content {
    max-height: none;
    -webkit-line-clamp: unset;
}

#records-table .more-link {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    padding: 0 5px;
    color: blue;
    text-decoration: underline;
    cursor: pointer;
    z-index: 1;
}

/* Styles for field selection */
#field-selection {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.field-cell {
    word-wrap: break-word;
    max-width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    cursor: pointer;
    border: 1px solid #dee2e6;
    transition: background-color 0.3s ease;
}

.field-cell.selected {
    background-color: blue;
    color: white;
}

/* Styles for sorting */
.sortable {
    cursor: pointer;
}

.sort-icon::after {
    content: '\25B2';  /* Up triangle */
    margin-left: 5px;
    opacity: 0.3;
    color: black;
}

.sort-icon.asc::after {
    content: '\25B2';  /* Up triangle */
    opacity: 1;
    color: blue;
}

.sort-icon.desc::after {
    content: '\25BC';  /* Down triangle */
    opacity: 1;
    color: blue;
}

/* Styles for filtering */
.filter-input {
    width: 100%;
    padding: 2px 5px;
    margin-top: 5px;
    font-size: 0.9em;
}

/* Styles for select wrapper */
.select-wrapper {
    position: relative;
    display: inline-block;
}

/* Styles for view list */
#load-view {
    width: 100%;
}

.view-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ced4da;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.select-wrapper:hover .view-list {
    display: block;
}

.view-item {
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-item:hover {
    background-color: #f8f9fa;
}

.view-name {
    flex-grow: 1;
}

.delete-view {
    color: red;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 10px;
}

.update-icon {
    background-color: #fff;
    color: #007bff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.update-icon:hover {
    color: #0056b3;
}

/* Styles for hide icon */
.hide-icon {
    background-color: #fff;
    color: #ffc107;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 5px;
}

.hide-icon:hover {
    color: #d39e00;
}

/* Styles for update visible icon */
.update-visible-icon {
    background-color: #fff;
    color: #6c757d;  /* Bootstrap's secondary color */
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 5px;
}

.update-visible-icon:hover {
    color: #545b62;  /* A darker shade for hover effect */
}

/* Autocomplete styles */
.position-relative {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff; 
    border-bottom: 1px solid #d4d4d4; 
}

.autocomplete-items div:hover {
    background-color: #e9e9e9;
}

.autocomplete-active {
    background-color: DodgerBlue !important; 
    color: #ffffff; 
}

/* Styles for scroll containers */
.scroll-container, .top-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    margin-bottom: 10px;
}

.scroll-container::-webkit-scrollbar {
    height: 10px;
    display: block;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #888;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive-wrapper {
    position: relative;
    padding-top: 10px;
}

.scroll-container {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}

.table-wrapper {
    margin-top: -5px;
    overflow-y: hidden;
}

.top-scroll-container {
    margin-bottom: 10px;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.table-responsive-horizontal {
    overflow-x: auto;
}

/* Text overflow management */
.text-overflow {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}



.helper-select-container {
    position: relative;
}
/*
#helper-select {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
} */