/* Main Page Unique Styles */
#checkboxContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 10px;
    text-align: left;
    margin-top: 20px;
}

#checkboxContainer div {
    display: flex;
    align-items: center;
}

.checkbox-header {
    width: 40px;
    text-align: center;
    cursor: default !important;
}

.checkbox-cell {
    text-align: center;
    width: 40px;
    font-size: 16px;
    color: green;
    font-weight: bold;
}

td {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    vertical-align: top;
}

/* Default behavior for non-resized columns */
td.no-wrap {
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Resizable column headers */
th {
    position: relative;
    user-select: none;
}

th.resizable {
    resize: horizontal;
    overflow: hidden;
    min-width: 60px;
}

/* Resize handle for columns */
.resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 2;
}

.resize-handle:hover {
    background: rgba(188, 212, 67, 0.3);
}

/* Active resizing state */
.resize-handle.resizing {
    background: rgba(188, 212, 67, 0.6);
}

/* Column width constraints */
th[data-column] {
    min-width: 60px;
    max-width: 500px;
}

/* Special handling for specific columns */
th[data-column="Display Picture"], th[data-key="Picture"] {
    min-width: 100px;
    width: 120px;
}

th[data-column="MSR: SKU Status"] {
    min-width: 80px;
}

th[data-key="Name"] {
    min-width: 150px;
}

td[data-field="Name"] {
    min-width: 150px;
    word-break: break-word;
}

/* Ensure table layout handles column widths properly */
.table {
    table-layout: fixed;
    width: 100%;
}

/* Text wrapping for cells when column is narrow */
td.wrap-text {
    white-space: normal;
    line-height: 1.3;
    max-height: none;
}

/* Fixed header functionality handled by JavaScript */

tr.dragging {
    background-color: #f8f9fa;
    opacity: 0.5;
}

tr.drag-over {
    border-top: 2px solid #0d6efd;
}

.page-size-buttons {
    display: flex;
    gap: 20px;
    align-items: stretch;
    justify-content: center;
    margin-right: 4rem;
    height: 100%;
}

.paginationSection {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.h6-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin-right: 10px;
}

h6 {
    margin: 0;
    white-space: nowrap;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    width: fit-content;
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popup-scrollable {
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.popup-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    word-wrap: break-word;
}

#popupTable {
    border-collapse: collapse;
    margin-bottom: 20px;
    width: auto;
}

#popupTable td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
    word-wrap: break-word;
    white-space: normal;
}

#popupTable td:first-child {
    font-weight: bold;
    padding-right: 20px;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.column-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-search-container {
    margin-bottom: 1rem;
    position: relative;
}

.column-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #3c4252;
    border-radius: 4px;
    background-color: #1b1d24;
    color: #ffffff;
}

.column-search:focus {
    outline: none;
    border-color: #bcd443;
    box-shadow: 0 0 0 0.2rem rgba(188, 212, 67, 0.25);
}

.column-dropdown {
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1b1d24;
    border: 1px solid #3c4252;
    border-radius: 4px;
    margin-top: 0.25rem;
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-item {
    padding: 0.5rem;
    cursor: pointer;
    color: #ffffff;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #3c4252;
}

#mainFilterContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#mainFilterCreation {
    width: 100%;
}


.selected-columns,
.active-filters {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    align-content: flex-start;
    min-height: 100px;
}

.filter-creation-container {
    background-color: #1b1d24;
    border-radius: 8px;
}

.add-filter-container {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
}

/* Bulk Filter Paste Cell Styles */
.paste-cell:empty:before {
    content: attr(data-placeholder);
    color: #888;
    font-style: italic;
    pointer-events: none;
}

.paste-cell:focus:before {
    display: none;
}

.paste-cell:not(:empty):before {
    display: none;
}

.bulk-filter-preview {
    border: 1px solid #4a5268;
    border-radius: 4px;
    background-color: #1a1a1a;
}

