/* Styling for error messages */
.error-block {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #fd625e;
}

/* 
Select2 Custom Styles
Customizes Select2 appearance, including container, dropdown, selections, and dark theme.
*/
.select2.select2-container {
    width: 100% !important;
}

.select2.select2-container .select2-selection {
    border: 1px solid #ccc;
    border-radius: 3px;
    height: 34px;
    outline: none !important;
    transition: all 0.14s ease-in-out;
}

.select2.select2-container .select2-selection--single {
    background: #fff;
    color: #333;
}

.select2.select2-container .select2-selection--multiple {
    min-height: 34px;
    padding: 4px;
    border: 1px solid #ccc;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    box-sizing: border-box;
}

.select2-container .select2-dropdown {
    background: #fff;
    border: 1px solid #ccc;
}

.select2-container .select2-dropdown .select2-search input {
    outline: none !important;
    border: 1px solid #ccc !important;
    border-bottom: none !important;
    padding: 4px 6px !important;
    color: #333;
}

.select2-container .select2-dropdown .select2-results {
    padding: 0;
}

.select2-container .select2-dropdown .select2-results ul {
    background: #fff;
    border: 1px solid #ccc;
}

.select2-container .select2-dropdown .select2-results ul .select2-results__option {
    color: #333;
}

.select2-container .select2-dropdown .select2-results ul .select2-results__option--highlighted[aria-selected] {
    background-color: #3498db;
    color: #fff;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection--single {
    background: #2c2c2c;
    color: #fff;
    border: 1px solid #444;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection--multiple {
    background: #2c2c2c;
    color: #fff;
    border: 1px solid #444;
}

[data-bs-theme="dark"] .select2-container .select2-dropdown {
    background: #2c2c2c;
    border: 1px solid #444;
}

[data-bs-theme="dark"] .select2-container .select2-dropdown .select2-search input {
    outline: none !important;
    border: 1px solid #666 !important;
    border-bottom: none !important;
    padding: 4px 6px !important;
    color: #fff;
    background: #2c2c2c;
}

[data-bs-theme="dark"] .select2-container .select2-dropdown .select2-results ul {
    background: #2c2c2c;
    border: 1px solid #444;
}

[data-bs-theme="dark"] .select2-container .select2-dropdown .select2-results ul .select2-results__option {
    color: #fff;
}

[data-bs-theme="dark"] .select2-container .select2-dropdown .select2-results ul .select2-results__option--highlighted[aria-selected] {
    background-color: #3498db;
    color: #fff;
}

.select2.select2-container .select2-selection .select2-selection__rendered {
    color: #333;
    line-height: 32px;
    padding-right: 33px;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection .select2-selection__rendered {
    color: #fff;
}

.select2.select2-container .select2-selection .select2-selection__arrow {
    background: #f8f8f8;
    border-left: 1px solid #ccc;
    border-radius: 0 3px 3px 0;
    height: 32px;
    width: 33px;
}

.select2.select2-container.select2-container--open .select2-selection.select2-selection--single {
    background: #f8f8f8;
}

.select2.select2-container.select2-container--open .select2-selection.select2-selection--single .select2-selection__arrow {
    border-radius: 0 3px 0 0;
}

.select2.select2-container.select2-container--open .select2-selection.select2-selection--multiple {
    border: 1px solid #34495e;
}

.select2.select2-container .select2-selection--multiple {
    height: auto;
    min-height: 34px;
}

.select2.select2-container .select2-selection--multiple .select2-search__field {
    width: 100% !important;
    min-width: 150px;
    height: 24px;
    line-height: 24px;
    padding: 0 4px;
    box-sizing: border-box;
}

.select2.select2-container .select2-selection--multiple .select2-search--inline {
    flex: 1;
    display: flex;
    align-items: center;
}

.select2.select2-container .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 24px;
    margin: 0;
    padding: 0 4px;
}

.select2.select2-container .select2-selection--multiple .select2-selection__rendered {
    display: block;
    padding: 0 4px;
    line-height: 29px;
}

.select2.select2-container .select2-selection--multiple .select2-selection__choice {
    height: 24px;
    line-height: 22px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0 6px 0 22px;
    font-size: 12px;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection--multiple .select2-selection__choice {
    background-color: #444;
    border: 1px solid #666;
    color: #fff;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection--multiple .select2-selection__choice__remove {
    color: #ccc;
}

[data-bs-theme="dark"] .select2.select2-container .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #e74c3c;
}

