.image-upload-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 15px;
    background-color: var(--dark-accent, #1e1e1e);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 0 0 auto;
}

.upload-area.dragover {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

.upload-content {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-content p {
    margin: 0;
    font-size: 14px;
}

.upload-content button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
}

.upload-content button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.file-types {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

.preview-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 4px;
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: calc(100% - 200px);
}

.image-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 160px;
    height: 160px;
    background-color: rgba(255, 255, 255, 0.05);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.3); /* Darker background to make images and swatches more visible */
}

.remove-preview, .remove-background {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0;
    min-width: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 10; /* Ensure button appears above other elements */
}

.remove-preview:hover, .remove-background:hover {
    background-color: rgba(231, 76, 60, 1);
    transform: scale(1.1);
}

.error-message {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

/* Color indicator styling - REMOVING ALL RELATED RULES */
/*
.color-indicator-container {
    display: none !important; 
    ...
}
*/

/* Improved styling for the color swatch with !important to override conflicting styles */
.color-swatch {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 10; /* Ensure it's above the image content but below controls like the remove button */
    /* background-color is set by JS inline style */
    /* Ensure it's visible and interactive if these were an issue */
    opacity: 1;
    display: block;
    pointer-events: auto;
    visibility: visible;
}

/*
.color-label {
    ...
}
*/

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}