/* Merch Item Popup Styles */
.merch-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.merch-popup-content {
    background-color: #3a3f4b;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #bcd443 #555c70;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
    border: 1px solid #6a7285;
    background-image: linear-gradient(135deg, #3a3f4b 0%, #424857 100%);
    background-attachment: fixed;
}

.merch-popup-content::-webkit-scrollbar {
    width: 8px;
}

.merch-popup-content::-webkit-scrollbar-track {
    background: #555c70;
    border-radius: 4px;
}

.merch-popup-content::-webkit-scrollbar-thumb {
    background-color: #bcd443;
    border-radius: 4px;
    border: 2px solid #555c70;
}

.merch-popup-content::-webkit-scrollbar-thumb:hover {
    background-color: #cae356;
}

.merch-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #555c70;
    position: sticky;
    top: 0;
    background-color: #3a3f4b;
    z-index: 5;
}

.merch-popup-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    position: relative;
    padding-left: 12px;
}

.merch-popup-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #bcd443;
    border-radius: 2px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.history-header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-right: 15px;
}

.history-header-buttons .btn {
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.history-header-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shipment-info-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.shipment-info-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #0d6efd;
}

.shipment-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.shipment-tracking {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0d6efd;
}

.shipment-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.shipment-status.delivered {
    background-color: #d4edda;
    color: #155724;
}

.shipment-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.shipment-status.in-transit {
    background-color: #cce5ff;
    color: #004085;
}

.shipment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.shipment-detail-item {
    display: flex;
    flex-direction: column;
}

.shipment-detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.shipment-detail-value {
    font-size: 0.95rem;
    color: #333;
    word-break: break-word;
}

.shipment-detail-value.empty {
    color: #6c757d;
    font-style: italic;
}

#merchHistoryHeaderBtn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#merchHistoryHeaderBtn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.merch-popup-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.merch-popup-close:hover {
    color: #bcd443;
}

.merch-form {
    color: #ffffff;
    padding: 0 20px 20px;
}

.glass-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #bcd443 #555c70;
}

.glass-display::-webkit-scrollbar {
    width: 8px;
}

.glass-display::-webkit-scrollbar-track {
    background: #555c70;
    border-radius: 4px;
}

.glass-display::-webkit-scrollbar-thumb {
    background-color: #bcd443;
    border-radius: 4px;
}

.merch-detail-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #4d5366;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-left: 3px solid #bcd443;
    background-image: linear-gradient(120deg, #4d5366, #505973);
    background-size: 100% 100%;
}

.merch-detail-group:hover {
    background-color: #555c70;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.merch-detail-label {
    color: #bcd443;
    font-weight: 1000;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.merch-detail-label::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: rgba(188, 212, 67, 0.5);
    border-radius: 1px;
}

.merch-detail-value {
    color: #ffffff;
    font-size: 1rem;
    word-break: break-word;
}

