/* CSS สำหรับส่วนอัปโหลดรูปภาพ */
.image-upload-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-upload-section h5 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.image-upload-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.image-upload-preview {
    flex: 1;
    min-width: 200px;
}

.image-preview-container {
    width: 100%;
    height: 150px;
    border: 2px dashed #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    margin-bottom: 10px;
    cursor: move; /* แสดงว่าสามารถลากได้ */
}

.image-preview-placeholder {
    color: #999;
    font-size: 14px;
}

#imagePreview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-upload-form {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.image-upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.image-upload-btn {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.image-upload-btn:hover {
    background-color: #45a049;
}

.remove-image-btn {
    padding: 10px 15px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.remove-image-btn:hover {
    background-color: #d32f2f;
}

.image-upload-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.image-interaction-info {
    font-size: 12px;
    color: #666;
    padding: 5px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    border-left: 3px solid #4CAF50;
}

/* คำแนะนำการใช้งาน */
.image-tooltip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    padding: 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-preview-container:hover .image-tooltip {
    opacity: 1;
}

/* ตกแต่ง canvas เพื่อให้รู้ว่าสามารถโต้ตอบได้ */
#previewCanvas {
    cursor: move;
}
