.card-img {
    background-repeat: no-repeat;
    background-size: cover;
}

.card-img img {
    max-height: 150px;
    height: 100%;
    width: 100%;
    object-fit:contain;
    -webkit-backdrop-filter: blur(8px) contrast(60%);
    backdrop-filter: blur(8px) contrast(60%);
}

.card-img img.card-last-img {
    max-height: 100px;
}

.card-check {
    font-size: 12px;
}

.card-solo > .card-img img {
    max-height:300px !important;
}

.card-solo > .card-img img.card-medium-img {
    max-height:200px !important;
}

.card-solo .card-check {
    font-size: inherit !important;
}

.accordion-img {
    max-height: 50px;
    max-width: 50px;
    height: 100%;
    width: 100%;
    object-fit:contain;
}

.table-img {
    height: 75px;
    width: 75px;
    object-fit:contain;
}

.table-td-input {
    max-width: 150px;
}

/* Checkbox column width constraint */
.table-td-input:has(.form-check-input[type="checkbox"]) {
    width: 120px;
    max-width: 120px;
    min-width: 120px;
}

/* Reserve space for status icon to prevent layout shift */
.form-check-label i[id^="status-"] {
    display: inline-block;
    width: 1.2em;
    text-align: center;
    margin-left: 0.25rem;
}

/* Hamburger menu styling */
.table th .dropdown {
    position: relative;
}

.table th .dropdown-toggle {
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-color: #6c757d;
}

.table th .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.table th .dropdown-toggle:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .table th .dropdown-toggle:hover {
    background-color: #2b3035;
    border-color: #6c757d;
}

/* Style dropdown items */
.dropdown-menu .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    padding: 0.25rem 1rem;
}

.dropdown-menu .dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover {
    background-color: #2b3035;
    color: #fff;
}

.dropdown-menu .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

/* Fixes for sortable.js */
.sortable {
    --th-color: #000 !important;
    --th-bg:#fff !important;
}

[data-bs-theme="dark"] .sortable {
    --th-color: #fff !important;
    --th-bg: #212529 !important;
}

.sortable thead th {
    font-weight: bold !important;
}

.color-rgb {
    display: inline-block;
    width: 15px;
    height: 15px;
}

.color-rgb-table {
    width: 20px !important;
    height: 20px !important;
}

.color-any {
    background:
        linear-gradient(217deg, rgb(255 0 0 / 80%), rgb(255 0 0 / 0%) 70.71%),
        linear-gradient(127deg, rgb(0 255 0 / 80%), rgb(0 255 0 / 0%) 70.71%),
        linear-gradient(336deg, rgb(0 0 255 / 80%), rgb(0 0 255 / 0%) 70.71%)
    ;
}

/* Mobile Pagination Fixes */
.mobile-pagination {
    display: flex !important;
    width: 100% !important;
    gap: 2px;
}

.mobile-pagination .btn:first-child,
.mobile-pagination .btn:last-child {
    flex: 0 0 auto;
    min-width: 90px;
    max-width: 120px;
}

.mobile-pagination .btn:nth-child(2) {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Partial Status Checkbox Styling */
.partial-status {
    position: relative;
}

.partial-status::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #6f42c1;
    border-radius: 2px;
    opacity: 0.8;
    pointer-events: none;
}/* Duplicate filter support */
.duplicate-filter-hidden { display: none !important; }

/* Dark mode link and text fixes */
[data-bs-theme="dark"] .text-reset {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] a.text-reset:hover {
    color: var(--bs-link-hover-color) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--bs-body-color) !important;
}

/* Dark mode border fixes */
[data-bs-theme="dark"] .border-black {
    border-color: var(--bs-border-color) !important;
}

/* Dark mode badge fixes */
[data-bs-theme="dark"] .text-bg-light {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .text-black {
    color: #f8f9fa !important;
}

/* Dark mode button fixes */
[data-bs-theme="dark"] .btn-outline-dark {
    border-color: #f8f9fa;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
}

[data-bs-theme="dark"] .btn-light {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .btn-light:hover {
    background-color: #495057;
    border-color: #6c757d;
    color: #fff;
}

/* Dark mode table fixes */
[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #343a40;
    --bs-table-color: #f8f9fa;
}

/* Dark mode for card header links */
[data-bs-theme="dark"] .text-decoration-none.text-dark {
    color: var(--bs-body-color) !important;
}

/* Dark mode table text fix - ensure all table text is visible */
[data-bs-theme="dark"] .table {
    --bs-table-color: var(--bs-body-color);
}

[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="dark"] .table tbody th {
    color: var(--bs-body-color);
}