/* Special handling for the display picture */
.display-picture-group {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #4d5366;
    border-left: 3px solid #bcd443;
    padding: 15px;
    background-image: linear-gradient(120deg, #4d5366, #4d5366);
    background-size: 100% 100%;
    position: relative;
    overflow: hidden;
    min-width: 400px;
    width: 100%;
}

.display-picture-group .merch-detail-value {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    min-height: 220px;
}

.display-picture-group img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Image Carousel Styles */
.image-carousel-container {
    position: relative;
    width: 100%;
    min-width: 300px;
    height: 220px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-carousel {
    position: relative;
    width: 100%;
    min-width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.1);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    order: -1;
}

.carousel-indicator {
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.carousel-indicator.active {
    background-color: #bcd443;
    color: #000;
    border-color: #bcd443;
    transform: scale(1.05);
}

.carousel-indicator:hover {
    background-color: rgba(188, 212, 67, 0.6);
    border-color: rgba(188, 212, 67, 0.8);
    transform: scale(1.02);
}

.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.display-picture-group::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
    border-radius: 8px;
}

.display-picture-group:hover img {
    transform: scale(1.05);
}

.remove-image-btn:hover {
    background-color: rgba(220, 53, 69, 1) !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.add-additional-image-btn:hover {
    background-color: rgba(40, 167, 69, 1) !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.slide-remove-btn {
    transition: all 0.2s ease;
}

.slide-remove-btn:hover {
    background-color: rgba(220, 53, 69, 1) !important;
    transform: scale(1.1);
}

.merch-form .btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background-color: #3a3f4b;
    padding: 15px 0 5px;
    border-top: 1px solid #555c70;
}

.merch-form .btn {
    background-color: #555c70;
    border: 1px solid #6a7285;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.merch-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.merch-form .btn:hover::before {
    left: 100%;
}

.merch-form .btn-primary {
    background-color: #bcd443;
    background-image: linear-gradient(45deg, #bcd443, #cae356);
    border-color: #bcd443;
    color: #333842;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(188, 212, 67, 0.3);
}

.merch-form .btn-secondary {
    background-color: #6c757d;
    background-image: linear-gradient(45deg, #6c757d, #7b858e);
    border-color: #6c757d;
    color: white;
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.3);
}

.merch-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.merch-form .btn-primary:hover {
    background-color: #cae356;
    background-image: linear-gradient(45deg, #cae356, #d6ef72);
    border-color: #cae356;
}

.merch-form .btn-secondary:hover {
    background-color: #7b858e;
    background-image: linear-gradient(45deg, #7b858e, #8c949d);
    border-color: #7b858e;
}

/* Column Selection Styles */
.selected-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Filter Conditions Section */
.filter-creation-container select,
.filter-creation-container input {
    background-color: #3c4252;
    border: 1px solid #3c4252;
    border-radius: 4px;
    padding: 0.5rem;
    width: 100%;
    color: #ffffff;
}

.filter-creation-container select:focus,
.filter-creation-container input:focus {
    border-color: #bcd443;
    box-shadow: 0 0 0 0.2rem rgba(188, 212, 67, 0.25);
    outline: none;
}

.filter-creation-container button {
    background-color: #bcd443;
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-creation-container button:hover {
    background-color: #a8c13a;
}

/* Filter Popup */
.filterpopup {
    background-color: #1b1d24;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.preview-container {
    background: white;
    padding: 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#labelPreview {
    width: 288px;
    height: 216px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 10px;
    color: black;
    background: white;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#previewLabelBtn {
    background-color: #6c757d;
    color: white;
    border: none;
    margin-left: 8px;
}

#previewLabelBtn:hover {
    background-color: #5a6268;
}

#printLabelBtn {
    background-color: #bcd443;
    color: #000;
    border: none;
    margin-left: 8px;
}

#printLabelBtn:hover {
    background-color: #a8c03a;
}

/* Ensure the preview popup has a good z-index */
#labelPreviewPopup {
    z-index: 1100;
}

#labelPreviewPopup .merch-popup-content {
    background-color: #2d2a29;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .merch-popup-content {
        width: 95%;
        max-width: none;
    }
    
    .glass-display {
        grid-template-columns: 1fr;
        padding-right: 5px;
    }
    
    .display-picture-group {
        grid-column: 1;
        grid-row: auto;
    }
    
    .merch-form .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .merch-form .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add a nice custom focus effect for interactive elements */
.merch-form button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(188, 212, 67, 0.4);
}

/* Inline editing styles */
.merch-detail-value.editable {
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
}

.merch-detail-value.editable:hover {
    background-color: rgba(188, 212, 67, 0.1);
}

.merch-detail-value.editable:hover::after {
    content: "\f044"; /* Pencil icon */
    font-family: "bootstrap-icons";
    position: absolute;
    right: -20px;
    color: #bcd443;
    font-size: 14px;
    opacity: 0.7;
}

.merch-detail-value.editing {
    padding: 0;
}