.select2.select2-container .select2-selection--multiple .select2-selection__choice__remove {
    height: 22px;
    width: 22px;
    font-size: 14px;
    line-height: 22px;
}

.select2-selection__clear {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    padding: 0 5px;
}

.select2-selection__clear:hover {
    color: #e74c3c;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    z-index: 10;
}

[data-bs-theme="dark"] .select2-selection__clear {
    color: #bbb;
}

[data-bs-theme="dark"] .select2-selection__clear:hover {
    color: #e74c3c;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #2c2c2c;
    border: 1px solid #444;
    color: #fff;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #444;
    border: 1px solid #666;
    color: #fff;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-search__field {
    background-color: #2c2c2c;
    color: #fff;
}

/* 
   Thumbnail styles for table images:
   - Small, square images with shadow.
   - Smooth zoom and shadow increase on hover, with a semi-transparent overlay.
   - Transitions create a visually smooth hover effect.
*/
.table-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
}

.table-thumbnail::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.table-thumbnail:hover {
    transform: scale(2.5);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 1000;
}

.table-thumbnail:hover::before {
    opacity: 1;
}

/* 
   Table cell styles:
   - Flexible layout for rows containing an image thumbnail + text.
   - Thumbnail has fixed size, rounded corners, and hover effects (zoom, shadow, overlay).
   - Text sits beside the thumbnail with ellipsis truncation if too long.
*/
.table-cell {
    display: flex;
    align-items: center;
}

.table-cell-thumb {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.table-cell-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: inherit;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.table-cell-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.table-cell-thumb:hover {
    transform: scale(2.5);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.table-cell-thumb:hover::before {
    opacity: 1;
}

.table-cell-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 
   Color badge component
   - Inline-flex container for swatch + label
   - Smooth hover transitions for subtle scaling, glow, and brightness
   - Swatch: small rounded square with border, ready for interactive effects
*/
.table-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.table-color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition:
        transform 0.4s ease-in-out,
        box-shadow 0.4s ease-in-out,
        filter 0.4s ease-in-out;
    will-change: transform, box-shadow, filter;
}

/* Base styles for the action card, positioning it absolutely.
 It's initially positioned near the top-right corner of its container. */
.fixed-action-card {
    position: absolute;
    top: -51px;
    right: 12px;
    z-index: 1030;
    transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
    background: transparent;
    box-shadow: none;
}

.fixed-action-card>.action-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.fixed-action-card>.action-buttons button,
.fixed-action-card>.action-buttons a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid transparent;
    min-width: 50px;
}

@media (min-width: 576px) {

    .fixed-action-card>.action-buttons button,
    .fixed-action-card>.action-buttons a {
        padding: 2.5px 15px;
    }
}

.fixed-action-card>.action-buttons .btn i {
    font-size: 16px;
    margin-right: 0.5rem;
}

.fixed-action-card>.action-buttons>* span {
    visibility: visible;
}

.fixed-action-card.scroll-active {
    position: fixed;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 50px;
}

.fixed-action-card.scroll-active>.action-buttons button,
.fixed-action-card.scroll-active>.action-buttons a {
    padding: 10px 15px;
}

@media (max-width: 768px) {
    .fixed-action-card {
        right: 12px;
    }

    .fixed-action-card.scroll-active {
        right: 5px;
    }

    .fixed-action-card>.action-buttons {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .fixed-action-card {
        position: fixed;
        top: 50%;
        right: 5px;
        transform: translateY(-50%);
        width: 50px;
    }

    .fixed-action-card>.action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .fixed-action-card>.action-buttons>* span {
        opacity: 0;
    }

    .fixed-action-card:not(.scroll-active) .action-buttons .btn .bx {
        display: block !important;
    }
}

.fixed-action-card.scroll-active>.action-buttons {
    flex-direction: column;
    gap: 5px;
}

.fixed-action-card.scroll-active>.action-buttons>* span {
    opacity: 0;
}

.fixed-action-card:not(.scroll-active) .action-buttons .btn .bx {
    display: none;
}

.fixed-action-card:not(.scroll-active) .action-buttons .btn .bx-loader {
    display: block;
}

.modal-footer button.btn-primary i {
    display: none;
}

.choices {
    margin-bottom: 0;
}

.select2-color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid #ccc;
}