.merch-detail-value input, 
.merch-detail-value textarea,
.merch-detail-value select {
    background-color: #2d3040;
    color: #fff;
    border: 1px solid #4a4f64;
    border-radius: 4px;
    padding: 4px 8px;
    width: 100%;
    font-size: 14px;
}

.merch-detail-value input:focus, 
.merch-detail-value textarea:focus,
.merch-detail-value select:focus {
    border-color: #bcd443;
    outline: none;
    box-shadow: 0 0 0 2px rgba(188, 212, 67, 0.25);
}

/* Remove old save button styles that are no longer needed */
#saveChangesBtn {
    display: none !important;
}

.has-changes #saveChangesBtn {
    display: none !important;
}

.has-changes #merchCloseBtn {
    display: inline-block !important;
}

.merch-detail-group.non-editable .merch-detail-value {
    cursor: default;
}

.merch-detail-group.non-editable .merch-detail-value:hover {
    background-color: transparent;
}

.merch-detail-group.non-editable .merch-detail-value:hover::after {
    content: none;
}

/* Add styles for the history popup */

.history-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #2d2d2d;
}

.history-item {
    padding: 15px;
    background-color: #3c3c3c;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background-color: #3c3c3c;
}

.history-timestamp {
    font-size: 0.85rem;
    color: #bcd443;
    margin-bottom: 5px;
    display: block;
}

.history-details {
    color: #fff;
    white-space: pre-wrap;
}

.history-id {
    color: #777;
    font-size: 0.8rem;
    float: right;
}

#merchHistoryHeader {
    background-color: #2d2d2d;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

#merchHistoryHeader h4 {
    color: #bcd443;
    margin-bottom: 10px;
}

#merchHistoryHeader p {
    margin-bottom: 5px;
}

.history-empty {
    padding: 30px;
    text-align: center;
    color: #777;
}

.history-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Loading indicator styles */
#historyLoadingIndicator {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #6c757d;
}

#historyLoadingIndicator::after {
    content: " ";
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: rotate 1s linear infinite;
    vertical-align: text-bottom;
    margin-left: 5px;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No history message */
#noHistoryMessage {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Purge Confirmation Styling */
.purge-types {
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0d6efd;
}

.purge-types .form-check {
    margin-bottom: 10px;
    padding-left: 30px;
}

.purge-types .form-check:last-child {
    margin-bottom: 0;
}

.purge-types .form-check-input {
    margin-top: 0.25rem;
}

.purge-types .form-check-label {
    font-size: 0.95rem;
}

.purge-types .form-check-label strong {
    display: block;
    margin-bottom: 2px;
}

#permanentPurge:checked + .form-check-label {
    color: #dc3545;
}

#temporaryPurge:checked + .form-check-label {
    color: #198754;
}

#statusChangeText {
    font-weight: bold;
}

/* Status color indicators */
#statusChangeText:contains("inactive") {
    color: #dc3545;
}

#statusChangeText:contains("active") {
    color: #198754;
}

/* Purge Type Toggle Styling */
.purge-type-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.toggle-label {
    font-weight: bold;
    margin-right: 15px;
    font-size: 16px;
}

.toggle-container {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

.toggle-option {
    position: relative;
    width: 120px;
}

.toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-option label {
    display: block;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    margin: 0;
}

#permanentToggle label {
    color: #dc3545;
    border-right: 1px solid #dee2e6;
}

#temporaryToggle label {
    color: #198754;
}

.toggle-option input[type="radio"]:checked + label {
    background-color: #f0f0f0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

#permanentToggle input[type="radio"]:checked + label {
    background-color: #1e1e1e7d;
}

#temporaryToggle input[type="radio"]:checked + label {
    background-color: #1e1e1e7d;
}

#permanentToggle:hover label {
    background-color: rgba(220, 53, 69, 0.05);
}

#temporaryToggle:hover label {
    background-color: rgba(25, 135, 84, 0.05);
}

/* Status Text Styling */
#statusChangeText {
    font-weight: bold;
}

#statusChangeText[data-status="inactive"] {
    color: #dc3545;
}

#statusChangeText[data-status="active"] {
    color: #198754;
}

/* Purge info styling */
.purge-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    margin-top: 20px;
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 4px;
    color: #842029;
    font-size: 14px;
    font-weight: 500;
}

.purge-info i {
    font-size: 18px;
    margin-right: 0.5rem;
}

.active-filters-main {
    margin-top: 0.5rem;
    min-height: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: flex-start;
}

/* Upload method selector styles */
.upload-method-selector .btn-group {
    display: flex;
    width: 100%;
}

.upload-method-selector .btn {
    background-color: #5a6175;
    border: 1px solid #6c7489;
    color: #ccc;
    transition: all 0.3s ease;
}

.upload-method-selector .btn:hover {
    background-color: #6c7489;
    color: #fff;
}

.upload-method-selector .btn.active {
    background-color: #bcd443;
    color: #2c3e50;
    border-color: #bcd443;
}

.upload-method-selector .btn i {
    margin-right: 8px;
}

/* Camera section styles */
#cameraControls {
    text-align: center;
}

#cameraViewContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#cameraVideo, #cameraCanvas {
    border-radius: 4px;
}

#cameraControls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#cameraControls .btn {
    min-width: 120px;
}

#cameraError {
    margin: 0;
    text-align: center;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

#cameraError > div {
    color: #856404;
}

/* Image Upload Popup Styling */
#imageUploadPopup .merch-popup-content {
    overflow-y: auto;
    position: relative;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 600px;
    min-height: 400px;
}

#imageUploadPopup .image-display-area {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Remove the overlay so image is fully visible */

#imageUploadPopup .merch-popup-header {
    background-color: rgba(43, 43, 43, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

#imageUploadPopup .merch-popup-header h2 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#imageUploadPopup .upload-controls-area {
    color: white;
}

#imageUploadPopup .upload-controls-area h4 {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#imageUploadPopup .image-upload-main-container {
    min-height: 400px;
}

#imageUploadPopup .form-label {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#imageUploadPopup .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#imageUploadPopup .upload-method-selector .btn {
    background-color: rgba(90, 97, 117, 0.9);
    border: 1px solid rgba(108, 116, 137, 0.9);
}

#imageUploadPopup .upload-method-selector .btn.active {
    background-color: rgba(188, 212, 67, 0.9);
}

#currentImage {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#currentImagePreview {
    display: none !important; /* Hide the image element since we're using it as background */
}

#noImageText {
    color: #ccc !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #cameraControls {
        flex-direction: column;
        align-items: center;
    }
    
    #cameraControls .btn {
        width: 100%;
        max-width: 200px;
        margin-bottom: 10px;
    }
    
    #imageUploadPopup .merch-popup-content {
        max-width: 95vw !important;
        max-height: 90vh !important;
        min-width: 320px !important;
        min-height: 300px !important;
    }
    
    /* Stack layout vertically on mobile */
    #imageUploadPopup .image-upload-main-container {
        flex-direction: column;
    }
    
    #imageUploadPopup .image-display-area {
        min-height: 200px;
        margin-bottom: 20px;
    }
    
    #imageUploadPopup .upload-controls-area {
        width: 100% !important;
        margin: 0 10px 10px 10px !important;
        justify-content: flex-start !important;
    }
}

@media (max-width: 480px) {
    #imageUploadPopup .merch-popup-content {
        max-width: 98vw !important;
        max-height: 95vh !important;
        min-width: 280px !important;
        min-height: 250px !important;
    }
    
    #imageUploadPopup .upload-controls-area {
        margin: 0 5px 5px 5px !important;
        padding: 15px !important;
    }
}

.filter-pill.mass-purge-pill {
    background-color: #bcd443;
    color: rgb(0, 0, 0);
    border: none;
}